From nobody Wed Feb 2 21:28:50 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C5AF419B82EE; Wed, 2 Feb 2022 21:28:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Jpw0M2LMsz4pPl; Wed, 2 Feb 2022 21:28:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643837331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rf2Wdx+fXiYSy74irj5vd+jjrvX9/qPpnX74t2z7UXI=; b=Fstn0o+B1b7OImqWmD+Jsy7hArq4LfQ5gzmmWaSM5Ih9NYvKVve541p51zFlVXcrZQn6VD nhl4k2h+Uv1MLsxDWwNB5pjvJhBEwQUJbjvscCUoSpgq5eOaPhrhx5Gb44HFba4rUWalxx YKwR+2Ac2NplySE/OtCDKAHjs4DwelLdS0Z4kouJOC0XSfCH3Oa1zrTvPX/ZwAGQPLzP7P NOIP2WOBDMA5HA0kDlRxMkKySmxL7stVmF3gWN/GTGyiyESsoEg0DG1Z6OG1orTvtTlEBm wvIUAPWesz5zQkhfTYhsNcT6FXGA1hcPMOGn/jJ6tSYX2hRX0JDGJugO/eMeCQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0FB30335A; Wed, 2 Feb 2022 21:28:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 212LSo7h059975; Wed, 2 Feb 2022 21:28:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 212LSomS059974; Wed, 2 Feb 2022 21:28:50 GMT (envelope-from git) Date: Wed, 2 Feb 2022 21:28:50 GMT Message-Id: <202202022128.212LSomS059974@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 356deeb2e7f6 - main - kyua/qemu: When running in qemu, don't teset sendfile List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 356deeb2e7f64c5b3fff8e28f4b4fcc8b9cbf7bc Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643837331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rf2Wdx+fXiYSy74irj5vd+jjrvX9/qPpnX74t2z7UXI=; b=w3ODfKQMN383Pcl8rFoMz3A/I9vBDRLo9/fz+bMHsUy/kixTFq2ySwH3DViTWnnOdoTZmp tIllE3CJKpVGvm0kXilOxrGq2hQdzs3VCJiLsQfwTSnzr8VLVvtLincZFWF5xkeXMkBkbS m5/uofjFnHSBYFjQmqn8D4bxkBx6jCWR725sAc9mfM3vCecj5Ae4xsFxCWfSUFQpEVGIWQ SYjpFJ3uFvGEKwSHXK5WI4gKoYf10zJl0rPXvplz1Z6RhgpY0zgZqsxouD9ULK+popPqXN sYS0H/ftIDEo5uHyPk6p9rw4t626LNe7BymQ11uNbr3zaPMVxXn2NwI5xZLMXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643837331; a=rsa-sha256; cv=none; b=kBVfwM8aQo8pL8/6RAcLTKtDjXkg1zfDMj2YfWJza9IcTmN/Jd8LlbVH0jKoQAmzjqP5CI jFXrPHr7WsJDwuzSejTCI5/xUjiDusHDAmAmITAskrV9ZS0yIjOCV5s81+QcwX7KydJtIL poAINrrnnU4hUS4MM36F3QgVbWKGPrNhJnG+NjnSaOvQpvZ90UH9/AjNsUWPMX5eIMiGjz XikzppIzGN583LKveOaFwYFnAvi8Px8ZJZZkQhJhIrCPtc/0mAkgh/o06Hrb1saHe31FSh u0fXmt5XJLrgHMMRy3WKot+30RNM79/G7Oc/29KRRZGABCIf08DKeF1JQiFZUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=356deeb2e7f64c5b3fff8e28f4b4fcc8b9cbf7bc commit 356deeb2e7f64c5b3fff8e28f4b4fcc8b9cbf7bc Author: Warner Losh AuthorDate: 2022-02-02 21:27:51 +0000 Commit: Warner Losh CommitDate: 2022-02-02 21:27:51 +0000 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 --- lib/libc/tests/sys/sendfile_test.c | 54 ++++++++++++++++++++++++++++++++++++++ tests/sys/kern/sendfile_test.sh | 12 +++++++++ 2 files changed, 66 insertions(+) diff --git a/lib/libc/tests/sys/sendfile_test.c b/lib/libc/tests/sys/sendfile_test.c index c12e4f7c1de3..1700691495c4 100644 --- a/lib/libc/tests/sys/sendfile_test.c +++ b/lib/libc/tests/sys/sendfile_test.c @@ -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); } diff --git a/tests/sys/kern/sendfile_test.sh b/tests/sys/kern/sendfile_test.sh index 2efda9310396..11bd03705f53 100755 --- a/tests/sys/kern/sendfile_test.sh +++ b/tests/sys/kern/sendfile_test.sh @@ -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