From nobody Sat Sep 16 09:33:19 2023 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 4Rnm7z2Wwcz4sv0Z; Sat, 16 Sep 2023 09:33:19 +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 4Rnm7z1hJLz4Z3K; Sat, 16 Sep 2023 09:33:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694856799; 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=sPG9v0F6Ua6bFjX97BrCGhcDN6564MqfuHzv3weIJEQ=; b=jl/Dyyf3eq1BR4WqMAUPaNqj2GSCz/u/DyMRe6hnRsLmESfEFA8uta7PmP6CATF/qQcGck GjmW0BTOutHryevZOPqiVbuDqLAWSoPKcJ1vpcmy9P7HvaMxHscYnKY9blfluy0TDUTyRh SeI+YS7jzYmnBUdkQd14aocJ2wBelpXCzNEJZimdeYQNyDBL8DeLJ8kFPJEmNjv2T9A4mh lwf0urqelcSupt8bcPkmsWDvwimqxOOgbaUfcfsfaqdwwPdZcIZ2BCp0uoQ1gqrVHLKmWm opX30oPQte6I/trxFXwkhSq0MxhYVZFOQ8AYnq+NhO9olQbil1o/D54tPmj8IQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694856799; a=rsa-sha256; cv=none; b=NcR2WIOoRlc5/bDyJJ1y/yZKk67bu6+7BY+U+fcbly5JweMcRYy4w/9jWofx1j7qxCfM7V Z1optq2770zK/Xi1CDpmBUT1XD5FgDRlLDPUUvlvz7QftuILe8+hZHTqscF7o+lemX/B0p bjDr/B1Cv/KReNXkSFdgNXt9IETqzm/whyehhX/ZY4VMiHixJFy8duNFeA86ZcRkGErfc+ yk6CwqaxwXwMi1aizAT2QWdohY5wcHhRPd9824ptXRm0vS02GtYcIMI2oXZqaDtWJfQwvi MsmiI7plvac/kCRS75yK0rDtIItM6KeD1gAZW6R2qyLhDvLasSJZgeFvqBiM6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694856799; 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=sPG9v0F6Ua6bFjX97BrCGhcDN6564MqfuHzv3weIJEQ=; b=vd3zNz8EdFmo+Kx/rWgRqxEq9gEwxUo2xoJdZV01rYNOYvEa+ASEtmtzml3pWhQpVZQ2Uw dU8M6Co7ygmZXV4DZdUCA9krMQnsiS+JO0aCxy+NHFpu4cgMge5aKfmpRFev0NQFxATgwL D5oK2S7zc393a8IKd6tWmFqAKLLtn8em+dxyXYkgjDQY3rKLyor++rQ/eRleNjBOXWWdBw fU6oHY/ys30c9wnOm4Ujbxp2evqLEoaSTP0ylCrhwVW7q/XRP2jQvAs+tioGi9yeWfxEon v8rpCzz4L2tvtxczKO4BPW10qUE87xWZzwAFkambVUzvnnxl1XE0aPIyRbrY2g== 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 4Rnm7z0lHLz11Zh; Sat, 16 Sep 2023 09:33:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38G9XJa8033414; Sat, 16 Sep 2023 09:33:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38G9XJTS033411; Sat, 16 Sep 2023 09:33:19 GMT (envelope-from git) Date: Sat, 16 Sep 2023 09:33:19 GMT Message-Id: <202309160933.38G9XJTS033411@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: d643925a79ca - main - unix tests: Use the right type for sendmsg(2) return values 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d643925a79caab5c6de62b066e374935b60bcaf1 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d643925a79caab5c6de62b066e374935b60bcaf1 commit d643925a79caab5c6de62b066e374935b60bcaf1 Author: Mark Johnston AuthorDate: 2023-09-15 08:59:08 +0000 Commit: Mark Johnston CommitDate: 2023-09-15 17:04:15 +0000 unix tests: Use the right type for sendmsg(2) return values MFC after: 1 week --- tests/sys/kern/unix_passfd_test.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/sys/kern/unix_passfd_test.c b/tests/sys/kern/unix_passfd_test.c index 94f0c420029a..d8c0efe5b9ea 100644 --- a/tests/sys/kern/unix_passfd_test.c +++ b/tests/sys/kern/unix_passfd_test.c @@ -182,13 +182,13 @@ sendfd_payload(int sockfd, int send_fd, void *payload, size_t paylen) static void sendfd(int sockfd, int send_fd) { - size_t len; + ssize_t len; char ch; ch = 0; len = sendfd_payload(sockfd, send_fd, &ch, sizeof(ch)); ATF_REQUIRE_MSG(len == sizeof(ch), - "sendmsg: %zu bytes sent; expected %zu; %s", len, sizeof(ch), + "sendmsg: %zd bytes sent; expected %zu; %s", len, sizeof(ch), strerror(errno)); } @@ -532,10 +532,10 @@ ATF_TC_BODY(send_overflow, tc) len = sendfd_payload(fd[0], putfd, buf, sendspace); #if TEST_PROTO == SOCK_STREAM ATF_REQUIRE_MSG(len == -1 && errno == EAGAIN, - "sendmsg: %zu bytes sent, errno %d", len, errno); + "sendmsg: %zd bytes sent, errno %d", len, errno); #elif TEST_PROTO == SOCK_DGRAM ATF_REQUIRE_MSG(len == -1 && errno == ENOBUFS, - "sendmsg: %zu bytes sent, errno %d", len, errno); + "sendmsg: %zd bytes sent, errno %d", len, errno); #endif close(putfd); ATF_REQUIRE(nfiles == openfiles()); @@ -655,14 +655,14 @@ ATF_TC_BODY(rights_creds_payload, tc) #if TEST_PROTO == SOCK_STREAM ATF_REQUIRE_MSG(len != -1 , "sendmsg failed: %s", strerror(errno)); ATF_REQUIRE_MSG((size_t)len < sendspace, - "sendmsg: %zu bytes sent", len); + "sendmsg: %zd bytes sent", len); recvfd_payload(fd[1], &getfd, buf, len, CMSG_SPACE(SOCKCREDSIZE(CMGROUP_MAX)) + CMSG_SPACE(sizeof(int)), 0); #endif #if TEST_PROTO == SOCK_DGRAM ATF_REQUIRE_MSG(len != -1 , "sendmsg failed: %s", strerror(errno)); ATF_REQUIRE_MSG((size_t)len == sendspace, - "sendmsg: %zu bytes sent", len); + "sendmsg: %zd bytes sent", len); recvfd_payload(fd[1], &getfd, buf, len, CMSG_SPACE(SOCKCREDSIZE(CMGROUP_MAX)) + CMSG_SPACE(sizeof(int)), 0); #endif