kyua/qemu: When running in qemu, don't teset sendfile
qemu's bsd-user doesn't implement sendfile, so just skip those tests that use it. Sponsored by: Netflix
This commit is contained in:
parent
63b7c2df8e
commit
356deeb2e7
@ -380,6 +380,9 @@ ATF_TC_HEAD(fd_positive_file_v4, tc)
|
||||
ATF_TC_BODY(fd_positive_file_v4, tc)
|
||||
{
|
||||
|
||||
if (atf_tc_get_config_var_as_bool_wd(tc, "qemu", false))
|
||||
atf_tc_skip("Sendfile(4) unimplemented. https://github.com/qemu-bsd-user/qemu-bsd-user/issues/25");
|
||||
|
||||
fd_positive_file_test(AF_INET);
|
||||
}
|
||||
|
||||
@ -393,6 +396,9 @@ ATF_TC_HEAD(fd_positive_file_v6, tc)
|
||||
ATF_TC_BODY(fd_positive_file_v6, tc)
|
||||
{
|
||||
|
||||
if (atf_tc_get_config_var_as_bool_wd(tc, "qemu", false))
|
||||
atf_tc_skip("Sendfile(4) unimplemented. https://github.com/qemu-bsd-user/qemu-bsd-user/issues/25");
|
||||
|
||||
fd_positive_file_test(AF_INET6);
|
||||
}
|
||||
|
||||
@ -458,6 +464,8 @@ ATF_TC_HEAD(fd_positive_shm_v4, tc)
|
||||
}
|
||||
ATF_TC_BODY(fd_positive_shm_v4, tc)
|
||||
{
|
||||
if (atf_tc_get_config_var_as_bool_wd(tc, "qemu", false))
|
||||
atf_tc_skip("Sendfile(4) unimplemented. https://github.com/qemu-bsd-user/qemu-bsd-user/issues/25");
|
||||
|
||||
fd_positive_shm_test(AF_INET);
|
||||
}
|
||||
@ -471,6 +479,8 @@ ATF_TC_HEAD(fd_positive_shm_v6, tc)
|
||||
}
|
||||
ATF_TC_BODY(fd_positive_shm_v6, tc)
|
||||
{
|
||||
if (atf_tc_get_config_var_as_bool_wd(tc, "qemu", false))
|
||||
atf_tc_skip("Sendfile(4) unimplemented. https://github.com/qemu-bsd-user/qemu-bsd-user/issues/25");
|
||||
|
||||
fd_positive_shm_test(AF_INET6);
|
||||
}
|
||||
@ -502,6 +512,8 @@ ATF_TC_HEAD(fd_negative_bad_fd_v4, tc)
|
||||
}
|
||||
ATF_TC_BODY(fd_negative_bad_fd_v4, tc)
|
||||
{
|
||||
if (atf_tc_get_config_var_as_bool_wd(tc, "qemu", false))
|
||||
atf_tc_skip("Sendfile(4) unimplemented. https://github.com/qemu-bsd-user/qemu-bsd-user/issues/25");
|
||||
|
||||
fd_negative_bad_fd_test(AF_INET);
|
||||
}
|
||||
@ -515,6 +527,8 @@ ATF_TC_HEAD(fd_negative_bad_fd_v6, tc)
|
||||
}
|
||||
ATF_TC_BODY(fd_negative_bad_fd_v6, tc)
|
||||
{
|
||||
if (atf_tc_get_config_var_as_bool_wd(tc, "qemu", false))
|
||||
atf_tc_skip("Sendfile(4) unimplemented. https://github.com/qemu-bsd-user/qemu-bsd-user/issues/25");
|
||||
|
||||
fd_negative_bad_fd_test(AF_INET6);
|
||||
}
|
||||
@ -618,6 +632,8 @@ ATF_TC_HEAD(flags_v4, tc)
|
||||
}
|
||||
ATF_TC_BODY(flags_v4, tc)
|
||||
{
|
||||
if (atf_tc_get_config_var_as_bool_wd(tc, "qemu", false))
|
||||
atf_tc_skip("Sendfile(4) unimplemented. https://github.com/qemu-bsd-user/qemu-bsd-user/issues/25");
|
||||
|
||||
flags_test(AF_INET);
|
||||
}
|
||||
@ -630,6 +646,8 @@ ATF_TC_HEAD(flags_v6, tc)
|
||||
}
|
||||
ATF_TC_BODY(flags_v6, tc)
|
||||
{
|
||||
if (atf_tc_get_config_var_as_bool_wd(tc, "qemu", false))
|
||||
atf_tc_skip("Sendfile(4) unimplemented. https://github.com/qemu-bsd-user/qemu-bsd-user/issues/25");
|
||||
|
||||
flags_test(AF_INET6);
|
||||
}
|
||||
@ -746,6 +764,8 @@ ATF_TC_HEAD(hdtr_positive_v4, tc)
|
||||
}
|
||||
ATF_TC_BODY(hdtr_positive_v4, tc)
|
||||
{
|
||||
if (atf_tc_get_config_var_as_bool_wd(tc, "qemu", false))
|
||||
atf_tc_skip("Sendfile(4) unimplemented. https://github.com/qemu-bsd-user/qemu-bsd-user/issues/25");
|
||||
|
||||
hdtr_positive_test(AF_INET);
|
||||
}
|
||||
@ -759,6 +779,8 @@ ATF_TC_HEAD(hdtr_positive_v6, tc)
|
||||
}
|
||||
ATF_TC_BODY(hdtr_positive_v6, tc)
|
||||
{
|
||||
if (atf_tc_get_config_var_as_bool_wd(tc, "qemu", false))
|
||||
atf_tc_skip("Sendfile(4) unimplemented. https://github.com/qemu-bsd-user/qemu-bsd-user/issues/25");
|
||||
|
||||
hdtr_positive_test(AF_INET);
|
||||
}
|
||||
@ -810,6 +832,8 @@ ATF_TC_HEAD(hdtr_negative_bad_pointers_v4, tc)
|
||||
}
|
||||
ATF_TC_BODY(hdtr_negative_bad_pointers_v4, tc)
|
||||
{
|
||||
if (atf_tc_get_config_var_as_bool_wd(tc, "qemu", false))
|
||||
atf_tc_skip("Sendfile(4) unimplemented. https://github.com/qemu-bsd-user/qemu-bsd-user/issues/25");
|
||||
|
||||
hdtr_negative_bad_pointers_test(AF_INET);
|
||||
}
|
||||
@ -823,6 +847,8 @@ ATF_TC_HEAD(hdtr_negative_bad_pointers_v6, tc)
|
||||
}
|
||||
ATF_TC_BODY(hdtr_negative_bad_pointers_v6, tc)
|
||||
{
|
||||
if (atf_tc_get_config_var_as_bool_wd(tc, "qemu", false))
|
||||
atf_tc_skip("Sendfile(4) unimplemented. https://github.com/qemu-bsd-user/qemu-bsd-user/issues/25");
|
||||
|
||||
hdtr_negative_bad_pointers_test(AF_INET6);
|
||||
}
|
||||
@ -856,6 +882,8 @@ ATF_TC_HEAD(offset_negative_value_less_than_zero_v4, tc)
|
||||
}
|
||||
ATF_TC_BODY(offset_negative_value_less_than_zero_v4, tc)
|
||||
{
|
||||
if (atf_tc_get_config_var_as_bool_wd(tc, "qemu", false))
|
||||
atf_tc_skip("Sendfile(4) unimplemented. https://github.com/qemu-bsd-user/qemu-bsd-user/issues/25");
|
||||
|
||||
offset_negative_value_less_than_zero_test(AF_INET);
|
||||
}
|
||||
@ -869,6 +897,8 @@ ATF_TC_HEAD(offset_negative_value_less_than_zero_v6, tc)
|
||||
}
|
||||
ATF_TC_BODY(offset_negative_value_less_than_zero_v6, tc)
|
||||
{
|
||||
if (atf_tc_get_config_var_as_bool_wd(tc, "qemu", false))
|
||||
atf_tc_skip("Sendfile(4) unimplemented. https://github.com/qemu-bsd-user/qemu-bsd-user/issues/25");
|
||||
|
||||
offset_negative_value_less_than_zero_test(AF_INET6);
|
||||
}
|
||||
@ -909,6 +939,8 @@ ATF_TC_HEAD(sbytes_positive_v4, tc)
|
||||
}
|
||||
ATF_TC_BODY(sbytes_positive_v4, tc)
|
||||
{
|
||||
if (atf_tc_get_config_var_as_bool_wd(tc, "qemu", false))
|
||||
atf_tc_skip("Sendfile(4) unimplemented. https://github.com/qemu-bsd-user/qemu-bsd-user/issues/25");
|
||||
|
||||
sbytes_positive_test(AF_INET);
|
||||
}
|
||||
@ -922,6 +954,8 @@ ATF_TC_HEAD(sbytes_positive_v6, tc)
|
||||
}
|
||||
ATF_TC_BODY(sbytes_positive_v6, tc)
|
||||
{
|
||||
if (atf_tc_get_config_var_as_bool_wd(tc, "qemu", false))
|
||||
atf_tc_skip("Sendfile(4) unimplemented. https://github.com/qemu-bsd-user/qemu-bsd-user/issues/25");
|
||||
|
||||
sbytes_positive_test(AF_INET6);
|
||||
}
|
||||
@ -960,6 +994,8 @@ ATF_TC_HEAD(sbytes_negative_v4, tc)
|
||||
}
|
||||
ATF_TC_BODY(sbytes_negative_v4, tc)
|
||||
{
|
||||
if (atf_tc_get_config_var_as_bool_wd(tc, "qemu", false))
|
||||
atf_tc_skip("Sendfile(4) unimplemented. https://github.com/qemu-bsd-user/qemu-bsd-user/issues/25");
|
||||
|
||||
sbytes_negative_test(AF_INET);
|
||||
}
|
||||
@ -973,6 +1009,8 @@ ATF_TC_HEAD(sbytes_negative_v6, tc)
|
||||
}
|
||||
ATF_TC_BODY(sbytes_negative_v6, tc)
|
||||
{
|
||||
if (atf_tc_get_config_var_as_bool_wd(tc, "qemu", false))
|
||||
atf_tc_skip("Sendfile(4) unimplemented. https://github.com/qemu-bsd-user/qemu-bsd-user/issues/25");
|
||||
|
||||
sbytes_negative_test(AF_INET6);
|
||||
}
|
||||
@ -1005,6 +1043,8 @@ ATF_TC_HEAD(s_negative_not_connected_socket_v4, tc)
|
||||
|
||||
ATF_TC_BODY(s_negative_not_connected_socket_v4, tc)
|
||||
{
|
||||
if (atf_tc_get_config_var_as_bool_wd(tc, "qemu", false))
|
||||
atf_tc_skip("Sendfile(4) unimplemented. https://github.com/qemu-bsd-user/qemu-bsd-user/issues/25");
|
||||
|
||||
s_negative_not_connected_socket_test(AF_INET);
|
||||
}
|
||||
@ -1019,6 +1059,8 @@ ATF_TC_HEAD(s_negative_not_connected_socket_v6, tc)
|
||||
|
||||
ATF_TC_BODY(s_negative_not_connected_socket_v6, tc)
|
||||
{
|
||||
if (atf_tc_get_config_var_as_bool_wd(tc, "qemu", false))
|
||||
atf_tc_skip("Sendfile(4) unimplemented. https://github.com/qemu-bsd-user/qemu-bsd-user/issues/25");
|
||||
|
||||
s_negative_not_connected_socket_test(AF_INET6);
|
||||
}
|
||||
@ -1035,6 +1077,9 @@ ATF_TC_BODY(s_negative_not_descriptor, tc)
|
||||
{
|
||||
int client_sock, error, fd;
|
||||
|
||||
if (atf_tc_get_config_var_as_bool_wd(tc, "qemu", false))
|
||||
atf_tc_skip("Sendfile(4) unimplemented. https://github.com/qemu-bsd-user/qemu-bsd-user/issues/25");
|
||||
|
||||
client_sock = -1;
|
||||
|
||||
fd = open(SOURCE_FILE, O_CREAT|O_RDWR, 0600);
|
||||
@ -1058,6 +1103,9 @@ ATF_TC_BODY(s_negative_not_socket_file_descriptor, tc)
|
||||
{
|
||||
int client_sock, error, fd;
|
||||
|
||||
if (atf_tc_get_config_var_as_bool_wd(tc, "qemu", false))
|
||||
atf_tc_skip("Sendfile(4) unimplemented. https://github.com/qemu-bsd-user/qemu-bsd-user/issues/25");
|
||||
|
||||
fd = open(SOURCE_FILE, O_CREAT|O_RDWR, 0600);
|
||||
ATF_REQUIRE_MSG(fd != -1, "open failed: %s", strerror(errno));
|
||||
|
||||
@ -1099,6 +1147,9 @@ ATF_TC_HEAD(s_negative_udp_socket_v4, tc)
|
||||
ATF_TC_BODY(s_negative_udp_socket_v4, tc)
|
||||
{
|
||||
|
||||
if (atf_tc_get_config_var_as_bool_wd(tc, "qemu", false))
|
||||
atf_tc_skip("Sendfile(4) unimplemented. https://github.com/qemu-bsd-user/qemu-bsd-user/issues/25");
|
||||
|
||||
s_negative_udp_socket_test(AF_INET);
|
||||
}
|
||||
|
||||
@ -1112,6 +1163,9 @@ ATF_TC_HEAD(s_negative_udp_socket_v6, tc)
|
||||
ATF_TC_BODY(s_negative_udp_socket_v6, tc)
|
||||
{
|
||||
|
||||
if (atf_tc_get_config_var_as_bool_wd(tc, "qemu", false))
|
||||
atf_tc_skip("Sendfile(4) unimplemented. https://github.com/qemu-bsd-user/qemu-bsd-user/issues/25");
|
||||
|
||||
s_negative_udp_socket_test(AF_INET6);
|
||||
}
|
||||
|
||||
|
@ -51,6 +51,10 @@ io_success_head()
|
||||
}
|
||||
io_success_body()
|
||||
{
|
||||
if [ "$(atf_config_get qemu false)" = "true" ]; then
|
||||
atf_skip "Sendfile(4) unimplemented. https://github.com/qemu-bsd-user/qemu-bsd-user/issues/25"
|
||||
fi
|
||||
|
||||
md=$(alloc_md)
|
||||
common_body_setup $md
|
||||
|
||||
@ -70,6 +74,10 @@ io_fail_sync_head()
|
||||
}
|
||||
io_fail_sync_body()
|
||||
{
|
||||
if [ "$(atf_config_get qemu false)" = "true" ]; then
|
||||
atf_skip "Sendfile(4) unimplemented. https://github.com/qemu-bsd-user/qemu-bsd-user/issues/25"
|
||||
fi
|
||||
|
||||
md=$(alloc_md)
|
||||
common_body_setup $md
|
||||
|
||||
@ -90,6 +98,10 @@ io_fail_async_head()
|
||||
}
|
||||
io_fail_async_body()
|
||||
{
|
||||
if [ "$(atf_config_get qemu false)" = "true" ]; then
|
||||
atf_skip "Sendfile(4) unimplemented. https://github.com/qemu-bsd-user/qemu-bsd-user/issues/25"
|
||||
fi
|
||||
|
||||
md=$(alloc_md)
|
||||
common_body_setup $md
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user