From patchwork Wed Jan 25 22:27:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1731897 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=213.254.12.146; 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=n/NOpNWU; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=RhyDMrbz; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (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 4P2JP721b5z23h7 for ; Thu, 26 Jan 2023 09:27:23 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id A234B3CD3B4 for ; Wed, 25 Jan 2023 23:27:20 +0100 (CET) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-4.smtp.seeweb.it (in-4.smtp.seeweb.it [IPv6:2001:4b78:1:20::4]) (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 5FB473CC756 for ; Wed, 25 Jan 2023 23:27:08 +0100 (CET) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (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-4.smtp.seeweb.it (Postfix) with ESMTPS id 4844C1000676 for ; Wed, 25 Jan 2023 23:27:07 +0100 (CET) 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-out2.suse.de (Postfix) with ESMTPS id A98651F8A6; Wed, 25 Jan 2023 22:27:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1674685627; 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: in-reply-to:in-reply-to:references:references; bh=zf7eQgV4Eify6/XID5l0yM8TqRJE6L1wu5p02uhtlsY=; b=n/NOpNWUwgSuBB82mU/sqCpPvGEIxxIDo0TBoHjfhBLFf4H1uGIJsoxn0RhwxfcpTtitTJ mG80Dv22AaOPOXWovyne2mrQol1rJhgCo/jmARAiU7ee8SN9unR5WMy1qkM1e0Jg7QEKNX xTTF7XnPZr9Hplc+oeYlSW/VMBIleok= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1674685627; 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: in-reply-to:in-reply-to:references:references; bh=zf7eQgV4Eify6/XID5l0yM8TqRJE6L1wu5p02uhtlsY=; b=RhyDMrbz0R176A2MnwrPuFsfRloCWzDDwYUHtlpy0xVLR7uB9OC6BdhUanCUxsQbuN66FT 6Q84JhqDBhO1UiBA== 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 75E931339E; Wed, 25 Jan 2023 22:27:07 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id sCGaG7us0WPoNgAAMHmgww (envelope-from ); Wed, 25 Jan 2023 22:27:07 +0000 From: Petr Vorel To: ltp@lists.linux.it Date: Wed, 25 Jan 2023 23:27:03 +0100 Message-Id: <20230125222703.19943-3-pvorel@suse.cz> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230125222703.19943-1-pvorel@suse.cz> References: <20230125222703.19943-1-pvorel@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-4.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_PASS autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-4.smtp.seeweb.it Subject: [LTP] [PATCH 2/2] hugemmap15.c: Use TST_TEST_TCONF() for unsupported archs 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: , Cc: Richard Palethorpe Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" 15625f6185 broke LTP build at least on riscv32 and mipsel32 (and for any new arch in the future). Replace #error directive with TST_TEST_TCONF() fixes that. Fixes: 15625f6185 ("Hugetlb: Migrating libhugetlbfs icache-hygiene") Signed-off-by: Petr Vorel Reviewed-by: Cyril Hrubis --- testcases/kernel/mem/hugetlb/hugemmap/hugemmap15.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap15.c b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap15.c index 4730d8d184..836225acd8 100644 --- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap15.c +++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap15.c @@ -19,6 +19,13 @@ */ #define _GNU_SOURCE + +#include "hugetlb.h" +#if defined(__powerpc__) || defined(__powerpc64__) || defined(__ia64__) || \ + defined(__s390__) || defined(__s390x__) || defined(__sparc__) || \ + defined(__aarch64__) || (defined(__riscv) && __riscv_xlen == 64) || \ + defined(__i386__) || defined(__x86_64__) || defined(__arm__) + #include #include #include @@ -30,8 +37,6 @@ #include #include -#include "hugetlb.h" - #define SUCC_JMP 1 #define FAIL_JMP 2 #define COPY_SIZE 128 @@ -142,8 +147,6 @@ static void sig_handler(int signum, siginfo_t *si, void *uc) siglongjmp(sig_escape, FAIL_JMP + SIGSEGV); } #endif -#else -#error "Need to setup signal conditions for this arch" #endif } @@ -241,3 +244,6 @@ static struct tst_test test = { .test_all = run_test, .hugepages = {3, TST_NEEDS}, }; +#else + TST_TEST_TCONF("Architecture not supported"); +#endif