From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9206173180 for ; Thu, 14 Mar 2024 19:12:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710443570; cv=none; b=gM1dmq5zcmWJKoohXmfcA/lfWvWBC6zx6N94RVRPUN4mHolVSTIY8e05Q2gTA+SnmmpNRdMMsAINo7Z1WNOsWTaSpDtmlaYUIv/bs6+neyRp7LF20X80FVU4Pp6NW8f+ynefmwUDYJCgRKbL4nnGeCL7aj6/Jl+SmF6ZYxE0PZ0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710443570; c=relaxed/simple; bh=30UYA/dIFmVOIJNufHWJHVXCymF9KKjGbNi90QLYofQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=MU36ttkq+7xeo0BUK5Gjg0jXnTXVR0BAz4vnGnPU7z2L28BejpTm3G0hJAGM5581No8zPNvwRVRKpMwNdGe8YHPaQzKSjjo+sIGJA2hNUq7pkkazTS7q1wakDWw7WvD+4YO3SyCVFVUSWMN4m04eKFZFXznFTtQl1r1+Jo+yUz8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=oJr8V8B7; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="oJr8V8B7" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=J/ZlIGYNWXERJglhltXzdLL0xNWz0lmko5KPiQDkJSM=; b=oJr8V8B7kf4CuDHV6TSAWxO1x4 rYvssE+z3/ZQCz1vc6ivvfmk+jhBle3mvr2PbaL8VccBzcS+A9n/ligUmyC/0xMuAs/QzthxjV834 rlW8C6XRzTukTQwGw6+M0H51b76VTu+Na7SiHX8z53+SgYoQO0oeriQpcjHGfdwlHyO9Kyk2HqtUv jSw65sa9pMdpWqkgCthrqRjJs51XBTEPUj4e1BkudBZQgPLlk2J4D9JY5d/L9sLo29TqroWqaWQi9 rDQcu0cvNykouQcGpwRv42aAnlnLRwqbICEh2nQTbKQj6XfeEQ7x/K3nYWRekAWsTTHEm5AwjdbXy cKyE/Ybw==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rkqVT-0000000FSIz-3rTs; Thu, 14 Mar 2024 19:12:47 +0000 From: Luis Chamberlain To: chuck.lever@oracle.com, kdevops@lists.linux.dev Cc: Luis Chamberlain Subject: [RFT] fstests: add support to dynamically skip tests Date: Thu, 14 Mar 2024 12:12:46 -0700 Message-ID: <20240314191247.3683717-1-mcgrof@kernel.org> X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Luis Chamberlain Sometimes you just want to skip a few tests from the command line, example use case: make fstests-baseline SKIP_TESTS="generic/002,generic/003" Signed-off-by: Luis Chamberlain --- Please test. Works for me. playbooks/roles/fstests/defaults/main.yml | 5 +++++ playbooks/roles/fstests/tasks/main.yml | 9 +++++++++ workflows/fstests/Makefile | 5 +++++ 3 files changed, 19 insertions(+) diff --git a/playbooks/roles/fstests/defaults/main.yml b/playbooks/roles/fstests/defaults/main.yml index b0d9e0da1732..1d14568a03d0 100644 --- a/playbooks/roles/fstests/defaults/main.yml +++ b/playbooks/roles/fstests/defaults/main.yml @@ -15,6 +15,11 @@ dynamic_limit_tests: fstests_start_after: False fstests_start_after_test: "" + +fstests_skip_tests_enable: False +fstests_skip_tests: "" +fstests_skip_tests_args: "" + fstests_initial_baseline: False fstests_initial_baseline_args: "" diff --git a/playbooks/roles/fstests/tasks/main.yml b/playbooks/roles/fstests/tasks/main.yml index b76536ecf4f6..386dc11014c8 100644 --- a/playbooks/roles/fstests/tasks/main.yml +++ b/playbooks/roles/fstests/tasks/main.yml @@ -895,6 +895,13 @@ - fstests_start_after|bool tags: [ 'oscheck', 'fstests', 'run_tests', 'checktime' ] +- name: Expand tests to skip tests dynamically passed on the command line + set_fact: + fstests_skip_tests_args: "-e {{ fstests_skip_tests }}" + when: + - fstests_skip_tests_enable|bool + tags: [ 'oscheck', 'fstests', 'run_tests', 'checktime' ] + - name: Verify use of START_AFTER tags: [ 'oscheck', 'fstests', 'run_tests', 'kdevops_fstests_setup', 'install' , 'generate-fstests-config' ] ansible.builtin.fail: @@ -1077,6 +1084,7 @@ vars: fstests_section: "{{ ansible_host | regex_replace(kdevops_host_prefix + '-') | regex_replace('-dev') | regex_replace('-', '_') }}" initial_baseline_expunges: "{{ fstests_initial_baseline_args | trim }}" + skip_tests_args: "{{ fstests_skip_tests_args | trim }}" tags: [ 'oscheck', 'fstests', 'run_tests' ] become: yes become_flags: 'su - -c' @@ -1091,6 +1099,7 @@ {{ oscheck_extra_args }} {{ all_limit_tests }} {{ initial_baseline_expunges }} + {{ skip_tests_args }} ignore_errors: yes no_log: True args: diff --git a/workflows/fstests/Makefile b/workflows/fstests/Makefile index 734c8837d302..cb09ef26f1aa 100644 --- a/workflows/fstests/Makefile +++ b/workflows/fstests/Makefile @@ -144,6 +144,11 @@ DYNAMIC_RUNTIME_VARS += , "fstests_start_after": True DYNAMIC_RUNTIME_VARS += , "fstests_start_after_test": "$(START_AFTER)" endif +ifneq (,$(SKIP_TESTS)) +DYNAMIC_RUNTIME_VARS += , "fstests_skip_tests_enable": True +DYNAMIC_RUNTIME_VARS += , "fstests_skip_tests": "$(SKIP_TESTS)" +endif + ifeq (y,$(CONFIG_DEVCONFIG_ENABLE_SYSTEMD_JOURNAL_REMOTE)) FSTESTS_BASELINE_EXTRA += journal-ln endif -- 2.43.0