From nobody Thu Dec 18 03:26:38 2025 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8CE7432BF31 for ; Fri, 31 Oct 2025 08:04:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761897900; cv=none; b=YxR0xtllKQdZQU4I3nFvoja6JQE/xB7opwUtK+QORQ7YZBzOHBL74ol27ea4cJD0i77t3EaJKFpKvIUtBEC/u7ZdHPlaYOz5ItdhqHOd4u3TGGOe3f+PfYwq8CL47hOBArFrCDlwUip2W8ZmQMD2ox/fySSmtWkzM8IHkqnjp6Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761897900; c=relaxed/simple; bh=NmnFd273B1++/96Wgc9NGu0f7rRSh30SrDhu6B794fM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=T4QL6JLroVGmH1ViWT1OxClktbICUG51rkup4chugKkCSfwG5ObC61AS5ufqaCI02BisVkAD99i7YOJDC8uNRIijC+zwJCrCL1K7B180BaQqBrLFyRuZ/U709mPqVhZc4IpU8YkQbEHfgEt7+/PQ8yVPnYcEk6DwnVaY8+vHL6U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=NE4vFl9K; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="NE4vFl9K" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id E15DE4E41432; Fri, 31 Oct 2025 08:04:56 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id B6C2A60704; Fri, 31 Oct 2025 08:04:56 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 6A3EC1180FB50; Fri, 31 Oct 2025 09:04:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1761897895; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=t78orrvBumS1q2Y+FbZ/Ic91n45UYCSTBLa81LdYwMs=; b=NE4vFl9KG+4eseoG4ywEu+DjqKQmL59YlkadE28XCJzhInfFLYR16y8HD4jG6RX756dduK Bo9VW8SZI5id3PusP5HnynqHUgLQtjL255oK4maT++6LAQUUa3vZ98P1iuwZPcURqCqLWq 6x5UIKs6qFirmKAnLZGwfb1RWynLFDcDezomJWRD3RFQQqr6QAJO5mLchVeF6yKzcgLiHq F9OLF3hLbKbZmo7qPGXNPEQwqEmXMswLlZL/v+HkD81/iT6AxpGAnJn47nxNOsvLmFLZyL p+pKWoX/tvAGgPEUBsY04NS1dv4t56hz3X1AhkzfWK3VX5oJsVjqFTyEfE+GtQ== From: "Bastien Curutchet (eBPF Foundation)" Date: Fri, 31 Oct 2025 09:04:39 +0100 Subject: [PATCH bpf-next v7 03/15] selftests/bpf: test_xsk: Fix __testapp_validate_traffic()'s return value Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251031-xsk-v7-3-39fe486593a3@bootlin.com> References: <20251031-xsk-v7-0-39fe486593a3@bootlin.com> In-Reply-To: <20251031-xsk-v7-0-39fe486593a3@bootlin.com> To: =?utf-8?q?Bj=C3=B6rn_T=C3=B6pel?= , Magnus Karlsson , Maciej Fijalkowski , Jonathan Lemon , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer Cc: Thomas Petazzoni , Alexis Lothore , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, "Bastien Curutchet (eBPF Foundation)" X-Mailer: b4 0.14.2 X-Last-TLS-Session-Version: TLSv1.3 __testapp_validate_traffic is supposed to return an integer value that tells if the test passed (0), failed (-1) or was skiped (2). It actually returns a boolean in the end. This doesn't harm when the test is successful but can lead to misinterpretation in case of failure as 1 will be returned instead of -1. Return TEST_FAILURE (-1) in case of failure, TEST_PASS (0) otherwise. Reviewed-by: Maciej Fijalkowski Signed-off-by: Bastien Curutchet (eBPF Foundation) --- tools/testing/selftests/bpf/test_xsk.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/test_xsk.c b/tools/testing/selftes= ts/bpf/test_xsk.c index 679491b6b9dd80ccb2b92729141fb8715b874c6d..8d7c38eb32ca3537cb019f120c3= 350ebd9f8c6bc 100644 --- a/tools/testing/selftests/bpf/test_xsk.c +++ b/tools/testing/selftests/bpf/test_xsk.c @@ -1725,7 +1725,10 @@ static int __testapp_validate_traffic(struct test_sp= ec *test, struct ifobject *i testapp_clean_xsk_umem(ifobj2); } =20 - return !!test->fail; + if (test->fail) + return TEST_FAILURE; + + return TEST_PASS; } =20 static int testapp_validate_traffic(struct test_spec *test) --=20 2.51.0