From patchwork Fri May 5 16:28:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1777707 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=f832s8dU; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=q1UmR6kR; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QCbj10r7cz214G for ; Sat, 6 May 2023 02:28:37 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id B80D73CB6AC for ; Fri, 5 May 2023 18:28:34 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-2.smtp.seeweb.it (in-2.smtp.seeweb.it [217.194.8.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id B77C23CB67E for ; Fri, 5 May 2023 18:28:33 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) (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 in-2.smtp.seeweb.it (Postfix) with ESMTPS id 168A2601BC5 for ; Fri, 5 May 2023 18:28:32 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 554F321C38; Fri, 5 May 2023 16:28:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1683304112; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=ftM8YDWYSazkNgAt3x2BvHZq+FBZcGXJuzP/Ysk5W4s=; b=f832s8dUKOLCDWgNOBeeGpoaO8E1C+2IvIC1xD116mV6VsBOx7aTlBPSR0cZuX4E28gn4F KxdDyJJn1/5TmFDcX1I+6FU6JkTFnDEQYrd5c9oXFTGRmgi+MpXeLinISherc7Xc3yEjdj VUF6a0bPSkhunPMSHBozjWTkt1AsGqQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1683304112; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=ftM8YDWYSazkNgAt3x2BvHZq+FBZcGXJuzP/Ysk5W4s=; b=q1UmR6kR1O7urHPc+cFF3qeRqzeG28zEysl4EDFzJAbm+mIPHrc2xXLBfq/WwK7mYvbgri AB9GW80FeOBc0EAQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 0F53313488; Fri, 5 May 2023 16:28:32 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id nd4UALAuVWR/KgAAMHmgww (envelope-from ); Fri, 05 May 2023 16:28:32 +0000 From: Petr Vorel To: ltp@lists.linux.it Date: Fri, 5 May 2023 18:28:22 +0200 Message-Id: <20230505162822.15676-1-pvorel@suse.cz> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-2.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_SOFTFAIL, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-2.smtp.seeweb.it Subject: [LTP] [PATCH] endian_switch01: Add HAVE_GETAUXVAL guarder X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" From: Petr Vorel This fixes compilation on uClibc / uClibc-ng (and also older glibc), which does not provide this header. Fixes: 03b76a20c ("endian_switch01.c: drop unused main4()") Signed-off-by: Petr Vorel --- Hi Jan, can you please have a look, I'd prefer to merge this before release (build fix on Buildroot). Kind regards, Petr testcases/kernel/syscalls/switch/endian_switch01.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/testcases/kernel/syscalls/switch/endian_switch01.c b/testcases/kernel/syscalls/switch/endian_switch01.c index d965aed56..fac9e2382 100644 --- a/testcases/kernel/syscalls/switch/endian_switch01.c +++ b/testcases/kernel/syscalls/switch/endian_switch01.c @@ -2,7 +2,7 @@ /* * Copyright (c) International Business Machines Corp., 2008 * Copyright (c) Paul Mackerras, IBM Corp., 2008 - * Copyright (c) 2018 Linux Test Project + * Copyright (c) 2018-2023 Linux Test Project */ /* @@ -15,16 +15,20 @@ #include #include #include -#include #include #include + #include "tst_test.h" #if defined(__powerpc64__) || defined(__powerpc__) + # ifndef PPC_FEATURE_TRUE_LE -# define PPC_FEATURE_TRUE_LE 0x00000002 +# define PPC_FEATURE_TRUE_LE 0x00000002 # endif +# ifdef HAVE_GETAUXVAL +# include + /* * Make minimal call to 0x1ebe. If we get ENOSYS then syscall is not * available, likely because of: @@ -98,6 +102,10 @@ static struct tst_test test = { .forks_child = 1, }; +# else +TST_TEST_TCONF("Toolchain does not have "); +# endif /* HAVE_GETAUXVAL */ + #else /* defined (__powerpc64__) || (__powerpc__) */ TST_TEST_TCONF("This system does not support running of switch() syscall"); #endif