From nobody Thu Oct 2 02:15:05 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 655B7312827; Wed, 24 Sep 2025 14:50:30 +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=1758725432; cv=none; b=VwfHjnyZSiGEhsQYXNSmWssslA1auiUWyLQ4l98nmLThD+Ai6oD/6CjgHu6tlCin75CaYOBCWA+bl3qT6P8LCpmTFPHvAwwAGm4MYokjoWpcknfaduYOayI7VJKnnenMjg3bf9tueorVSph6T1pXuIMaKkYCU5+kDqG2q2FR7qc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758725432; c=relaxed/simple; bh=v4Hzeqdb7Z4hEux4t+JJgDM2laAqTJTu0/gQKSRMpIU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=iMovjJ3Dz8XeEsIWXSA5fbXvxbI+atZK0xD6WIWKVHpny9+rgl1RLhAxFLIB4WrUoYaeIiWYcoLWpM2rO+r9z3z3NiugWaMdCqhXZU7hwEgJAhiJpw+BLXj6eIJu/7eOfgW1OQRD4iA/t2prfUa9rXu0MF1NW1CQ0Mgb9fUIP8o= 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=jOZzbbPh; 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="jOZzbbPh" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id E8BAB4E40D58; Wed, 24 Sep 2025 14:50:28 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id BE9DD60634; Wed, 24 Sep 2025 14:50:28 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 31E5D102F1973; Wed, 24 Sep 2025 16:50:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1758725427; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=TK9L/dZGJ+Bzm/DsHznC4dwU9CdtNX9rrae1jJI01ds=; b=jOZzbbPhRLBxIB3iLegxUKAU6qJ02CoWyEszBFekwkike7c6Fb1yuONGw+w0l64OreZmh7 ZQ2LFXlIskjwRaYui9An4O/ximJGy2xymlkKpwZl7+nfuf21C3CIQJGH7vLy0L3msLpDug fupHvVFxVFr0pWda8uGM7/K/hnljDNFb6WITWbViybxpjasx9ByIdXkGQUhr6ZT3v8ITbk Fm1odY2EQLw1Pcwq/C7tLm187FyOwBdKJ0B7hSZgoRtYZCKFioHsH+U+A7P7Nu8EHorGKE 7+KAh8oMTmC3womKVIUgaJQ5fZMaoBjDEvXS0e5XU//RtarDAp63McSdeuVSqQ== From: "Bastien Curutchet (eBPF Foundation)" Date: Wed, 24 Sep 2025 16:49:45 +0200 Subject: [PATCH bpf-next v4 10/15] 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: <20250924-xsk-v4-10-20e57537b876@bootlin.com> References: <20250924-xsk-v4-0-20e57537b876@bootlin.com> In-Reply-To: <20250924-xsk-v4-0-20e57537b876@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 0adb6c0b948f6216b24d0562bcda26097dbb9dbc..2c955e1099439c377cd28f5a9be= 2a17e65d49f78 100644 --- a/tools/testing/selftests/bpf/test_xsk.c +++ b/tools/testing/selftests/bpf/test_xsk.c @@ -1096,7 +1096,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 @@ -1112,7 +1112,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__); @@ -1255,13 +1255,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.51.0