From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.47 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796222303; b=jq4u87w/cW/HMeuNHlQ9q4oqxv4ELVTzEmKlZHRaVrsxVUfGjq+JHqB8eLmPhvNm97pL KeZneGZSoMM6q+vqMveZwBjMjmAGmW8XSxgbBBxobvtC/A/gSU3kgYkVG9cCgVF1HUjIX /8rZXOdIS5pKzUWa8XjxUTrNaCbS8OUVK9anj2ijeqob2/mfwbiPYMwnbB3SQqpYw0GQ5 SeY1RbKMyNfvkL7CK5uWZnPfMfiqp2A2/GFl2cNNst4j05snp5JTWQ09RrZe9clFfHUMG ae+dsCuR91dro9ReebzILFC98xE5l5DEcdX6amZJdxvFxluIfldchhULzQtGQkCAlkQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796222303; 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=R0tsIE6lsHzMPKBTKTKRPNxO6cBLW9oJzwTfttOt0No/GyyjWNUwDG0mQDwfa1vGu9/n VF27NSDKHVu56Y6ugt7Rzgrco1qkaCogG3YLQ+gMvlX2svG+V8AbrzZhZ2HM1UkwnCobX s6JcKzq8jqh0W0l69Z9L64peC4qnezKRwAobNXnhHLt8b4C+z51fEDkuyaNH+Rq26eK2q 0AWff+fMiiThfZ/99GZRprK9ItZhqZbbExg/RYK6b0nJESQA8HxPxtBzDuSK1YVG5zxg6 FlQ1U+u9DXmYUJIzl2mz94r6Cxds1ntUZQKhwr5E0b5GyyaitiaYA++1cqzXFbS/ULg== 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=95.215.58.47 Received: from mta1.migadu.com (out-47.mta1.migadu.com [95.215.58.47]) (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 CE576606A322 for ; Wed, 2 Dec 2026 14:38:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org CE576606A322 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: bpf@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: bpf@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: bpf@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