From nobody Fri Oct 3 07:40:37 2025 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (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 01F9B2FFDF1 for ; Thu, 4 Sep 2025 10:11:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756980702; cv=none; b=VJkiDtQ2Zb+JqtNtjXuxxyeaFIR1gBq2DiuEIpssecbcDKMaZke4PUbls1R9sLfgG/U0L7VtxnmmfjHVTDyukU4utb20OGXVgdMJnrrrrUtzQlUaHUmBxQQL6M8k49bxzYzc4dgsm7ECP3hfyS2+huIW+85ZokD0q1EQRRUjN6c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756980702; c=relaxed/simple; bh=pbQlyBzNHITQzd6CWr1gQ0jYLW1D3Z/wEudy+kGX6wY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=hcGJ0BEovdn11dXjhS9Mq1oo4sycKw2dbzENPXVepEyw4neiAOfI3O066RBrNI8e/UPfZq6MrqZGy5RZ5Hcn9p06U4t1qbWohZiY8UFDNQ8F1SJ6rvBBcN1AzbZ3/PoLhxKv74jQQxErBa5eUcnc09PjdTJYcFIhpGxZTO7qLmY= 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=Ge0U+N1k; arc=none smtp.client-ip=185.171.202.116 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="Ge0U+N1k" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 53B8EC6B39F; Thu, 4 Sep 2025 10:11:23 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 7C2DF606BB; Thu, 4 Sep 2025 10:11:38 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 882601C22DB98; Thu, 4 Sep 2025 12:11:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1756980697; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=Qp7BCTV9OjXfRKO/Rz8MBVxIk2UvFsted2clppcEz0o=; b=Ge0U+N1kysll8DayhZTHMB12XTJFvAO/rPK8yu0pDJZnB+L9FApagaRt2MAKrjjHyNhw9t +6nM+36Phazg2jYQtMKdU0vYvFNsZjO7/MaRs/Ks3neN+nJjo0ruziwuuDM1lsL7xs2f2A zQqBCRG4GHmmbdfsc+YaRxDUZfLlBQlMEUCldMBcjByBn4QGJHNywx233ypzhCbh4xXSH1 qwMwBvAdY6IPeefPPnasJgNX8vxwAhCHjPFncpnJbSbbigpTiwVjU86HJL5nHmvAQjDCms ocUv9Y/OcV26QAp6PtDTVKsWtIUfJUX74VDBSsw4kiKP/rbW74TkV+JwRXkqRA== From: "Bastien Curutchet (eBPF Foundation)" Date: Thu, 04 Sep 2025 12:10:23 +0200 Subject: [PATCH bpf-next v3 08/14] selftests/bpf: test_xsk: Don't exit immediately when gettimeofday fails 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: <20250904-xsk-v3-8-ce382e331485@bootlin.com> References: <20250904-xsk-v3-0-ce382e331485@bootlin.com> In-Reply-To: <20250904-xsk-v3-0-ce382e331485@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 exit_with_error() is called when gettimeofday() fails. This exits the program immediately. It prevents the following tests from being run and isn't compliant with the CI. Return TEST_FAILURE instead of calling exit_on_error(). Signed-off-by: Bastien Curutchet (eBPF Foundation) --- tools/testing/selftests/bpf/test_xsk.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/bpf/test_xsk.c b/tools/testing/selftes= ts/bpf/test_xsk.c index 6a9ad7a3a78667a1b70b688698103df3cae26c61..adefb50e2b08d923c412b17d7d3= 1300f7eb7a0e7 100644 --- a/tools/testing/selftests/bpf/test_xsk.c +++ b/tools/testing/selftests/bpf/test_xsk.c @@ -1106,7 +1106,7 @@ static int receive_pkts(struct test_spec *test) =20 ret =3D gettimeofday(&tv_now, NULL); if (ret) - exit_with_error(errno); + return TEST_FAILURE; =20 timeradd(&tv_now, &tv_timeout, &tv_end); =20 @@ -1122,7 +1122,7 @@ static int receive_pkts(struct test_spec *test) =20 ret =3D gettimeofday(&tv_now, NULL); if (ret) - exit_with_error(errno); + return TEST_FAILURE; =20 if (timercmp(&tv_now, &tv_end, >)) { ksft_print_msg("ERROR: [%s] Receive loop timed out\n", __func__); @@ -1265,13 +1265,13 @@ static int wait_for_tx_completion(struct xsk_socket= _info *xsk) =20 ret =3D gettimeofday(&tv_now, NULL); if (ret) - exit_with_error(errno); + return TEST_FAILURE; timeradd(&tv_now, &tv_timeout, &tv_end); =20 while (xsk->outstanding_tx) { ret =3D gettimeofday(&tv_now, NULL); if (ret) - exit_with_error(errno); + return TEST_FAILURE; if (timercmp(&tv_now, &tv_end, >)) { ksft_print_msg("ERROR: [%s] Transmission loop timed out\n", __func__); return TEST_FAILURE; --=20 2.50.1