From nobody Wed Mar 02 21:57:30 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 0EA9219E0C96; Wed, 2 Mar 2022 21:57:32 +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 4K87JW4D0kz3KFg; Wed, 2 Mar 2022 21:57:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646258251; 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=K2+Nyg7t0apo2vcZGhQlhzpbJq1POCwi9RfuzPsDSbo=; b=SzJ2gzVnjlMV9w4XVqV3gM7DopiD8QQyH8HnbRvsPr6i8iLFPWdMNwETHBkdFtdxOO9hLI GAuefbtyT6mZzu56TOcinBXyS3sIl7PJkixt0giHl+wUQyXFT8dU+WejKy9uOK90Kfs58A lSsZ0oeAKm6H8npvjSiyeuSR7tkAiVYPsCsjPi0a6pQu15JiNEkKzYTBXGVuvx+Sp9pWd2 2RvjV9AqOcTBF/i6+8ccVov2aZ5btdIwTw2WG9O5lEn6e3TTfKmYWsbbXcEZYm3bRngCeV oR/2gkRkp6pf1v0XmbBZkQpFz6P/VF9gm2R48PP0eAdSuh81Up0YIVI5CBHTqA== 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 AC7A0388F; Wed, 2 Mar 2022 21:57:30 +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 222LvUDS065318; Wed, 2 Mar 2022 21:57:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 222LvUMi065317; Wed, 2 Mar 2022 21:57:30 GMT (envelope-from git) Date: Wed, 2 Mar 2022 21:57:30 GMT Message-Id: <202203022157.222LvUMi065317@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eric van Gyzen Subject: git: ec68cb077be1 - stable/13 - sendfile_test: fix copy-paste bug 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: vangyzen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ec68cb077be136c2a082701fdefc50620e151605 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646258251; 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=K2+Nyg7t0apo2vcZGhQlhzpbJq1POCwi9RfuzPsDSbo=; b=BDQEsV6Do2jdothees+RTzkOTto9ot0nX8NVGcdWwt/A/KEfYM86tALttTT4xeE4gTXVDB Cjl7SqoS8Ztckpa0kZO0yR5dh/pgnwkKBSIwdp3T1ultnAA7pOXcQIM7+NpwInGfig//uk YYx6VuZ+kOVTmczpfEDAMRthqaG0FuTxr8v52LTGqLVeUNB6wNtXpZBzMEEW1czpy2GXXI nXj+QeqRVzsndTBRs2tSBm0uyjljYOO/Fn+jAULEr8b4jwiuwNE9uh1QGwOiW/LMJf2xmb a+1Sk3eK3xHv4MFycZDeFF8uamDtnCcogE08J7fryEEHUIZ4kk/EiA1mnUj17w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1646258251; a=rsa-sha256; cv=none; b=evF2hyl4N6eZI4CbIHj1FOZawjpixq2V4W0SWpjYRUr4sAubuq1+jV5NobCy/YKQ9svW5R /svCHJFO/wxNh6Tel6TtYujEJeSGaE0g6vbaaS1M3k2qhOHEazW0K7xSLlNHsrjJ5T7l7h rC32nVWaZyDRimY2ZgvWORldDAljqfiOt/5Jzyi4DXBvAhe3TbXE/fcC39mtxW2Cv4Z9Oj jpNH7L8CBgyQy4aBAEjFWDL2TZnYFKyEQuyqBog4bIJU1Beam4pirutHs/mVCCNC30XEJG noIiq//G14idBJole0flwVMriCX4WUvm00yvOjT4fFnfIg6XYpIlaZSh9+mM6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by vangyzen: URL: https://cgit.FreeBSD.org/src/commit/?id=ec68cb077be136c2a082701fdefc50620e151605 commit ec68cb077be136c2a082701fdefc50620e151605 Author: Eric van Gyzen AuthorDate: 2022-02-24 22:53:03 +0000 Commit: Eric van Gyzen CommitDate: 2022-03-02 21:56:31 +0000 sendfile_test: fix copy-paste bug Require the newly opened file descriptor to be good, instead of re-requiring the one that was required three lines earlier. Thankfully, opening /dev/null is really unlikely to fail. Reported by: Coverity MFC after: 1 week Sponsored by: Dell EMC Isilon (cherry picked from commit a8fea07c3053293f35e00b9073b33ff6f1d9a067) --- lib/libc/tests/sys/sendfile_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/tests/sys/sendfile_test.c b/lib/libc/tests/sys/sendfile_test.c index c12e4f7c1de3..0a205f2bb1d1 100644 --- a/lib/libc/tests/sys/sendfile_test.c +++ b/lib/libc/tests/sys/sendfile_test.c @@ -1062,7 +1062,7 @@ ATF_TC_BODY(s_negative_not_socket_file_descriptor, tc) ATF_REQUIRE_MSG(fd != -1, "open failed: %s", strerror(errno)); client_sock = open(_PATH_DEVNULL, O_WRONLY); - ATF_REQUIRE_MSG(fd != -1, "open failed: %s", strerror(errno)); + ATF_REQUIRE_MSG(client_sock != -1, "open failed: %s", strerror(errno)); error = sendfile(fd, client_sock, 0, 0, NULL, NULL, SF_FLAGS(0, 0)); ATF_REQUIRE_ERRNO(ENOTSOCK, error == -1);