From nobody Thu Jan 27 17:23:20 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 C9FC51974A01; Thu, 27 Jan 2022 17:23:20 +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 4Jl6qr5C4kz4kMN; Thu, 27 Jan 2022 17:23:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643304200; 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=VqG9PGaFeKEhonD8HH70YHatiFlw4g5KeHcFJOuCURU=; b=h5NLYNfDpqVEiTcEgTvf/6HcGMWvM0y95DxaE8I+mYT4J9udSGHmhmr4UK8+EjuBbN3330 bYXqPJeBU6yEEpiZYOFKIRuOple0zKRG9Ycat3kzsCpT/tP9dhu0M728po9Dh7KNWDFTfy rxCxbjJXNIV3PmJwfxye0RXEbBYjj6U4IfnTdO6MmhQHDiLSXvAzwcnNTDkbNoZptJ+eS/ Q/E+qmNM211m8wpoGaUoYM7XTTtRmC7iv4N1KEICrUKak0Ls/rpXghEkCN1t8OSzQSx7U0 Ph95q9xGNZTKZreEiuhphFPWC0XFIAPDF6AZDDymaEAl8dGjFj8qr3oPLSNjpA== 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 930DB1ABD3; Thu, 27 Jan 2022 17:23:20 +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 20RHNKqx080564; Thu, 27 Jan 2022 17:23:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20RHNKaw080563; Thu, 27 Jan 2022 17:23:20 GMT (envelope-from git) Date: Thu, 27 Jan 2022 17:23:20 GMT Message-Id: <202201271723.20RHNKaw080563@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: c9afc7680f3e - main - tests: fix posix_spawnp_enoexec_fallback_null_argv0 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c9afc7680f3e1f0510518de9de4264553a31aade Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643304200; 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=VqG9PGaFeKEhonD8HH70YHatiFlw4g5KeHcFJOuCURU=; b=gL4VxNvtrt0T1ZPTeEJc05I2Az8rDS7KoASs5MzGZEVzgQm3dh5Vl6YMkBdQLXCOo3mOVX O3G0FSpCKkyEw0vWParDcpz0GUTxbOCRBWgSdtJ3DsbFM2YJS3cGxnrfoPZGoYlzc/Juok gGqleTMh8H0ykZFz/5kSxr6bdv5XROgDMfwUlPE4FUTsTIXGl/6wsmahztrGBE4XFqUnfV h91K/BiXDYxIF+fXtg/GPrH3pNW51G19d0k/kwVpsuP29gNPYOofwuJh4B2YXW6rJHiB3d tjpPTMFSZuL1A1xJfiEE8i+ldVJtrIeSDWlQsDHjFjtPQou0UGrIUzfd7VuSjQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643304200; a=rsa-sha256; cv=none; b=JlzTBIuWb5feIbpEEUDOviZzOtchQ2njsTqjWxlpMT+V0AGSElNAcIO3nIyolSNuFDqESu kdZdZEv+6dnGH4DPJMqtbF0H78l2iWNI6ps6rSowELDDIMR9rvup3ujpfoC62vxLEwUQm6 8Amw4eWMMKCC00yHDTegjSuEvEchNC2s/WbA+GevGwALBm200PTSfVz+SwErcb0KRNId7t VyNA5qfJ58uQkHI0ecm0zZvAirVDufNVyO6By0FKADYy2PiOkfeMv6YfbQQRQS8Ybk8p27 VUIT+xt8cmwMAkS6hVJQOu1JAfCGIfNcQ6PgzAJhCinvR8XQdOtxLQsaX+5evQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=c9afc7680f3e1f0510518de9de4264553a31aade commit c9afc7680f3e1f0510518de9de4264553a31aade Author: Kyle Evans AuthorDate: 2022-01-27 17:22:49 +0000 Commit: Kyle Evans CommitDate: 2022-01-27 17:22:49 +0000 tests: fix posix_spawnp_enoexec_fallback_null_argv0 This test was written because execvp was found to improperly handle the argc == 0 case when it falls back from an ENOEXEC. We could probably mostly revert it now, but let's just fix the test for the time being and circle back later to decide if we want to simplify execvp. The test will likely remain either way just to make sure execvp isn't working around the newly enforced restriction with the fallback. Fixes: 301cb491ea41 ("execvp: fix up the ENOEXEC fallback") Reported by: jenkins via lwhsu@ --- lib/libc/tests/gen/posix_spawn_test.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/libc/tests/gen/posix_spawn_test.c b/lib/libc/tests/gen/posix_spawn_test.c index 5e2c485473d0..46259cbf8cde 100644 --- a/lib/libc/tests/gen/posix_spawn_test.c +++ b/lib/libc/tests/gen/posix_spawn_test.c @@ -117,17 +117,14 @@ ATF_TC_BODY(posix_spawnp_enoexec_fallback_null_argv0, tc) { char buf[FILENAME_MAX]; char *myargs[1]; - int error, status; - pid_t pid, waitres; + int error; + pid_t pid; snprintf(buf, sizeof(buf), "%s/spawnp_enoexec.sh", atf_tc_get_config_var(tc, "srcdir")); myargs[0] = NULL; error = posix_spawnp(&pid, buf, NULL, NULL, myargs, myenv); - ATF_REQUIRE(error == 0); - waitres = waitpid(pid, &status, 0); - ATF_REQUIRE(waitres == pid); - ATF_REQUIRE(WIFEXITED(status) && WEXITSTATUS(status) == 42); + ATF_REQUIRE(error == EINVAL); } ATF_TP_ADD_TCS(tp)