[PATCH 7/7] ci: add verify-trim.py test script

Vincent Fu <[email protected]>
Newsgroups org.kernel.vger.fio
Message-ID <[email protected]>
On GitHub Actions we cannot insert kernel modules, so skip this script
on tests that run with pull requests and after every push. Instead run
this test with our nightly tests that run in a QEMU environment.

Signed-off-by: Vincent Fu <[email protected]>
---
 .github/workflows/qemu.yml | 4 ++++
 ci/actions-full-test.sh    | 2 ++
 t/run-fio-tests.py         | 8 ++++++++
 3 files changed, 14 insertions(+)

diff --git a/.github/workflows/qemu.yml b/.github/workflows/qemu.yml
index db71fbe8..16787018 100644
--- a/.github/workflows/qemu.yml
+++ b/.github/workflows/qemu.yml
@@ -49,6 +49,10 @@ jobs:
               -device nvme-ns,id=nvm-1,drive=nvm-1,bus=nvme0,nsid=1,logical_block_size=4096,physical_block_size=4096,fdp.ruhs=0-63
             test_cmd: "nvme fdp status /dev/ng0n1 && python3 t/nvmept_fdp.py --fio ./fio --dut /dev/ng0n1"
             extra_pkgs: "nvme-cli"
+          - config: verify-trim
+            device:
+            test_cmd: "python3 t/verify-trim.py"
+            extra_pkgs: sg3-utils
           - config: ZBD
             device:
             test_cmd: "./t/zbd/run-tests-against-nullb"
diff --git a/ci/actions-full-test.sh b/ci/actions-full-test.sh
index 854788c1..4222a21a 100755
--- a/ci/actions-full-test.sh
+++ b/ci/actions-full-test.sh
@@ -10,10 +10,12 @@ main() {
 
     echo "Running long running tests..."
     export PYTHONUNBUFFERED="TRUE"
+    # We can't load modules so skip 1018 which requires null_blk
     skip=(
         6
 	1007
 	1008
+	1018
     )
     args=(
         --debug
diff --git a/t/run-fio-tests.py b/t/run-fio-tests.py
index 7ceda067..b4863297 100755
--- a/t/run-fio-tests.py
+++ b/t/run-fio-tests.py
@@ -1115,6 +1115,14 @@ TEST_LIST = [
         'success':          SUCCESS_LONG,
         'requirements':     [],
     },
+    {
+        'test_id':          1018,
+        'test_class':       FioExeTest,
+        'exe':              't/verify-trim.py',
+        'parameters':       ['-f', '{fio_path}'],
+        'success':          SUCCESS_DEFAULT,
+        'requirements':     [Requirements.linux],
+    },
 ]
 
 
-- 
2.47.2
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.