From nobody Tue Oct 24 18:04:00 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 4SFKgh3Bqnz4yK7L; Tue, 24 Oct 2023 18:04:00 +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 4SFKgh2Dy7z3Ssk; Tue, 24 Oct 2023 18:04:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698170640; 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=1ArWWRefXyw/qDZ22VQuqjuVqTTQ+y/37LjkkN8x/PU=; b=IubiiMP5kmmnHCW2sC4Yjl/rHLGfmhMGitNtxVYzNXTHhYZO+5DSfJYdKB3R11rN59zhsd RUmTTJEJwyWh5BtaVM2U42MwzvH0o48e0e3HQZBNJppNIeNUwuXpTG29vbee7TXckZ2tre 3K0nb6B38Sn3gzPtacDihIRJ14OX1d1deO4+5xUsKUlGHxm7Enb0tLPknRyqXJxsofkTSg w/LurRBiwbYXuIcz6zuy9z40AQyKCLCb0cr1NiTSX52dfMUdz75DDlkqNb0AnJiR66XiAi //QZD0didu1oz5SCiz33adBSU2RaCq/JyTTYebL3jReBAJPRXv+NBNmroL5iDg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698170640; a=rsa-sha256; cv=none; b=pgkDKKF+agYuRiXC/p02LOcBIgdrJNwmm2JoCUvxABlGugSYXuPfWZF+acXmWdfDX5YwYz iQTpijmAN33XNgujIsdfv8d83azd7wpbtNlO9PPS79/+ZadqV7ePhLHO1LITVc7GJnR+qK ur9U/8kNuyPPY1YNGkdT6LR9lnxrdr4cJrNlj8ViXylHjuSkQB3gglxdWnvVbnKRSZsHhy jo3oA5w7d7/FOPQZGFfoQ4sXI7oW33UEPsoLAg8u030NIsmGtj4RWgs4mAAsP0j1w7SOOi zE8qseJ3JDRPQUWMtZ6WAKwM/0p1N6k/iUUC+YzsH8qNiorXRn+keQfInnxtMg== 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=1698170640; 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=1ArWWRefXyw/qDZ22VQuqjuVqTTQ+y/37LjkkN8x/PU=; b=HkpO/ZtKWzDWiljjQlbZDxAWDuPmAetRv3vijkZvjKytdt07iVKnFCbNXLLIOZPR11lBB/ AE44srYw+qTpbilrM8SIt/NmvFWwst1WOTy96lbm+NhnJvcRH2p00SlTCXZsTCOaWlLZry UM5HApn18xwrP9WENyAFD5538SUMk7RLQg2aKtwj+BGPhJOVprt8JL+nxlF0e+ua3BGmTr QmB4GA8owWwzh8/QTANbDdW9tkXNsG6Qo1Vs/iSwd1cxZ6YIKh6CZJSvyV2iZpJYDfU2Ii qmyXXqLJ3wBG244r2i2YN6d1IRDZPAE58Ygbn4v49BBPrSA6gSiMlT8oFyV7rQ== 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 4SFKgh1JzlzXnv; Tue, 24 Oct 2023 18:04:00 +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 39OI40qb037050; Tue, 24 Oct 2023 18:04:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OI40qh037047; Tue, 24 Oct 2023 18:04:00 GMT (envelope-from git) Date: Tue, 24 Oct 2023 18:04:00 GMT Message-Id: <202310241804.39OI40qh037047@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 4bf16a282503 - stable/13 - Revert "socket tests: Add a regression test for ktrace+recv(MSG_TRUNC)" 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 4bf16a282503fb1b9091e7e431220d97e72e25f9 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4bf16a282503fb1b9091e7e431220d97e72e25f9 commit 4bf16a282503fb1b9091e7e431220d97e72e25f9 Author: Mark Johnston AuthorDate: 2023-10-24 18:03:49 +0000 Commit: Mark Johnston CommitDate: 2023-10-24 18:03:49 +0000 Revert "socket tests: Add a regression test for ktrace+recv(MSG_TRUNC)" This reverts commit f5a9a849e9034c597c2b0a9014673a44834b9516. This test will require extra work to port to stable/13. --- tests/sys/kern/socket_msg_trunc.c | 57 --------------------------------------- 1 file changed, 57 deletions(-) diff --git a/tests/sys/kern/socket_msg_trunc.c b/tests/sys/kern/socket_msg_trunc.c index 279170158643..469b9e1503cd 100644 --- a/tests/sys/kern/socket_msg_trunc.c +++ b/tests/sys/kern/socket_msg_trunc.c @@ -27,13 +27,11 @@ #include #include -#include #include #include #include -#include #include #include #include @@ -184,67 +182,12 @@ ATF_TC_BODY(recv_trunc_afunix_seqpacket, tc) ATF_REQUIRE(close(ss) == 0); } -/* - * Exercise the case where ktrace was used to dump a truncated buffer. - */ -ATF_TC_WITHOUT_HEAD(recvmsg_trunc_ktrace_uio); -ATF_TC_BODY(recvmsg_trunc_ktrace_uio, tc) -{ - struct ktr_header ktr; - struct msghdr msg; - struct iovec iov; - const char *tracepath; - char buf[128]; - ssize_t nbytes; - int error, fd, sd[2]; - - tracepath = "ktrace"; - - error = socketpair(AF_UNIX, SOCK_DGRAM, 0, sd); - ATF_REQUIRE(error == 0); - - memset(buf, 0, sizeof(buf)); - nbytes = send(sd[0], buf, sizeof(buf), 0); - ATF_REQUIRE_MSG(nbytes >= 0, "send failed: %s", strerror(errno)); - ATF_REQUIRE((size_t)nbytes == sizeof(buf)); - - fd = open(tracepath, O_RDWR | O_CREAT | O_TRUNC, 0644); - ATF_REQUIRE_MSG(fd >= 0, "open failed: %s", strerror(errno)); - error = ktrace(tracepath, KTROP_SET, KTRFAC_GENIO, getpid()); - ATF_REQUIRE_MSG(error == 0, - "ktrace(SET) failed: %s", strerror(errno)); - - iov.iov_base = buf; - iov.iov_len = sizeof(buf) - 1; /* truncate */ - memset(&msg, 0, sizeof(msg)); - msg.msg_iov = &iov; - msg.msg_iovlen = 1; - nbytes = recvmsg(sd[1], &msg, MSG_TRUNC); - ATF_REQUIRE_MSG(nbytes >= 0, "recvmsg failed: %s", strerror(errno)); - ATF_REQUIRE((size_t)nbytes == sizeof(buf)); - ATF_REQUIRE((msg.msg_flags & MSG_TRUNC) != 0); - - error = ktrace(tracepath, KTROP_CLEARFILE, 0, getpid()); - ATF_REQUIRE_MSG(error == 0, - "ktrace(CLEARFILE) failed: %s", strerror(errno)); - - nbytes = read(fd, &ktr, sizeof(ktr)); - ATF_REQUIRE_MSG(nbytes >= 0, "read failed: %s", strerror(errno)); - ATF_REQUIRE((size_t)nbytes == sizeof(ktr)); - ATF_REQUIRE_MSG((ktr.ktr_type & ~KTR_TYPE) == KTR_GENIO); - - ATF_REQUIRE(close(fd) == 0); - ATF_REQUIRE(close(sd[0]) == 0); - ATF_REQUIRE(close(sd[1]) == 0); -} - ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, recv_trunc_afinet_udp); ATF_TP_ADD_TC(tp, recv_trunc_afinet6_udp); ATF_TP_ADD_TC(tp, recv_trunc_afunix_dgram); ATF_TP_ADD_TC(tp, recv_trunc_afunix_seqpacket); - ATF_TP_ADD_TC(tp, recvmsg_trunc_ktrace_uio); return (atf_no_error()); }