Message ID | 20231007-nolibc-auxval-pagesz-v1-1-af00804edead@weissschuh.net |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:403:3b70:6f57 with SMTP id x8csp847547vqo; Sat, 7 Oct 2023 03:19:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHuAGcMtPilDNcQJ46nDgTxV/6PRZkm7fvNIsZTESPgcmYSwKiWWwK0Vt5VTFWfCH8spsPE X-Received: by 2002:a05:6808:1783:b0:3a9:307a:62aa with SMTP id bg3-20020a056808178300b003a9307a62aamr12765205oib.22.1696673960838; Sat, 07 Oct 2023 03:19:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696673960; cv=none; d=google.com; s=arc-20160816; b=SjW21BCvGK1hBS9ZLWMZvep0wXkJ1fOUHPoxGp8mhTvndkjv8/o1+GlBA6e6EuVNf/ azdLPKzWUtCIIl8qYnFA5DLIUhRDVZ2lbkStYyr8KyOXBQG1QoZH1UH7ABuQwcZGLbz4 mvTBhsygW4sGdoOlixJ0zXzSRsri/S2JJOegIz7ZhJ8TysAz3eZmotdqd/ABagUebrSP RYoCvJJygVuXB/9kyRzfI6pa4atmwDlevClrSmbHqNV9e4dstWUB2+SFozcLtCRsYnpG a0s1AsbUfwvbVqg7VtOpitIVJ9F7UpwF+DyQao9IqPJLSJWZKYQYAL1Nl5EQGfhyzGAy R6SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:message-id:content-transfer-encoding :mime-version:subject:date:from:dkim-signature; bh=KLsSLvW4/xylSQEEksnnbN0Ficirse7w+RsMvv/nCaE=; fh=iqVQbLBVb4Dgvchle8+RigR5TM2NNy3ZcTElwHZdP7k=; b=rahGJhIcErRUmg58y+v/ao4jjJ01IVfz/zSRX7J591+Fm+d+S2amFSHFEA/a8pLlG4 qHWH7A+vK2SaL/DMOQvI/1QwnrFU60nLVlzoz4iZZ8HUHNJ4bGMSQyK9syOaehxcdDuq 4ziSWhWYVg6tRTCsk+6H1trztUBmFcs8T9N4h8p1fQ+fLnYQxRPOjPBGbyHQ6gi3vtVf lYSolmTn/7WVdxUeAZf19nlX0/OjBWY0UaP4TxVIJINVSyDC5TZQiJpn4HQR91wEkuy3 Zr11H6AzOFLUEoTYVBhdHxGvoGqrc+UdPmnv/ki6JjG4x7rp96Gm/ZRPqITYsRuLk8RN 3wwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=aHoe7zob; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id g190-20020a636bc7000000b0056336fb99aasi5331749pgc.850.2023.10.07.03.19.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Oct 2023 03:19:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=aHoe7zob; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 6647A804A620; Sat, 7 Oct 2023 03:19:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343799AbjJGKTF (ORCPT <rfc822;ezelljr.billy@gmail.com> + 18 others); Sat, 7 Oct 2023 06:19:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343765AbjJGKTF (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 7 Oct 2023 06:19:05 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [IPv6:2a01:4f8:c010:41de::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D968A9E; Sat, 7 Oct 2023 03:19:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1696673940; bh=0nHMkbE1NZHL4kOKXvOG9pMkoOdKDasdfTGrknqLkcA=; h=From:Date:Subject:To:Cc:From; b=aHoe7zobf7eSMIIq3gbUhfsPgDaaW3Ac7qG2IF6Y7SUIpSPNycB4OWr2U1vzcUTY1 mkSYTPsjoxH9Bj+KMKZ4qVpshe7r63qExNX6Q4wZrmLIycsRYtrmWMGGIKCjZ+JLtn M1ElHGi1QmqclF0axObWUfFXR0KGINcQnx7FB31w= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= <linux@weissschuh.net> Date: Sat, 07 Oct 2023 12:18:55 +0200 Subject: [PATCH] tools/nolibc: drop test for getauxval(AT_PAGESZ) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20231007-nolibc-auxval-pagesz-v1-1-af00804edead@weissschuh.net> X-B4-Tracking: v=1; b=H4sIAI4wIWUC/x3MTQqAIBBA4avErBuwP6SuEi3MRhsIC6WQxLsnL b/FewkCeaYAU5XA08OBT1fQ1BXoXTlLyFsxtKLtGiEkuvPgVaO646MOvJSl8KIYzGCMHHWveyj p5clw/LfzkvMHfeR152YAAAA= To: Willy Tarreau <w@1wt.eu>, Shuah Khan <shuah@kernel.org>, Zhangjin Wu <falcon@tinylab.org> Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= <linux@weissschuh.net> X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1696673939; l=1537; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=0nHMkbE1NZHL4kOKXvOG9pMkoOdKDasdfTGrknqLkcA=; b=5r6m6itiG7A0Vk07TLV0NvoTWkMJCElvcxESSRuNmInyJacRMIp0FSqUcThS+R6eo9fY9YRXO OlixYaa/EwdDFgWDgLX9s5/YcDLj79fkJPNMmPIEQde7ghr6nwPIwoL X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Sat, 07 Oct 2023 03:19:17 -0700 (PDT) X-Spam-Level: ** X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779091595240663208 X-GMAIL-MSGID: 1779091595240663208 |
Series |
tools/nolibc: drop test for getauxval(AT_PAGESZ)
|
|
Commit Message
Thomas Weißschuh
Oct. 7, 2023, 10:18 a.m. UTC
The test will not work for systems with pagesize != 4096 like aarch64
and some others.
Other testcases are already testing the same functionality:
* auxv_AT_UID tests getauxval() in general.
* test_getpagesize() tests pagesize() which directly calls
getauxval(AT_PAGESZ).
Fixes: 48967b73f8fe ("selftests/nolibc: add testcases for startup code")
Cc: stable@vger.kernel.org
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
Note:
This should probably also make it into 6.6.
---
tools/testing/selftests/nolibc/nolibc-test.c | 1 -
1 file changed, 1 deletion(-)
---
base-commit: ab663cc32912914258bc8a2fbd0e753f552ee9d8
change-id: 20231007-nolibc-auxval-pagesz-05f5ff79c4c4
Best regards,
Comments
On Sat, Oct 07, 2023 at 12:18:55PM +0200, Thomas Weißschuh wrote: > The test will not work for systems with pagesize != 4096 like aarch64 > and some others. > > Other testcases are already testing the same functionality: > * auxv_AT_UID tests getauxval() in general. > * test_getpagesize() tests pagesize() which directly calls > getauxval(AT_PAGESZ). > > Fixes: 48967b73f8fe ("selftests/nolibc: add testcases for startup code") > Cc: stable@vger.kernel.org > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> > --- > Note: > > This should probably also make it into 6.6. Agreed, you should just push it to the fixes branch. Thanks! Willy
On 2023-10-07 12:36:20+0200, Willy Tarreau wrote: > On Sat, Oct 07, 2023 at 12:18:55PM +0200, Thomas Weißschuh wrote: > > The test will not work for systems with pagesize != 4096 like aarch64 > > and some others. > > > > Other testcases are already testing the same functionality: > > * auxv_AT_UID tests getauxval() in general. > > * test_getpagesize() tests pagesize() which directly calls > > getauxval(AT_PAGESZ). > > > > Fixes: 48967b73f8fe ("selftests/nolibc: add testcases for startup code") > > Cc: stable@vger.kernel.org > > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> > > --- > > Note: > > > > This should probably also make it into 6.6. > > Agreed, you should just push it to the fixes branch. Good point. 'fixes' now contains Ammar's alignment fix, the tree location update and this patch. Thomas
Hi, Thomas > The test will not work for systems with pagesize != 4096 like aarch64 > and some others. > We have used EXPECT_GE() instead of EXPECT_EQ(), so this should not fail, do I miss something ?;-) Thanks, Zhangjin Wu > Other testcases are already testing the same functionality: > * auxv_AT_UID tests getauxval() in general. > * test_getpagesize() tests pagesize() which directly calls > getauxval(AT_PAGESZ). > > Fixes: 48967b73f8fe ("selftests/nolibc: add testcases for startup code") > Cc: stable@vger.kernel.org > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> > --- > Note: > > This should probably also make it into 6.6. > --- > 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/selftests/nolibc/nolibc-test.c > index a3ee4496bf0a..7e3936c182dc 100644 > --- a/tools/testing/selftests/nolibc/nolibc-test.c > +++ b/tools/testing/selftests/nolibc/nolibc-test.c > @@ -630,7 +630,6 @@ int run_startup(int min, int max) > CASE_TEST(environ_HOME); EXPECT_PTRNZ(1, getenv("HOME")); break; > CASE_TEST(auxv_addr); EXPECT_PTRGT(test_auxv != (void *)-1, test_auxv, brk); break; > CASE_TEST(auxv_AT_UID); EXPECT_EQ(1, getauxval(AT_UID), getuid()); break; > - CASE_TEST(auxv_AT_PAGESZ); EXPECT_GE(1, getauxval(AT_PAGESZ), 4096); break; > case __LINE__: > return ret; /* must be last */ > /* note: do not set any defaults so as to permit holes above */ > > --- > base-commit: ab663cc32912914258bc8a2fbd0e753f552ee9d8 > change-id: 20231007-nolibc-auxval-pagesz-05f5ff79c4c4 > > Best regards, > -- > Thomas Weißschuh <linux@weissschuh.net>
Hi Zhangjin, On 2023-10-07 21:42:02+0800, Zhangjin Wu wrote: > > The test will not work for systems with pagesize != 4096 like aarch64 > > and some others. > > > > We have used EXPECT_GE() instead of EXPECT_EQ(), so this should not > fail, do I miss something ?;-) Indeed, I missed that, sorry for the noise. IMO we can still remove the testcase, but drop it from the fixes branch and adapt the commit message and Fixes tag. > Thanks, > Zhangjin Wu > > > Other testcases are already testing the same functionality: > > * auxv_AT_UID tests getauxval() in general. > > * test_getpagesize() tests pagesize() which directly calls > > getauxval(AT_PAGESZ). > > > > Fixes: 48967b73f8fe ("selftests/nolibc: add testcases for startup code") > > Cc: stable@vger.kernel.org > > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> > [..]
diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c index a3ee4496bf0a..7e3936c182dc 100644 --- a/tools/testing/selftests/nolibc/nolibc-test.c +++ b/tools/testing/selftests/nolibc/nolibc-test.c @@ -630,7 +630,6 @@ int run_startup(int min, int max) CASE_TEST(environ_HOME); EXPECT_PTRNZ(1, getenv("HOME")); break; CASE_TEST(auxv_addr); EXPECT_PTRGT(test_auxv != (void *)-1, test_auxv, brk); break; CASE_TEST(auxv_AT_UID); EXPECT_EQ(1, getauxval(AT_UID), getuid()); break; - CASE_TEST(auxv_AT_PAGESZ); EXPECT_GE(1, getauxval(AT_PAGESZ), 4096); break; case __LINE__: return ret; /* must be last */ /* note: do not set any defaults so as to permit holes above */