From patchwork Fri Jul 28 13:21:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1814291 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=IuoqpBrB; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=qBNPAgUk; 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 4RC7bJ5141z1ybX for ; Fri, 28 Jul 2023 23:22:20 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 38E303CE658 for ; Fri, 28 Jul 2023 15:22:18 +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 [IPv6:2001:4b78:1:20::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 46C023CE657 for ; Fri, 28 Jul 2023 15:21:27 +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 8FD3A600731 for ; Fri, 28 Jul 2023 15:21:24 +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 CB022219C4; Fri, 28 Jul 2023 13:21:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1690550483; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Pi2iQGNf4NUfpRw1mamk5MnBJAUBqTjib7lwXuxytRs=; b=IuoqpBrB29CLnwYkZPV4YvhZ1VOgAexQaSiwQdv+6m5cMZdfmu53VeUWnQwYWte5K2MIJK HAjkX1/JQyOrrCRvCdJ3M/B20mcick+jRwNu1qwmINGCDAxUEdxVlCh6+qElHSQvR/rZ3s DY63bu2t6X/4BvExx0wnyf/+JU8wpMo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1690550483; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Pi2iQGNf4NUfpRw1mamk5MnBJAUBqTjib7lwXuxytRs=; b=qBNPAgUkonbWAMENKYWzZEEIbyiMl3H2TBwap4WYQBkNJNFw77Ks+8yib4We0h/4sxjs8o 4c49qyECXjmW4/Bw== 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 91104133F7; Fri, 28 Jul 2023 13:21:23 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 6JfIINPAw2RKBgAAMHmgww (envelope-from ); Fri, 28 Jul 2023 13:21:23 +0000 From: Petr Vorel To: ltp@lists.linux.it Date: Fri, 28 Jul 2023 15:21:14 +0200 Message-ID: <20230728132120.17322-2-pvorel@suse.cz> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230728132120.17322-1-pvorel@suse.cz> References: <20230728132120.17322-1-pvorel@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 1.0.1 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 shortcircuit=no autolearn=disabled version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on in-2.smtp.seeweb.it Subject: [LTP] [PATCH 1/4] lib: shell: Add TST_SKIP_IN_LOCKDOWN=1 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" And tst_lockdown_enabled.c helper. Detection is needed for insmod01.sh. Signed-off-by: Petr Vorel --- doc/test-writing-guidelines.txt | 2 +- testcases/lib/.gitignore | 1 + testcases/lib/Makefile | 2 +- testcases/lib/tst_lockdown_enabled.c | 12 ++++++++++++ testcases/lib/tst_test.sh | 6 +++++- 5 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 testcases/lib/tst_lockdown_enabled.c diff --git a/doc/test-writing-guidelines.txt b/doc/test-writing-guidelines.txt index 6d1a69165..367fa780b 100644 --- a/doc/test-writing-guidelines.txt +++ b/doc/test-writing-guidelines.txt @@ -392,7 +392,7 @@ https://github.com/linux-test-project/ltp/wiki/Shell-Test-API[Shell Test API]. | '.setup' | 'TST_SETUP' | '.skip_filesystems' | 'TST_SKIP_FILESYSTEMS' | '.skip_in_compat' | – -| '.skip_in_lockdown' | – +| '.skip_in_lockdown' | 'TST_SKIP_IN_LOCKDOWN' | '.skip_in_secureboot' | – | '.supported_archs' | not applicable | '.tags' | – diff --git a/testcases/lib/.gitignore b/testcases/lib/.gitignore index a8573922d..b824767f7 100644 --- a/testcases/lib/.gitignore +++ b/testcases/lib/.gitignore @@ -10,6 +10,7 @@ /tst_get_unused_port /tst_hexdump /tst_kvcmp +/tst_lockdown_enabled /tst_net_iface_prefix /tst_net_ip_prefix /tst_net_vars diff --git a/testcases/lib/Makefile b/testcases/lib/Makefile index 14728bf89..3094aa463 100644 --- a/testcases/lib/Makefile +++ b/testcases/lib/Makefile @@ -13,6 +13,6 @@ MAKE_TARGETS := tst_sleep tst_random tst_checkpoint tst_rod tst_kvcmp\ tst_getconf tst_supported_fs tst_check_drivers tst_get_unused_port\ tst_get_median tst_hexdump tst_get_free_pids tst_timeout_kill\ tst_check_kconfigs tst_cgctl tst_fsfreeze tst_ns_create tst_ns_exec\ - tst_ns_ifmove + tst_ns_ifmove tst_lockdown_enabled include $(top_srcdir)/include/mk/generic_leaf_target.mk diff --git a/testcases/lib/tst_lockdown_enabled.c b/testcases/lib/tst_lockdown_enabled.c new file mode 100644 index 000000000..0e40c428c --- /dev/null +++ b/testcases/lib/tst_lockdown_enabled.c @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright (c) 2023 Petr Vorel + */ + +#define TST_NO_DEFAULT_MAIN +#include "tst_test.h" + +int main(void) +{ + return !tst_lockdown_enabled(); +} diff --git a/testcases/lib/tst_test.sh b/testcases/lib/tst_test.sh index 55133666d..afcf66b20 100644 --- a/testcases/lib/tst_test.sh +++ b/testcases/lib/tst_test.sh @@ -678,7 +678,7 @@ tst_run() CHECKPOINT_WAIT|CHECKPOINT_WAKE);; CHECKPOINT_WAKE2|CHECKPOINT_WAKE_AND_WAIT);; DEV_EXTRA_OPTS|DEV_FS_OPTS|FORMAT_DEVICE|MOUNT_DEVICE);; - SKIP_FILESYSTEMS);; + SKIP_FILESYSTEMS|SKIP_IN_LOCKDOWN);; *) tst_res TWARN "Reserved variable TST_$_tst_i used!";; esac done @@ -698,6 +698,10 @@ tst_run() [ "$TST_NEEDS_ROOT" = 1 ] && tst_require_root + if [ "$TST_SKIP_IN_LOCKDOWN" = 1 ] && tst_lockdown_enabled; then + tst_brk TCONF "Kernel is locked down, skipping test" + fi + [ "$TST_DISABLE_APPARMOR" = 1 ] && tst_disable_apparmor [ "$TST_DISABLE_SELINUX" = 1 ] && tst_disable_selinux From patchwork Fri Jul 28 13:21:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1814288 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=TV4yh58P; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=pEhkLqY8; 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) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RC7ZY1Bxgz1ybX for ; Fri, 28 Jul 2023 23:21:41 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 19DBE3CDBD1 for ; Fri, 28 Jul 2023 15:21:38 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-6.smtp.seeweb.it (in-6.smtp.seeweb.it [IPv6:2001:4b78:1:20::6]) (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 87F223CD696 for ; Fri, 28 Jul 2023 15:21:25 +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-6.smtp.seeweb.it (Postfix) with ESMTPS id 946EF1400E56 for ; Fri, 28 Jul 2023 15:21:24 +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 09F391F8AC; Fri, 28 Jul 2023 13:21:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1690550484; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TZ+r6DQ3rXgfxpBm5H3IVJ6nyeJKP/6IkkLMxc66EH8=; b=TV4yh58PBimX9xt/w1TOA008xYpY2cXrNPb+o4+z+pJEG3yYSbywTvaFWbweF0bU/GgILm oNMQTn5uKHZjWtfvFoMQQ+ImdOsaBFz3l2iHnAJdKi09X/AIH/96i4lVVWkPUTz5rK8dMh TScNJ52cdvk8m0rzlJSMaht7eIZIjm4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1690550484; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TZ+r6DQ3rXgfxpBm5H3IVJ6nyeJKP/6IkkLMxc66EH8=; b=pEhkLqY80FheFkWWrjrApMxVJzsv9L3eZU8Bp63EvHAL2sXNEZbk44uJfQD4RKg059JENt 4t+SrNGKvlt1yCAw== 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 D6F81133F7; Fri, 28 Jul 2023 13:21:23 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id cA2gMtPAw2RKBgAAMHmgww (envelope-from ); Fri, 28 Jul 2023 13:21:23 +0000 From: Petr Vorel To: ltp@lists.linux.it Date: Fri, 28 Jul 2023 15:21:15 +0200 Message-ID: <20230728132120.17322-3-pvorel@suse.cz> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230728132120.17322-1-pvorel@suse.cz> References: <20230728132120.17322-1-pvorel@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 1.0.1 at in-6.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 shortcircuit=no autolearn=disabled version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on in-6.smtp.seeweb.it Subject: [LTP] [PATCH 2/4] lib: shell: Add TST_SKIP_IN_SECUREBOOT=1 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" And tst_secureboot_enabled.c helper. Detection is needed for insmod01.sh. Signed-off-by: Petr Vorel --- doc/test-writing-guidelines.txt | 2 +- testcases/lib/.gitignore | 1 + testcases/lib/Makefile | 2 +- testcases/lib/tst_secureboot_enabled.c | 12 ++++++++++++ testcases/lib/tst_test.sh | 6 +++++- 5 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 testcases/lib/tst_secureboot_enabled.c diff --git a/doc/test-writing-guidelines.txt b/doc/test-writing-guidelines.txt index 367fa780b..4ee9199ab 100644 --- a/doc/test-writing-guidelines.txt +++ b/doc/test-writing-guidelines.txt @@ -393,7 +393,7 @@ https://github.com/linux-test-project/ltp/wiki/Shell-Test-API[Shell Test API]. | '.skip_filesystems' | 'TST_SKIP_FILESYSTEMS' | '.skip_in_compat' | – | '.skip_in_lockdown' | 'TST_SKIP_IN_LOCKDOWN' -| '.skip_in_secureboot' | – +| '.skip_in_secureboot' | 'TST_SKIP_IN_SECUREBOOT' | '.supported_archs' | not applicable | '.tags' | – | '.taint_check' | – diff --git a/testcases/lib/.gitignore b/testcases/lib/.gitignore index b824767f7..e8afd06f3 100644 --- a/testcases/lib/.gitignore +++ b/testcases/lib/.gitignore @@ -19,6 +19,7 @@ /tst_ns_ifmove /tst_random /tst_rod +/tst_secureboot_enabled /tst_sleep /tst_supported_fs /tst_timeout_kill diff --git a/testcases/lib/Makefile b/testcases/lib/Makefile index 3094aa463..990b46089 100644 --- a/testcases/lib/Makefile +++ b/testcases/lib/Makefile @@ -13,6 +13,6 @@ MAKE_TARGETS := tst_sleep tst_random tst_checkpoint tst_rod tst_kvcmp\ tst_getconf tst_supported_fs tst_check_drivers tst_get_unused_port\ tst_get_median tst_hexdump tst_get_free_pids tst_timeout_kill\ tst_check_kconfigs tst_cgctl tst_fsfreeze tst_ns_create tst_ns_exec\ - tst_ns_ifmove tst_lockdown_enabled + tst_ns_ifmove tst_lockdown_enabled tst_secureboot_enabled include $(top_srcdir)/include/mk/generic_leaf_target.mk diff --git a/testcases/lib/tst_secureboot_enabled.c b/testcases/lib/tst_secureboot_enabled.c new file mode 100644 index 000000000..7c26fb118 --- /dev/null +++ b/testcases/lib/tst_secureboot_enabled.c @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright (c) 2023 Petr Vorel + */ + +#define TST_NO_DEFAULT_MAIN +#include "tst_test.h" + +int main(void) +{ + return !tst_secureboot_enabled(); +} diff --git a/testcases/lib/tst_test.sh b/testcases/lib/tst_test.sh index afcf66b20..b5b38f524 100644 --- a/testcases/lib/tst_test.sh +++ b/testcases/lib/tst_test.sh @@ -678,7 +678,7 @@ tst_run() CHECKPOINT_WAIT|CHECKPOINT_WAKE);; CHECKPOINT_WAKE2|CHECKPOINT_WAKE_AND_WAIT);; DEV_EXTRA_OPTS|DEV_FS_OPTS|FORMAT_DEVICE|MOUNT_DEVICE);; - SKIP_FILESYSTEMS|SKIP_IN_LOCKDOWN);; + SKIP_FILESYSTEMS|SKIP_IN_LOCKDOWN|SKIP_IN_SECUREBOOT);; *) tst_res TWARN "Reserved variable TST_$_tst_i used!";; esac done @@ -698,6 +698,10 @@ tst_run() [ "$TST_NEEDS_ROOT" = 1 ] && tst_require_root + if [ "$TST_SKIP_IN_SECUREBOOT" = 1 ] && tst_secureboot_enabled; then + tst_brk TCONF "SecureBoot enabled, skipping test" + fi + if [ "$TST_SKIP_IN_LOCKDOWN" = 1 ] && tst_lockdown_enabled; then tst_brk TCONF "Kernel is locked down, skipping test" fi From patchwork Fri Jul 28 13:21:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1814290 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=Ajj2yaKT; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=qscLp82E; 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 4RC7b201wpz1ybX for ; Fri, 28 Jul 2023 23:22:05 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id BA56C3CD696 for ; Fri, 28 Jul 2023 15:22:03 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-6.smtp.seeweb.it (in-6.smtp.seeweb.it [217.194.8.6]) (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 066E93CE657 for ; Fri, 28 Jul 2023 15:21:25 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) (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-6.smtp.seeweb.it (Postfix) with ESMTPS id E65A01400E4A for ; Fri, 28 Jul 2023 15:21:24 +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 398371F8AF; Fri, 28 Jul 2023 13:21:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1690550484; 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=OusCX+1LcdXdto1/2S+lb+/xP7eLdxapw9ZryzT/oVU=; b=Ajj2yaKTeHDvjkZHKQRDMXv+NrQkiUMOIVD7qflV1UVzH4xPyNsLZWmSehKleNSxWWX35O pu7gCjOYnehWhLMeMVp/lF4aW5DgV5Mbe4qKnF0AX/tvCXfwlKoPGCqPL+6GaHePD9f91g P+6qwRmE3AP+vnLoAK8ozLKDO2yfh8c= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1690550484; 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=OusCX+1LcdXdto1/2S+lb+/xP7eLdxapw9ZryzT/oVU=; b=qscLp82EAUmkzOwiAHo89jSxm9WL3ILCw2bGq1SRbVL28STianqwAag+d/LypftladWipC tiqBeu+YUOudxVCA== 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 0ECF8139BD; Fri, 28 Jul 2023 13:21:24 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id aNaCAtTAw2RKBgAAMHmgww (envelope-from ); Fri, 28 Jul 2023 13:21:24 +0000 From: Petr Vorel To: ltp@lists.linux.it Date: Fri, 28 Jul 2023 15:21:16 +0200 Message-ID: <20230728132120.17322-4-pvorel@suse.cz> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230728132120.17322-1-pvorel@suse.cz> References: <20230728132120.17322-1-pvorel@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 1.0.1 at in-6.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 shortcircuit=no autolearn=disabled version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on in-6.smtp.seeweb.it Subject: [LTP] [PATCH 3/4] insmod01.sh: Skip test on lockdown and secure boot 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" Lockdown patchset and secure boot does not allow to install LTP kernel module: insmod: ERROR: could not insert module ltp_insmod01.ko: Operation not permitted insmod01 1 TFAIL: insmod failed Therefore skip the test on them (similar to C tests in 56660bd61). Link: https://bugzilla.opensuse.org/show_bug.cgi?id=1208920 Signed-off-by: Petr Vorel --- testcases/commands/insmod/insmod01.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/testcases/commands/insmod/insmod01.sh b/testcases/commands/insmod/insmod01.sh index 1881ba389..992b4a05a 100755 --- a/testcases/commands/insmod/insmod01.sh +++ b/testcases/commands/insmod/insmod01.sh @@ -1,6 +1,7 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0-or-later # Copyright (c) 2016 Fujitsu Ltd. +# Copyright (c) Linux Test Project, 2016-2023 # Author: Guangwen Feng # # Test basic functionality of insmod command. @@ -10,6 +11,8 @@ TST_TESTFUNC=do_test TST_NEEDS_ROOT=1 TST_NEEDS_CMDS="rmmod insmod" TST_NEEDS_MODULE="ltp_insmod01.ko" +TST_SKIP_IN_LOCKDOWN=1 +TST_SKIP_IN_SECUREBOOT=1 inserted=0 From patchwork Fri Jul 28 13:21:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1814289 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=v9TxCqkk; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=Xc3DeV9p; 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 4RC7Zm6WJxz1ybX for ; Fri, 28 Jul 2023 23:21:52 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 6AAE63CE65E for ; Fri, 28 Jul 2023 15:21:50 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-7.smtp.seeweb.it (in-7.smtp.seeweb.it [217.194.8.7]) (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 A10B33CD732 for ; Fri, 28 Jul 2023 15:21:25 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) (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-7.smtp.seeweb.it (Postfix) with ESMTPS id 1E06620004B for ; Fri, 28 Jul 2023 15:21:24 +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 6F2341F8B0; Fri, 28 Jul 2023 13:21:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1690550484; 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=0iMGCJsTc8CN83i2GbAAzqYGmVWFsX82L8JjN8mBOBk=; b=v9TxCqkkBL1wz/D+x+nI70vwyYysX1JzJrazP3WTxZAXC9tK4lumkeb/yLxK33BYau/gO/ QD+Gi8L27UalP37WwBcc1YF+rRR3bGiEX7b9iquf2UotgxotQ27R5OhCD6xyK3YT1J3hND U8zNpF8nfUmqvaOXvaDJnhdJui2eqVw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1690550484; 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=0iMGCJsTc8CN83i2GbAAzqYGmVWFsX82L8JjN8mBOBk=; b=Xc3DeV9p2VhgArejiCq/nh/yPQAWyK+ryu6G0LjFs5AIncOf69BiB50jKQMSheLxyPxQcs 0ffguK1Elv+KZRAw== 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 36FDB133F7; Fri, 28 Jul 2023 13:21:24 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id CIoCDNTAw2RKBgAAMHmgww (envelope-from ); Fri, 28 Jul 2023 13:21:24 +0000 From: Petr Vorel To: ltp@lists.linux.it Date: Fri, 28 Jul 2023 15:21:17 +0200 Message-ID: <20230728132120.17322-5-pvorel@suse.cz> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230728132120.17322-1-pvorel@suse.cz> References: <20230728132120.17322-1-pvorel@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 1.0.1 at in-7.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 shortcircuit=no autolearn=disabled version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on in-7.smtp.seeweb.it Subject: [LTP] [PATCH 4/4] doc/shell-API: Document TST_SKIP_IN_{LOCKDOWN, SECUREBOOT}=1 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" Signed-off-by: Petr Vorel Reviewed-by: Martin Doucha --- doc/shell-test-api.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/shell-test-api.txt b/doc/shell-test-api.txt index dde170644..4cf630dab 100644 --- a/doc/shell-test-api.txt +++ b/doc/shell-test-api.txt @@ -821,3 +821,8 @@ TST_NEEDS_KCONFIGS="CONFIG_EXT4_FS, CONFIG_QUOTACTL=y" . tst_test.sh ------------------------------------------------------------------------------- + +1.8 Skipping test based on system state +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Test can be skipped on various conditions: on enabled SecureBoot +('TST_SKIP_IN_SECUREBOOT=1'), lockdown ('TST_SKIP_IN_LOCKDOWN=1').