From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.188 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796222304; b=Hxrn7CAypIE+CJJHfDh49b1qEMFi/15bxZb6d9HFKnJQbhx4bTfqDeHp2Ab1dO5UInrx xHwm1WErSPUQ38MBgPJZs146ogCRMDn+qa6/vhlBQSR+NKcaLJavkLJrf6u6904tINsS9 Pu7fQ1klXzfeadkkQPaVI2uPh/vEDwsjmqDhikXkDUg1ueFqfIe1lefqtZWD3n0dBx4i3 RvcLFjfOF7Q+4IyK+rOKAKoIc4cybRiXQFUzknC3dRoQSSpPxcg0q3OPqF0Vyeurcg1Y1 wYMl48x2PQZkBKNtNg94gR0a76edCEYr9kLSBtWyBW9RAU08FoxfR7hAKq9gEdn6fYg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796222304; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:From:To:Cc:Subject:Date:Message-ID: X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=BiblagAwWZVB0nD9tdwa/5kPhDVbVwcAuWR1i5HUtwo=; b=G5GS06eve553viodnbEWosvk3P9RqingXBKr3Khm9g8O+zCpp7NRvkOapv1OQot/Jj9p SgT8qSBKVlutELRCfz4qYbWdd5pzaMOlsjeCVFOe3NmFc5pIgbPsZSRNYomuRj9HnrJ/W MCPrkW1YUnGgIuMDy0GYo1MlOz0H4g07ug4PMGqrVpdfzWXiPZ1WJBA40/hatj/t/aYXM igOPwQLHSKOpS7rX6a1Xza0dPw4TxX7nexut/VazIyYRVflNQtO/iNicrWKYjd/5HhSMP uhqeqA2jy9vysXq3JT67gPRiFPVoYUCfrnXbl6/gtUdK66cFZIiAC8h1lEilcNRxeSQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=mVyZh768; arc=none smtp.remote-ip=91.218.175.188 Received: from mta0.migadu.com (out-188.mta0.migadu.com [91.218.175.188]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 678E4606A325 for ; Wed, 2 Dec 2026 14:38:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 678E4606A325 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=mVyZh768 X-Envelope-To: linux-kselftest@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=vDVYh+sDBLKKVILHwWc8ElGwjc9r3a0YtDfDU0NiJfg=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796222301; v=1; x=1796827101; b=mVyZh768XDFGf3UtnCgxZiTdHNsGKeXdUOoO+7CDjvnfBemXOgdyjOR1I/WXL3/zA5JMVcxC k060URiumZ5UeZySvNdph9es1a/UqGtFzbaGaG0YOfGWeI52YDIlW/hu9ozzugvE2mQD0kZ9u0e xkz32YKAqaxPTB3HjZFvdznA= X-Envelope-To: linux-kselftest@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id 99f7f8f5c063dc27; Wed, 02 Dec 2026 14:38:20 +0000 X-Mizu-Trace-ID: 99f7f8f5c063dc27 X-Migadu-Flow: FLOW_OUT From: Jiayuan Chen To: bpf@vger.kernel.org Cc: Jiayuan Chen , John Fastabend , Jakub Sitnicki , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Willem de Bruijn , Simon Horman , Kuniyuki Iwashima , Neal Cardwell , Andrii Nakryiko , Eduard Zingerman , Ihor Solodrai , Alexei Starovoitov , Daniel Borkmann , Kumar Kartikeya Dwivedi , Martin KaFai Lau , Song Liu , Yonghong Song , Jiri Olsa , Emil Tsalapatis , Shuah Khan , Sechang Lim , Mattia Meleleo , Michal Luczaj , Zijian Zhang , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH bpf v3 8/9] selftests/bpf: Fix errno expected by the wait send mem test of test_sockmap Date: Wed, 2 Dec 2026 22:30:47 +0800 Message-ID: <20261202143337.400831-9-jiayuan.chen@linux.dev> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261202143337.400831-1-jiayuan.chen@linux.dev> References: <20261202143337.400831-1-jiayuan.chen@linux.dev> X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The test closes the redirect target while the sender waits for its send memory. A part of the data has gone out, so sendmsg() returns that part and the test calls sendmsg() again. With apply_bytes, the previous patch keeps the verdict for the bytes that were not sent. The next sendmsg() sends to the same target and returns -EPIPE, instead of running the prog again, which no longer finds the target in the map and returns SK_DROP, -EACCES. Accept -EPIPE as well. Signed-off-by: Jiayuan Chen --- tools/testing/selftests/bpf/test_sockmap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/test_sockmap.c b/tools/testing/selftests/bpf/test_sockmap.c index aaf2050e8845..771146268df7 100644 --- a/tools/testing/selftests/bpf/test_sockmap.c +++ b/tools/testing/selftests/bpf/test_sockmap.c @@ -566,7 +566,8 @@ static int msg_loop(int fd, int iov_count, int iov_length, int cnt, sent = sendmsg(fd, &msg, flags); if (!drop && sent < 0) { - if (opt->tx_wait_mem && errno == EACCES) { + if (opt->tx_wait_mem && + (errno == EACCES || errno == EPIPE)) { errno = 0; goto out_errno; } -- 2.43.0