Skip to contentSkip to conversation

loop/011: skip if running on kernel older than v6.9.11

PATCH Superseded Nilay Shroff 2 participants 3 messages Aug 1, 2024 – Aug 2, 2024 Block layer

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 loop/011: skip if running on kernel older than v6.9.11

The loop/011 is regression test for commit 5f75e081ab5c ("loop: Disable fallocate() zero and discard if not supported") which requires minimum kernel version 6.9.11. So running this test on kernel version older than v6.9.11 would FAIL. This patch ensures that we skip running loop/011 if kernel version is older than v6.9.11.

---
Changes from v1:
- loop/011 requires minimum kernel version 6.9.11 (Cyril, Shinichiro)

---
 tests/loop/011 | 1 +
 1 file changed, 1 insertion(+)
tests/loop/011 +1 -0
index 35eb39b..a454848 100755
@@ -9,6 +9,7 @@
 DESCRIPTION="Make sure unsupported backing file fallocate does not fill dmesg with errors"
 
 requires() {
+	_have_kver 6 9 11
 	_have_program mkfs.ext2
 }
 
Signature · 1 line
2.45.2
#1 lore raw
Quoted 20 lines · Nilay Shroff

The loop/011 is regression test for commit 5f75e081ab5c ("loop: Disable fallocate() zero and discard if not supported") which requires minimum kernel version 6.9.11. So running this test on kernel version older than v6.9.11 would FAIL. This patch ensures that we skip running loop/011 if kernel version is older than v6.9.11.

---
Changes from v1:
- loop/011 requires minimum kernel version 6.9.11 (Cyril, Shinichiro)

---
  tests/loop/011 | 1 +
  1 file changed, 1 insertion(+)
tests/loop/011 +0 -0
index 35eb39b..a454848 100755

tests/loop/011 line 14

Quoted 6 lines
tests/loop/011 +1 -0
@@ -9,6 +9,7 @@
  DESCRIPTION="Make sure unsupported backing file fallocate does not fill dmesg with errors"
 
  requires() {
+	_have_kver 6 9 11
  	_have_program mkfs.ext2
  }

Please add a comment in tests/loop/011 that explains why the kernel version check is present.

Thanks,

Bart.

#2 lore raw
Quoted 16 lines · Bart Van Assche
Quoted 15 lines · Nilay Shroff

The loop/011 is regression test for commit 5f75e081ab5c ("loop: Disable fallocate() zero and discard if not supported") which requires minimum kernel version 6.9.11. So running this test on kernel version older than v6.9.11 would FAIL. This patch ensures that we skip running loop/011 if kernel version is older than v6.9.11.

---
   Changes from v1:
     - loop/011 requires minimum kernel version 6.9.11 (Cyril, Shinichiro)
---
  tests/loop/011 | 1 +

  1 file changed, 1 insertion(+)
Quoted 14 lines
Quoted 10 lines
tests/loop/011 +0 -0
index 35eb39b..a454848 100755
@@ -9,6 +9,7 @@

  DESCRIPTION="Make sure unsupported backing file fallocate does not fill dmesg with errors" requires() {
+    _have_kver 6 9 11
      _have_program mkfs.ext2
  }

Please add a comment in tests/loop/011 that explains why the kernel version check is present.

OK, I will add a relevant comment and resend the patch.

Thanks,
--Nilay