* [PATCH] generic/70: Use scratch device instead of test. @ 2021-08-19 13:13 Nikolay Borisov 2021-08-19 15:00 ` Zorro Lang 0 siblings, 1 reply; 5+ messages in thread From: Nikolay Borisov @ 2021-08-19 13:13 UTC (permalink / raw) To: fstests; +Cc: Nikolay Borisov At the end of the test the fsstress work dir is deleted, this suggests the test really requires a scratch device and not a test device. Change it accordingly. Signed-off-by: Nikolay Borisov <nborisov@suse.com> --- tests/generic/070 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/generic/070 b/tests/generic/070 index 678344fa011d..c98f445ae4b8 100755 --- a/tests/generic/070 +++ b/tests/generic/070 @@ -13,7 +13,6 @@ _begin_fstest attr udf auto quick stress _cleanup() { cd / - rm -rf $TEST_DIR/fsstress rm -f $tmp.* } @@ -24,11 +23,14 @@ _cleanup() # real QA test starts here _supported_fs generic -_require_test +_require_scratch _require_attrs +_scratch_mkfs >/dev/null 2>&1 +_scratch_mount + FSSTRESS_ARGS=`_scale_fsstress_args \ - -d $TEST_DIR/fsstress \ + -d $SCRATCH_MNT \ -f allocsp=0 \ -f freesp=0 \ -f bulkstat=0 \ @@ -40,5 +42,7 @@ FSSTRESS_ARGS=`_scale_fsstress_args \ -p 1 -n 10000 -S c` $FSSTRESS_PROG $FSSTRESS_ARGS >$seqres.full 2>&1 +_scratch_unmount + status=$? exit -- 2.17.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] generic/70: Use scratch device instead of test. 2021-08-19 13:13 [PATCH] generic/70: Use scratch device instead of test Nikolay Borisov @ 2021-08-19 15:00 ` Zorro Lang 2021-08-19 14:56 ` Nikolay Borisov 0 siblings, 1 reply; 5+ messages in thread From: Zorro Lang @ 2021-08-19 15:00 UTC (permalink / raw) To: Nikolay Borisov; +Cc: fstests On Thu, Aug 19, 2021 at 04:13:55PM +0300, Nikolay Borisov wrote: > At the end of the test the fsstress work dir is deleted, this suggests > the test really requires a scratch device and not a test device. Change > it accordingly. > > Signed-off-by: Nikolay Borisov <nborisov@suse.com> > --- Hmm... is there any more specific reasons to explain why have to change this TEST_DIR to SCRATCH_MNT? For example, this test hit ENOSPC in TEST_DIR, or it takes too much time to remove $TEST_DIR/fsstress in _cleanup, or use SCRATCH_DEV can cover more things, and so on. I think more specific reason can help to push this patch be merged. After all there's not a rule says if a case don't need to keep its work dir, then must use SCRATCH_DEV. Except the maintainer is more inclined to accept that :) Thanks, Zorro > tests/generic/070 | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff --git a/tests/generic/070 b/tests/generic/070 > index 678344fa011d..c98f445ae4b8 100755 > --- a/tests/generic/070 > +++ b/tests/generic/070 > @@ -13,7 +13,6 @@ _begin_fstest attr udf auto quick stress > _cleanup() > { > cd / > - rm -rf $TEST_DIR/fsstress > rm -f $tmp.* > } > > @@ -24,11 +23,14 @@ _cleanup() > # real QA test starts here > _supported_fs generic > > -_require_test > +_require_scratch > _require_attrs > > +_scratch_mkfs >/dev/null 2>&1 > +_scratch_mount > + > FSSTRESS_ARGS=`_scale_fsstress_args \ > - -d $TEST_DIR/fsstress \ > + -d $SCRATCH_MNT \ > -f allocsp=0 \ > -f freesp=0 \ > -f bulkstat=0 \ > @@ -40,5 +42,7 @@ FSSTRESS_ARGS=`_scale_fsstress_args \ > -p 1 -n 10000 -S c` > $FSSTRESS_PROG $FSSTRESS_ARGS >$seqres.full 2>&1 > > +_scratch_unmount > + > status=$? > exit > -- > 2.17.1 > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] generic/70: Use scratch device instead of test. 2021-08-19 15:00 ` Zorro Lang @ 2021-08-19 14:56 ` Nikolay Borisov 2021-08-19 19:46 ` Theodore Ts'o 2021-08-21 22:58 ` Dave Chinner 0 siblings, 2 replies; 5+ messages in thread From: Nikolay Borisov @ 2021-08-19 14:56 UTC (permalink / raw) To: fstests On 19.08.21 г. 18:00, Zorro Lang wrote: > On Thu, Aug 19, 2021 at 04:13:55PM +0300, Nikolay Borisov wrote: >> At the end of the test the fsstress work dir is deleted, this suggests >> the test really requires a scratch device and not a test device. Change >> it accordingly. >> >> Signed-off-by: Nikolay Borisov <nborisov@suse.com> >> --- > > Hmm... is there any more specific reasons to explain why have to change this > TEST_DIR to SCRATCH_MNT? For example, this test hit ENOSPC in TEST_DIR, or > it takes too much time to remove $TEST_DIR/fsstress in _cleanup, or use > SCRATCH_DEV can cover more things, and so on. I think more specific reason > can help to push this patch be merged. After all there's not a rule says > if a case don't need to keep its work dir, then must use SCRATCH_DEV. Except > the maintainer is more inclined to accept that :) None of the reasons above, I just thought that stuff in $TEST_DEV lives there so that it can simulate an 'aging' system. In this case this doesn't seem to be the reason for it as we delete everything. This patch might very well be moot. > > Thanks, > Zorro > >> tests/generic/070 | 10 +++++++--- >> 1 file changed, 7 insertions(+), 3 deletions(-) >> >> diff --git a/tests/generic/070 b/tests/generic/070 >> index 678344fa011d..c98f445ae4b8 100755 >> --- a/tests/generic/070 >> +++ b/tests/generic/070 >> @@ -13,7 +13,6 @@ _begin_fstest attr udf auto quick stress >> _cleanup() >> { >> cd / >> - rm -rf $TEST_DIR/fsstress >> rm -f $tmp.* >> } >> >> @@ -24,11 +23,14 @@ _cleanup() >> # real QA test starts here >> _supported_fs generic >> >> -_require_test >> +_require_scratch >> _require_attrs >> >> +_scratch_mkfs >/dev/null 2>&1 >> +_scratch_mount >> + >> FSSTRESS_ARGS=`_scale_fsstress_args \ >> - -d $TEST_DIR/fsstress \ >> + -d $SCRATCH_MNT \ >> -f allocsp=0 \ >> -f freesp=0 \ >> -f bulkstat=0 \ >> @@ -40,5 +42,7 @@ FSSTRESS_ARGS=`_scale_fsstress_args \ >> -p 1 -n 10000 -S c` >> $FSSTRESS_PROG $FSSTRESS_ARGS >$seqres.full 2>&1 >> >> +_scratch_unmount >> + >> status=$? >> exit >> -- >> 2.17.1 >> > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] generic/70: Use scratch device instead of test. 2021-08-19 14:56 ` Nikolay Borisov @ 2021-08-19 19:46 ` Theodore Ts'o 2021-08-21 22:58 ` Dave Chinner 1 sibling, 0 replies; 5+ messages in thread From: Theodore Ts'o @ 2021-08-19 19:46 UTC (permalink / raw) To: Nikolay Borisov; +Cc: fstests On Thu, Aug 19, 2021 at 05:56:31PM +0300, Nikolay Borisov wrote: > On 19.08.21 г. 18:00, Zorro Lang wrote: > > On Thu, Aug 19, 2021 at 04:13:55PM +0300, Nikolay Borisov wrote: > >> At the end of the test the fsstress work dir is deleted, this suggests > >> the test really requires a scratch device and not a test device. Change > >> it accordingly. > >> > >> Signed-off-by: Nikolay Borisov <nborisov@suse.com> > >> --- > > > > Hmm... is there any more specific reasons to explain why have to change this > > TEST_DIR to SCRATCH_MNT? For example, this test hit ENOSPC in TEST_DIR, or > > it takes too much time to remove $TEST_DIR/fsstress in _cleanup, or use > > SCRATCH_DEV can cover more things, and so on. I think more specific reason > > can help to push this patch be merged. After all there's not a rule says > > if a case don't need to keep its work dir, then must use SCRATCH_DEV. Except > > the maintainer is more inclined to accept that :) > > None of the reasons above, I just thought that stuff in $TEST_DEV lives > there so that it can simulate an 'aging' system. In this case this > doesn't seem to be the reason for it as we delete everything. Using SCRATCH_DEV requires that the file system be reformatted, since it doesn't necessarily exist. So that means extra flash writes, and extra time to actually do the file system format. In addition, sometimes SCRATCH_DEV might not be present for some test environments. Hence, unless you need to use SCRATCH_DEV (because the file system needs to be formatted with specific mkfs options, etc.), I think the preference should be to use TEST_DIR. It doesn't *hurt* that we create the work directory, in TEST_DIR and then delete it afterwawrds --- where as using SCRATCH_DEV dosn't actually buy you anything, and might actually slow the test down a tiny bit. Cheers, - Ted ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] generic/70: Use scratch device instead of test. 2021-08-19 14:56 ` Nikolay Borisov 2021-08-19 19:46 ` Theodore Ts'o @ 2021-08-21 22:58 ` Dave Chinner 1 sibling, 0 replies; 5+ messages in thread From: Dave Chinner @ 2021-08-21 22:58 UTC (permalink / raw) To: Nikolay Borisov; +Cc: fstests On Thu, Aug 19, 2021 at 05:56:31PM +0300, Nikolay Borisov wrote: > > > On 19.08.21 г. 18:00, Zorro Lang wrote: > > On Thu, Aug 19, 2021 at 04:13:55PM +0300, Nikolay Borisov wrote: > >> At the end of the test the fsstress work dir is deleted, this suggests > >> the test really requires a scratch device and not a test device. Change > >> it accordingly. > >> > >> Signed-off-by: Nikolay Borisov <nborisov@suse.com> > >> --- > > > > Hmm... is there any more specific reasons to explain why have to change this > > TEST_DIR to SCRATCH_MNT? For example, this test hit ENOSPC in TEST_DIR, or > > it takes too much time to remove $TEST_DIR/fsstress in _cleanup, or use > > SCRATCH_DEV can cover more things, and so on. I think more specific reason > > can help to push this patch be merged. After all there's not a rule says > > if a case don't need to keep its work dir, then must use SCRATCH_DEV. Except > > the maintainer is more inclined to accept that :) > > None of the reasons above, I just thought that stuff in $TEST_DEV lives > there so that it can simulate an 'aging' system. In this case this > doesn't seem to be the reason for it as we delete everything. That's most certainly aging the filesystem. Just because the test deletes everything it wrote doesn't mean that the filesystem is unchanged after the test runs. e.g. log structured or COW filesytems can have very different structures at the end of the test, even though the current view of the filesystem appears unchanged... IOWs, tests that don't require a specific filesystem configuration should be run on the test device, not the scratch device... Cheers, Dave. -- Dave Chinner david@fromorbit.com ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-08-21 22:58 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-08-19 13:13 [PATCH] generic/70: Use scratch device instead of test Nikolay Borisov 2021-08-19 15:00 ` Zorro Lang 2021-08-19 14:56 ` Nikolay Borisov 2021-08-19 19:46 ` Theodore Ts'o 2021-08-21 22:58 ` Dave Chinner
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox