atf_test_case basic
basic_head() {
	atf_set "descr" "Verifies that sockets can be created using" \
	                "socket/bind"
	atf_set "require.user" "root"
}
basic_body() {
	test_mount

	atf_check -s eq:0 -o empty -e empty $(atf_get_srcdir)/h_tools sockets a
	atf_check -s eq:0 -o empty -e empty rm a

	atf_check -s eq:0 -o empty -e empty mkdir dir
	echo "$(atf_get_srcdir)/h_tools sockets dir/a" | kqueue_monitor 1 dir
	kqueue_check dir NOTE_WRITE

	test_unmount
}

atf_init_test_cases() {
	. $(atf_get_srcdir)/../h_funcs.subr
	. $(atf_get_srcdir)/h_funcs.subr

	atf_add_test_case basic
}
