From patchwork Wed May 4 06:27:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 1626080 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=dop6W6V2; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KtRkc6Pvcz9sGC for ; Wed, 4 May 2022 16:29:28 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9FC063857825 for ; Wed, 4 May 2022 06:29:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9FC063857825 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1651645766; bh=gxCI/+So+Dq8DgsgKFHRfs+2u/5/6nEnDs5n1v0f4zQ=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=dop6W6V26Goys2OgOcTkCoCoUuw2zdowUEiYrlHV/y28wjKkCGZqDbV7GVuQvKQCT /ZubvjKh1gmD9R+G8ewtb8Q94HBqtdmVwjko1B9RLyU2cVZ9OgGxIMiPv+nRzsIa9t XGdzmBOYYEcE8fRvqnswHSac2NTPSUf4t6b1selE= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70071.outbound.protection.outlook.com [40.107.7.71]) by sourceware.org (Postfix) with ESMTPS id 7A2A7385742D for ; Wed, 4 May 2022 06:27:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7A2A7385742D ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=DkyFO/8fr4rtJBMTm/+I3le3LGOwIHDHz3+gzHqiIwFdnaVVspKZesB7JajlOA5tDQpY4dXz7K2BaxghGhN4DgLtwbomrZeqV1q3lAqjyKnNZWy25XRcbIHLvP8D/TTNnOtxCtkv9R8NKKDd2YO/c5YwdarnsDTG9QiDgt03DyaeP7Ow21vRud3HhMvKB1qnYCXYCdNQpqtrMImcfhKB9tcHG2j//Lxft5ZfMtKM/32TsrTMuhQzaeIPQWQjfyamTxdl4kIe1xp2xrNZjv/56JZ7xTNA/ZGeWDBtUV+3o5mjJrHFsWRdn8WaDeQpwf40ffuJT6DS8iZmXiL9XLjsuw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=gxCI/+So+Dq8DgsgKFHRfs+2u/5/6nEnDs5n1v0f4zQ=; b=Ru6VuTWw11PVngcUXe4UmO/R8W2Md5rqC0JtQ+4IL0slvfNLPR0BKJotF4uySGl+ps2LJMdInamey2dTFPitKrG+XDNBbqXHovS8vRhU2FOwc6EAPaM8adtAhCBidip2aWSmKh82HcFnhFiw66TMTqiqp5Q8UyMIMKwkz4QqYpnBSo8lciKId9RXk9yS4i4n7/ghyOqPBWgVGHap/m0Er+tWJHSPNb+EzrqBWsGIHJsjbP46kMsywUP617uC137eSxWeZb69Usvd4z7umUcyhP07fObN+uxY7SWKMnQlGvw0qWoyQg9DCFunJuA16c1w5l9Lcz48+Y5sXecety7XEw== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1, 1, smtp.mailfrom=arm.com] dmarc=[1, 1, header.from=arm.com]) Received: from DB7PR05CA0020.eurprd05.prod.outlook.com (2603:10a6:10:36::33) by AS8PR08MB6727.eurprd08.prod.outlook.com (2603:10a6:20b:393::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5206.24; Wed, 4 May 2022 06:27:19 +0000 Received: from DB5EUR03FT055.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:36:cafe::ad) by DB7PR05CA0020.outlook.office365.com (2603:10a6:10:36::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5206.25 via Frontend Transport; Wed, 4 May 2022 06:27:19 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT055.mail.protection.outlook.com (10.152.21.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5227.15 via Frontend Transport; Wed, 4 May 2022 06:27:19 +0000 Received: ("Tessian outbound 9511859e950a:v118"); Wed, 04 May 2022 06:27:19 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 41fa2def13464aa5 X-CR-MTA-TID: 64aa7808 Received: from cf6f7dce3374.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id FDCB50BB-96E0-432D-A9F3-886326EB5ADF.1; Wed, 04 May 2022 06:27:12 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id cf6f7dce3374.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 04 May 2022 06:27:12 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U/D/Ife/W2gVLQ0+eCqr6BnsGTup75j7itahhCHqtEeZj/C7wNm4JZHEHxgjk9Pk8nFScPjHezUVu4LMNCgIK3h6kD5amYKmedEcuL2i3wPymdncIthSSjyyNB6JpWugc6aCI2hPVn1jgGV6PdfS7PxyG1QejVLWf6YHbq8TaxtHhIZYKCTy0YZHuOVFwVGvKUpo7Sz3fnToc/QzKiW2Eme+a79sGZTf76mAXiHPnNZ5KTdDT3s47qw9DJO/rvb0gbioD2+hpeiFtr66xzbbRKmtaK6aGCB8GiRx/QihL+CGn3ncKaGeoHRYxp6FJ4OagQyRHbCHdN/e6OlGRubKZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=gxCI/+So+Dq8DgsgKFHRfs+2u/5/6nEnDs5n1v0f4zQ=; b=Kp1/GySe7h0eCdO1Vo6yrmc7nuxs5mH4Po7wwElfvhlTPn0sL1R3W1OZvTv7mP1MMv8x/HSz7KS4nG4Qo55PiQ89nM+V9POyY+XeR8yzDXtRAxrmdjPgvtTOPS6l09w4kbJSD1yXLMj051rPvcAyje2z5xRxlzr+x5aLTMqDZ+yVud67ZjbNcjkBCk1+JfEx9PpvDE98LJPeerH0PEMJNMRHi2aA47L/dBgLJGt5EEiO8nhR6hj1CmvXU2pyF/9ShCG0PvoqZL9ftk/auwA1oWCexdPoXaiGwYltk8IIz+GR8BEV/Bc+dqgdvmmF3zDvU2iqLLQ4ZUE3vV9ep1vrnw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none Received: from DU2PR04CA0270.eurprd04.prod.outlook.com (2603:10a6:10:28e::35) by AM0PR08MB5396.eurprd08.prod.outlook.com (2603:10a6:208:182::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5206.12; Wed, 4 May 2022 06:27:09 +0000 Received: from DBAEUR03FT053.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:28e:cafe::bf) by DU2PR04CA0270.outlook.office365.com (2603:10a6:10:28e::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5206.25 via Frontend Transport; Wed, 4 May 2022 06:27:09 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; Received: from nebula.arm.com (40.67.248.234) by DBAEUR03FT053.mail.protection.outlook.com (100.127.142.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5227.15 via Frontend Transport; Wed, 4 May 2022 06:27:09 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Wed, 4 May 2022 06:27:09 +0000 Received: from armchair.cambridge.arm.com (10.2.80.71) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2308.27 via Frontend Transport; Wed, 4 May 2022 06:27:09 +0000 To: Subject: [PATCH v4 3/4] linux: Add a getauxval test [BZ #23293] Date: Wed, 4 May 2022 07:27:05 +0100 Message-ID: <671e2f493e59ae35b68d5c72fc0f6865bf1d562b.1651643916.git.szabolcs.nagy@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-Correlation-Id: 7a7bc408-50b9-4ed8-4943-08da2d972410 X-MS-TrafficTypeDiagnostic: AM0PR08MB5396:EE_|DB5EUR03FT055:EE_|AS8PR08MB6727:EE_ X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: TWvHG/K8T3SAcTl7fiTZV4E5xr7BXvkOiXJ5ni/DtrnhHUn7CisXA00Dqqm/aru2m7WmX7qMO9LBhsTPvpfI44zpmHB5CtokjxdQz1MOytVGNXnxBmHtHjkn9a51gtZAk8Ish7uj34+cr1k8IUUEGOzI+FDnNRpY95JHxjAxB9dUkDDvqKTPvNpr/HIzyBIoSr7z/tv2ZPpUkb5K+ElwPk3N+4MMVZ1kA/XmPlxLCrd7bo50bqQNZ1BBh1Kn8XeL6cMPIXEvR8Uf9omkEU0wxwdG3sMt8taQbYFRVBWOe8bc9QSvi+qfWgbABgu4Do6ZvW7qzoChqff42/PUsVhbUObSsHPBHjF5ti9AGTqvCom8dvSTV94KMwBRKQuzWetH9r8z4fM15xuEnq9zUewz1izuq+3XALuJlkXW/1UfDNEWVPsCYbk86gkcXoAmIsjBtZgmY6sdRazhzx0WPSPQGn1sPCx+CVqjxqlvesNgewcmrKwOBsmpx7VRkSFp0hladz0pG2sTbizLIGAAHyK4ooyjtw+uCBGqJnaCzD1bQtaksRQZCEIsAjcZYtbFPFR0lVi3sQ2CAfmtTrSGj/a07/OPZoBZYNSvFhrhEu3jFNzzHdEED0ksTfcaxtdgGTLgGO/y84WwEMte3wnreOFrZqM4Olriba8mOadvMjMOrMC3TqvBp6J75e2O/sATsB1B5iRNsziLVVn7RRjqosyW5qS6UaJkS8uiMxBSLXzPAM1PdGE9VAaE1DO76c2gIFxcmbg6WJ0mVcBlzOlYBoBe6jT1o1Uuo2F2bjbqKYfBUuqo9cXv09/jpKiXh46ztmSv X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230001)(4636009)(36840700001)(40470700004)(46966006)(70206006)(8676002)(508600001)(70586007)(86362001)(6916009)(316002)(26005)(186003)(426003)(336012)(47076005)(7696005)(356005)(6666004)(2616005)(40460700003)(36860700001)(81166007)(82310400005)(8936002)(36756003)(44832011)(5660300002)(2906002)(2004002)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB5396 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT055.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 8f9e10a8-8e8d-4857-7fe8-08da2d971e05 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iy3am8Dzvm9Vj6RuNwK395KKnVtd8YbMC9OKGsZMkrsnKcgmek3KyMtp8zw1nqReZsA/dylk2NI3TrzWFGJO6zXR+Z6s4OzlI1jHSsM+jEW4j6so7eh/un5mBRTxlO4T+wZL+UOIP6jp587S30OLiSrTs4nafHtppNfsqjNUvre33e49YnVRIfFJ/sqxF+G+wDH/yAHbGSN2L1hKNk3g/UsQQzqwToiftKvUxRF5to9a/p6yCgB+tX7dMs9qMW+HK/LgFDj02x3h0LuDtNKGYA1zrazwOaMgcU25eM3iFtTHEp5MwqjnLSEfVf2yo++M/jOs/tNBk9aUMZfcTgYs6MZxU+NTtPZrq+wvtJe+RyQ48rgArvLGWmrWV4Lt8pe8zqnmM8ecjtl2bZ0lJRwlEm67g3Er20eIwznq3swKRqUNq4KXpIN5attYfe1zmqCkDcC20O2WV8MqRUOQ37KmsZkqao5V/kbNTx71HkoWoaBsPaEwtR5FIqn2zzggO4sy4oqd7wzZv2z8+TjULJRSgZhrReNvW1kPzPS9KWwLa4/oy+F2RiSceTXa9/eR8P7+n5vBGLJjIGwDfCqDuS/r9Db1kQGLJI0P8ICH+iuLAXQ88kBVOruFKWEYiFEA6VdoQ5XkP0RlOfGisOrmEIQTBdc83wgc5XMuRzdHheihvN7K3I0gwmkpRbqszrHIz3RyMAKTGmHje2Dmqh4Bzdup32dTcdCCZP+oo6AkR4oCNjhJHtybzI/LRnT7cn+tWgdR4r2JBI3BVJIQ3y+3/p7Usg3hgL5kNl0eFkRxp4xL1F4= X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230001)(4636009)(46966006)(40470700004)(36840700001)(86362001)(70586007)(8676002)(508600001)(70206006)(6666004)(186003)(6916009)(316002)(336012)(47076005)(426003)(81166007)(2616005)(7696005)(26005)(40460700003)(82310400005)(36860700001)(36756003)(8936002)(44832011)(5660300002)(2906002)(2004002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 May 2022 06:27:19.4548 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7a7bc408-50b9-4ed8-4943-08da2d972410 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DB5EUR03FT055.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6727 X-Spam-Status: No, score=-12.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Szabolcs Nagy via Libc-alpha From: Szabolcs Nagy Reply-To: Szabolcs Nagy Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" This is for bug 23293 and it relies on the glibc test system running tests via explicit ld.so invokation by default. Reviewed-by: Florian Weimer --- v4: - New patch. --- sysdeps/unix/sysv/linux/Makefile | 1 + sysdeps/unix/sysv/linux/tst-getauxval.c | 74 +++++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/tst-getauxval.c diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index ca953804d0..89cb005c7d 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -126,6 +126,7 @@ tests += tst-clone tst-clone2 tst-clone3 tst-fanotify tst-personality \ tst-prctl \ tst-scm_rights \ tst-epoll \ + tst-getauxval \ # tests # For +depfiles in Makerules. diff --git a/sysdeps/unix/sysv/linux/tst-getauxval.c b/sysdeps/unix/sysv/linux/tst-getauxval.c new file mode 100644 index 0000000000..c4b6195743 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tst-getauxval.c @@ -0,0 +1,74 @@ +/* Basic test for getauxval. + Copyright (C) 2022 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include +#include + +static int missing; +static int mismatch; + +static void +check_nonzero (unsigned long t, const char *s) +{ + unsigned long v = getauxval (t); + printf ("%s: %lu (0x%lx)\n", s, v, v); + if (v == 0) + missing++; +} + +static void +check_eq (unsigned long t, const char *s, unsigned long want) +{ + unsigned long v = getauxval (t); + printf ("%s: %lu want: %lu\n", s, v, want); + if (v != want) + mismatch++; +} + +#define NZ(x) check_nonzero (x, #x) +#define EQ(x, want) check_eq (x, #x, want) + +static int +do_test (void) +{ + /* These auxv entries should be non-zero on Linux. */ + NZ (AT_PHDR); + NZ (AT_PHENT); + NZ (AT_PHNUM); + NZ (AT_PAGESZ); + NZ (AT_ENTRY); + NZ (AT_CLKTCK); + NZ (AT_RANDOM); + NZ (AT_EXECFN); + if (missing) + FAIL_EXIT1 ("Found %d missing auxv entries.\n", missing); + + /* Check against syscalls. */ + EQ (AT_UID, getuid ()); + EQ (AT_EUID, geteuid ()); + EQ (AT_GID, getgid ()); + EQ (AT_EGID, getegid ()); + if (mismatch) + FAIL_EXIT1 ("Found %d mismatching auxv entries.\n", mismatch); + + return 0; +} + +#include