Skip to contentSkip to conversation

test_robind: add "-f" mkfs option for xfs and btrfs

PATCH New Boyang Xue 5 participants 9 messages May 24, 2016 – Jun 21, 2016

lore
Share & tools
lore

Boyang Xue

author
#0 lore raw

PATCH 1/1 test_robind: add "-f" mkfs option for xfs and btrfs

Add "-f" mkfs option for xfs and btrfs to aid the failure in creating filesystem due to commit a7f854472ebc ("tst_mkfs: drop -f from mkfs").

---
 testcases/kernel/fs/fs_readonly/test_robind.sh | 4 ++++
 1 file changed, 4 insertions(+)
testcases/kernel/fs/fs_readonly/test_robind.sh +4 -0
index dfe6f7e..181ae9e 100755
@@ -198,6 +198,10 @@ for fstype in $FSTYPES; do
 		opts="-f --journal-size 513 -q"
 	elif echo "$fstype" | grep -q "ext"; then
 		opts="-F"
+	elif [ "$fstype" = "xfs" ]; then
+		opts="-f"
+	elif [ "$fstype" = "btrfs" ]; then
+		opts="-f"
 	fi
 
 	if [ "$fstype" != "ramfs" ]; then
Signature · 1 line
2.8.3
#1 lore raw

PATCH 1/1 test_robind: add "-f" mkfs option for xfs and btrfs

----- Original Message -----

Quoted 9 lines

From: "Boyang Xue" <[email protected]>
To: [email protected]
Sent: Tuesday, 24 May, 2016 9:49:36 AM
Subject: [LTP] [PATCH v1 1/1] test_robind: add "-f" mkfs option for xfs and btrfs

Add "-f" mkfs option for xfs and btrfs to aid the failure in creating filesystem due to commit a7f854472ebc ("tst_mkfs: drop -f from mkfs").

Alternative would be to zero-erase first blocks of LTP_BIG_DEV in runltp, but I'm not sure we want to assume that all tests are going to write over it.

I found only 3 tests using LTP_BIG_DEV, this is the only one that is using xfs/btrfs, the other two are ext3/4.

So, this is fine by me, ACK.
@Stanislav: Any thoughts?

Regards,
Jan

Quoted 27 lines
---
 testcases/kernel/fs/fs_readonly/test_robind.sh | 4 ++++
 1 file changed, 4 insertions(+)
testcases/kernel/fs/fs_readonly/test_robind.sh +4 -1
index dfe6f7e..181ae9e 100755
@@ -198,6 +198,10 @@ for fstype in $FSTYPES; do
 		opts="-f --journal-size 513 -q"
 	elif echo "$fstype" | grep -q "ext"; then
 		opts="-F"
+	elif [ "$fstype" = "xfs" ]; then
+		opts="-f"
+	elif [ "$fstype" = "btrfs" ]; then
+		opts="-f"
 	fi
 
 	if [ "$fstype" != "ramfs" ]; then
--

2.8.3

--
Mailing list info: https://lists.linux.it/listinfo/ltp

#2 lore raw

PATCH 1/1 test_robind: add "-f" mkfs option for xfs and btrfs

Hi!

Quoted 6 lines

Alternative would be to zero-erase first blocks of LTP_BIG_DEV in runltp, but I'm not sure we want to assume that all tests are going to write over it.

I found only 3 tests using LTP_BIG_DEV, this is the only one that is using xfs/btrfs, the other two are ext3/4.

Or we can move the dd that erases first blocks from tst_acquire_device() to tst_mkfs().

Or we can create an API function to get the path to big device and erase it there...

Signature · 2 lines
Cyril Hrubis
[email protected]
#3 lore raw

PATCH 1/1 test_robind: add "-f" mkfs option for xfs and btrfs

----- Original Message -----

Quoted 11 lines

From: "Cyril Hrubis" <[email protected]>
To: "Jan Stancek" <[email protected]>
Cc: "Boyang Xue" <[email protected]>, "stanislav kholmanskikh" <[email protected]>, [email protected]
Sent: Tuesday, 24 May, 2016 5:26:22 PM
Subject: Re: [LTP] [PATCH v1 1/1] test_robind: add "-f" mkfs option for xfs and btrfs

Hi!

Quoted 4 lines

Alternative would be to zero-erase first blocks of LTP_BIG_DEV in runltp, but I'm not sure we want to assume that all tests are going to write over it.

Quoted 5 lines
Quoted 2 lines

I found only 3 tests using LTP_BIG_DEV, this is the only one that is using xfs/btrfs, the other two are ext3/4.

Or we can move the dd that erases first blocks from tst_acquire_device() to tst_mkfs().

I went to re-read why we are avoiding -f, and this does sound better than adding -f back.

Regards,
Jan

Quoted 8 lines

Or we can create an API function to get the path to big device and erase it there...

--
Cyril Hrubis
[email protected]

#4 lore raw

PATCH 1/1 test_robind: add "-f" mkfs option for xfs and btrfs

Quoted 16 lines · Jan Stancek

----- Original Message -----

Quoted 11 lines

From: "Cyril Hrubis" <[email protected]>
To: "Jan Stancek" <[email protected]>
Cc: "Boyang Xue" <[email protected]>, "stanislav kholmanskikh" <[email protected]>, [email protected]
Sent: Tuesday, 24 May, 2016 5:26:22 PM
Subject: Re: [LTP] [PATCH v1 1/1] test_robind: add "-f" mkfs option for xfs and btrfs

Hi!

Quoted 4 lines

Alternative would be to zero-erase first blocks of LTP_BIG_DEV in runltp, but I'm not sure we want to assume that all tests are going to write over it.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

I found only 3 tests using LTP_BIG_DEV, this is the only one that is using xfs/btrfs, the other two are ext3/4.

Or we can move the dd that erases first blocks from tst_acquire_device() to tst_mkfs().

I went to re-read why we are avoiding -f, and this does sound better than adding -f back.

If we move 'dd' to tst_mkfs(), then tst_acquire_device will return "uncleared" devices, and mkfs_ext* test cases from runtest/commands will start failing in our environment, i.e. we revert f79021c5d168256.

I'd ack the patch, since it affects only one test case.

Quoted 12 lines

Regards,
Jan

Quoted 8 lines

Or we can create an API function to get the path to big device and erase it there...

--
Cyril Hrubis
[email protected]

#5 lore raw

PATCH 1/1 test_robind: add "-f" mkfs option for xfs and btrfs

Hi!

Quoted 9 lines
Quoted 5 lines
Quoted 2 lines

Or we can move the dd that erases first blocks from tst_acquire_device() to tst_mkfs().

I went to re-read why we are avoiding -f, and this does sound better than adding -f back.

If we move 'dd' to tst_mkfs(), then tst_acquire_device will return "uncleared" devices, and mkfs_ext* test cases from runtest/commands will start failing in our environment, i.e. we revert f79021c5d168256.

Well the mkfs testcase is special in a sense that it calls the mkfs directly. So we may as well move the dd to tst_mfks() and do separate dd in the mkfs testcase.

But doing 'git grep mkfs' reveals that we have more tests that call mkfs directly and may start to fail in this case. :(

Signature · 2 lines
Cyril Hrubis
[email protected]
#6 lore raw

PATCH 1/1 test_robind: add "-f" mkfs option for xfs and btrfs

In reply to Stanislav Kholmanskikh

Hi,

Quoted 25 lines · Stanislav Kholmanskikh
Quoted 22 lines · Jan Stancek

----- Original Message -----

Quoted 16 lines

From: "Cyril Hrubis" <[email protected]>
To: "Jan Stancek" <[email protected]>
Cc: "Boyang Xue" <[email protected]>, "stanislav kholmanskikh" <[email protected]>, [email protected]
Sent: Tuesday, 24 May, 2016 5:26:22 PM
Subject: Re: [LTP] [PATCH v1 1/1] test_robind: add "-f" mkfs option for xfs and btrfs

Hi!

Quoted 6 lines

Alternative would be to zero-erase first blocks of LTP_BIG_DEV in runltp, but I'm not sure we want to assume that all tests are going to write over it.

I found only 3 tests using LTP_BIG_DEV, this is the only one that is using xfs/btrfs, the other two are ext3/4.

Or we can move the dd that erases first blocks from tst_acquire_device() to tst_mkfs().

Quoted 8 lines
Quoted 2 lines

I went to re-read why we are avoiding -f, and this does sound better than adding -f back.

If we move 'dd' to tst_mkfs(), then tst_acquire_device will return "uncleared" devices, and mkfs_ext* test cases from runtest/commands will start failing in our environment, i.e. we revert f79021c5d168256.

I'd ack the patch, since it affects only one test case.

Any decision made on this patch?

I agreed with acking this patch, it's a targeted fix and only only affects robind tests and is the easiest way to fix the failure at this moment :)

Thanks,
Eryu

#7 lore raw

PATCH 1/1 test_robind: add "-f" mkfs option for xfs and btrfs

Hi

Quoted 35 lines · Eryu Guan

Hi,

Quoted 32 lines · Stanislav Kholmanskikh
Quoted 16 lines · Jan Stancek

----- Original Message -----

Quoted 11 lines

From: "Cyril Hrubis" <[email protected]>
To: "Jan Stancek" <[email protected]>
Cc: "Boyang Xue" <[email protected]>, "stanislav kholmanskikh" <[email protected]>, [email protected]
Sent: Tuesday, 24 May, 2016 5:26:22 PM
Subject: Re: [LTP] [PATCH v1 1/1] test_robind: add "-f" mkfs option for xfs and btrfs

Hi!

Quoted 4 lines

Alternative would be to zero-erase first blocks of LTP_BIG_DEV in runltp, but I'm not sure we want to assume that all tests are going to write over it.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

I found only 3 tests using LTP_BIG_DEV, this is the only one that is using xfs/btrfs, the other two are ext3/4.

Or we can move the dd that erases first blocks from tst_acquire_device() to tst_mkfs().

I went to re-read why we are avoiding -f, and this does sound better than adding -f back.

If we move 'dd' to tst_mkfs(), then tst_acquire_device will return "uncleared" devices, and mkfs_ext* test cases from runtest/commands will start failing in our environment, i.e. we revert f79021c5d168256.

Quoted 7 lines
Quoted 1 line

I'd ack the patch, since it affects only one test case.

Any decision made on this patch?

I agreed with acking this patch, it's a targeted fix and only only affects robind tests and is the easiest way to fix the failure at this moment :)

Sorry for my late response.

I pushed the patch.

Quoted 4 lines

Thanks,
Eryu

#8 lore raw

PATCH 1/1 test_robind: add "-f" mkfs option for xfs and btrfs

Quoted 2 lines · Stanislav Kholmanskikh

Hi

[snip]

Quoted 5 lines
Quoted 5 lines
Quoted 2 lines

I'd ack the patch, since it affects only one test case.

Any decision made on this patch?

Quoted 7 lines
Quoted 3 lines

I agreed with acking this patch, it's a targeted fix and only only affects robind tests and is the easiest way to fix the failure at this moment :)

Sorry for my late response.

I pushed the patch.

Thanks!

Eryu