diff mbox series

[PATCHv2,blktests] loop/011: skip if running on kernel older than v6.9.11

Message ID 20240801092904.1258520-1-nilay@linux.ibm.com (mailing list archive)
State New, archived
Headers show
Series [PATCHv2,blktests] loop/011: skip if running on kernel older than v6.9.11 | expand

Commit Message

Nilay Shroff Aug. 1, 2024, 9:28 a.m. UTC
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.

Link: https://lore.kernel.org/all/20240731111804.1161524-1-nilay@linux.ibm.com/
Signed-off-by: Nilay Shroff <nilay@linux.ibm.com>
---
  Changes from v1:
    - loop/011 requires minimum kernel version 6.9.11 (Cyril, Shinichiro)
---
 tests/loop/011 | 1 +
 1 file changed, 1 insertion(+)

Comments

Bart Van Assche Aug. 1, 2024, 4:22 p.m. UTC | #1
On 8/1/24 2:28 AM, Nilay Shroff wrote:
> 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.
> 
> Link: https://lore.kernel.org/all/20240731111804.1161524-1-nilay@linux.ibm.com/
> Signed-off-by: Nilay Shroff <nilay@linux.ibm.com>
> ---
>    Changes from v1:
>      - loop/011 requires minimum kernel version 6.9.11 (Cyril, Shinichiro)
> ---
>   tests/loop/011 | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/tests/loop/011 b/tests/loop/011
> index 35eb39b..a454848 100755
> --- a/tests/loop/011
> +++ b/tests/loop/011
> @@ -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.
Nilay Shroff Aug. 2, 2024, 5:32 a.m. UTC | #2
On 8/1/24 21:52, Bart Van Assche wrote:
> On 8/1/24 2:28 AM, Nilay Shroff wrote:
>> 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.
>>
>> Link: https://lore.kernel.org/all/20240731111804.1161524-1-nilay@linux.ibm.com/
>> Signed-off-by: Nilay Shroff <nilay@linux.ibm.com>
>> ---
>>    Changes from v1:
>>      - loop/011 requires minimum kernel version 6.9.11 (Cyril, Shinichiro)
>> ---
>>   tests/loop/011 | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/tests/loop/011 b/tests/loop/011
>> index 35eb39b..a454848 100755
>> --- a/tests/loop/011
>> +++ b/tests/loop/011
>> @@ -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
diff mbox series

Patch

diff --git a/tests/loop/011 b/tests/loop/011
index 35eb39b..a454848 100755
--- a/tests/loop/011
+++ b/tests/loop/011
@@ -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
 }