From patchwork Fri Jun 10 14:43:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Doucha X-Patchwork-Id: 1642002 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.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=t5k5bsbT; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=8ugGYU4a; dkim-atps=neutral Authentication-Results: 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=) 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 RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LKNxV5jfkz9s09 for ; Sat, 11 Jun 2022 00:43:26 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id C93373C9282 for ; Fri, 10 Jun 2022 16:43:24 +0200 (CEST) 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 E79A73C9002 for ; Fri, 10 Jun 2022 16:43:22 +0200 (CEST) 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 0A40B1000478 for ; Fri, 10 Jun 2022 16:43:17 +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-out2.suse.de (Postfix) with ESMTPS id 4D3761FF46 for ; Fri, 10 Jun 2022 14:43:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1654872197; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=gKxAa+O7vpFRiI7+9O/5uCkclUe2k+yzinY7if5e+Jw=; b=t5k5bsbTBHsGubxTdPbyg3fk7RmmJGOG6sVisl3PFhjLQSA5BKJ1LvMpGZ8rh9sZeVDv0D g1V5HvBF6H7xgy1DDHTvEPnb6mw+OpvemZwhPsIX63YGQbqPjjifrONfsb4rRY6YL57OAF M1+oO4WadvdM3LtS/zaKK6rka7R5lnQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1654872197; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=gKxAa+O7vpFRiI7+9O/5uCkclUe2k+yzinY7if5e+Jw=; b=8ugGYU4aTfb5JyFuEeLYOCHH95ZsuVHKJo8wtQwWlrEbSbDBDrB7I2MOluCm9cErBOMMk7 e+cLkwdXC4QNa7Cw== 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 3CB0F139ED for ; Fri, 10 Jun 2022 14:43:17 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id ps7iDYVYo2LraQAAMHmgww (envelope-from ) for ; Fri, 10 Jun 2022 14:43:17 +0000 From: Martin Doucha To: ltp@lists.linux.it Date: Fri, 10 Jun 2022 16:43:16 +0200 Message-Id: <20220610144316.1301-1-mdoucha@suse.cz> X-Mailer: git-send-email 2.36.1 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, T_SCC_BODY_TEXT_LINE 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 v2] configure: Check for KVM linker script support 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" Some toolchains don't fully support the KVM linker scripts. Disable KVM tests if linker check fails in configure script. Signed-off-by: Martin Doucha --- Changes since v1: - Set empty CFLAGS to avoid linking failure with -m32 configure.ac | 17 +++++++++++++++++ include/mk/features.mk.in | 3 +++ testcases/kernel/Makefile | 5 ++++- 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 816ebf820..69b145b5f 100644 --- a/configure.ac +++ b/configure.ac @@ -397,6 +397,23 @@ LTP_CHECK_TASKSTATS test "x$with_tirpc" = xyes && LTP_CHECK_TIRPC LTP_DETECT_HOST_CPU +AC_MSG_CHECKING([whether linker can handle KVM payloads]) +ltp_backup_ldflags="$LDFLAGS" +ltp_backup_flags="$[]_AC_LANG_PREFIX[]FLAGS" +LDFLAGS="-T ${srcdir}/testcases/kernel/kvm/linker/${HOST_CPU}.lds" +_AC_LANG_PREFIX[]FLAGS= +AC_LINK_IFELSE([AC_LANG_PROGRAM()], + [ + AC_MSG_RESULT([yes]) + AC_SUBST([WITH_KVM_TESTSUITE],["yes"]) + ], + [ + AC_MSG_RESULT([no]) + AC_SUBST([WITH_KVM_TESTSUITE],["no"]) + ]) +_AC_LANG_PREFIX[]FLAGS="$ltp_backup_flags" +LDFLAGS="$ltp_backup_ldflags" + AC_OUTPUT cat << EOF diff --git a/include/mk/features.mk.in b/include/mk/features.mk.in index ecb15a0f7..802ee0ba8 100644 --- a/include/mk/features.mk.in +++ b/include/mk/features.mk.in @@ -52,3 +52,6 @@ WITH_REALTIME_TESTSUITE := no else WITH_REALTIME_TESTSUITE := @WITH_REALTIME_TESTSUITE@ endif + +# Enable testcases/kernel/kvm compile and install? +WITH_KVM_TESTSUITE := @WITH_KVM_TESTSUITE@ diff --git a/testcases/kernel/Makefile b/testcases/kernel/Makefile index c0fa24147..bf890e175 100644 --- a/testcases/kernel/Makefile +++ b/testcases/kernel/Makefile @@ -29,7 +29,6 @@ SUBDIRS += connectors \ io \ ipc \ irq \ - kvm \ logging \ mem \ numa \ @@ -45,6 +44,10 @@ ifeq ($(WITH_POWER_MANAGEMENT_TESTSUITE),yes) SUBDIRS += power_management endif +ifeq ($(WITH_KVM_TESTSUITE),yes) +SUBDIRS += kvm +endif + endif ifeq ($(ANDROID),1)