From nobody Mon Feb 9 14:38:42 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 434E3C7EE2F for ; Mon, 12 Jun 2023 20:50:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237975AbjFLUur (ORCPT ); Mon, 12 Jun 2023 16:50:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236908AbjFLUry (ORCPT ); Mon, 12 Jun 2023 16:47:54 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A46A171E for ; Mon, 12 Jun 2023 13:46:48 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D265462F19 for ; Mon, 12 Jun 2023 20:45:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4E3B8C4332B; Mon, 12 Jun 2023 20:45:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686602717; bh=YVU6ViEp2LQfYkR6nErcvVF9nbi+sEIEq44A4g2Ftxc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z/o2kExgd26Xw+2rLZPzH96UptXHJ1CfLwRVO8+dBY+Db2nxb7NguhRpH4eZ/UB8O T7lVY1TKf5LRe3YaG41uC2bu+JSQwkd1RcBJSL9nV86eyHnexyc6QONab5DBXoBSQ2 WBioouK8JsTvLZrtJ9JIW8okCS3LdBSjovmlNtdmqrI63dQeTYVpIJebfNX1FA7laL l7Abo/Pbg6JJk7E4z7Dw3TcgYElgv2HWQbW23zJ/0m0myg6/vrOM+TghcD09QJAUaG QBLkRXWTn+Serkpnpjl0sTQRDblEsjfxo4gZ6hN041pZWquNSGQpnHTabBH0PaenbH 07YZU5m+LYmYg== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 149F4CE3A87; Mon, 12 Jun 2023 13:45:16 -0700 (PDT) From: "Paul E. McKenney" To: linux-kernel@vger.kernel.org Cc: gwml@vger.gnuweeb.org, kernel-team@meta.com, w@lwt.eu, =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , Willy Tarreau , "Paul E . McKenney" Subject: [PATCH v2 nolibc 42/53] selftests/nolibc: remove test gettimeofday_null Date: Mon, 12 Jun 2023 13:45:03 -0700 Message-Id: <20230612204514.292087-42-paulmck@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <8b757cc0-3719-4e63-a755-9710384137bc@paulmck-laptop> References: <8b757cc0-3719-4e63-a755-9710384137bc@paulmck-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thomas Wei=C3=9Fschuh gettimeofday() is not guaranteed by posix to handle a NULL value as first argument gracefully. On glibc for example it crashes. (When not going through the vdso) Link: https://lore.kernel.org/lkml/96f1134d-ce6e-4d82-ae00-1cd4038809c4@t-8= ch.de/ Signed-off-by: Thomas Wei=C3=9Fschuh Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney --- tools/testing/selftests/nolibc/nolibc-test.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/s= elftests/nolibc/nolibc-test.c index bfcbc05e6b5b..cfc7b270c397 100644 --- a/tools/testing/selftests/nolibc/nolibc-test.c +++ b/tools/testing/selftests/nolibc/nolibc-test.c @@ -589,7 +589,6 @@ int run_syscall(int min, int max) CASE_TEST(fork); EXPECT_SYSZR(1, test_fork()); break; CASE_TEST(getdents64_root); EXPECT_SYSNE(1, test_getdents64("/"), -1);= break; CASE_TEST(getdents64_null); EXPECT_SYSER(1, test_getdents64("/dev/null= "), -1, ENOTDIR); break; - CASE_TEST(gettimeofday_null); EXPECT_SYSZR(1, gettimeofday(NULL, NULL));= break; #ifdef NOLIBC CASE_TEST(gettimeofday_bad1); EXPECT_SYSER(1, gettimeofday((void *)1, NU= LL), -1, EFAULT); break; CASE_TEST(gettimeofday_bad2); EXPECT_SYSER(1, gettimeofday(NULL, (void *= )1), -1, EFAULT); break; --=20 2.40.1