* [PATCH] fstests: get section config after RUN_SECTION checks @ 2022-08-24 19:32 Josef Bacik 2022-08-25 14:42 ` Zorro Lang 2022-10-16 6:59 ` Zorro Lang 0 siblings, 2 replies; 6+ messages in thread From: Josef Bacik @ 2022-08-24 19:32 UTC (permalink / raw) To: fstests, linux-btrfs While trying to do ./check -s <some section> I was failing because I had a section defined higher than <some section> that had TEST_DEV=/some/nonexistent/device, since I was using the other section to test an experimental drive. This appears to be because we run through all of the sections, and when getting the section config we check to see if it's valid, and in this case the section wasn't valid. The section I was actually trying to use was valid however. Fix check to see if the section we're trying to run is in our list of sections to run first, and then if it is get the config at that point. Signed-off-by: Josef Bacik <josef@toxicpanda.com> --- check | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/check b/check index 0b2f10ed..ad0ab3cf 100755 --- a/check +++ b/check @@ -678,7 +678,6 @@ function run_section() OLD_FSTYP=$FSTYP OLD_TEST_FS_MOUNT_OPTS=$TEST_FS_MOUNT_OPTS - get_next_config $section # Do we need to run only some sections ? if [ ! -z "$RUN_SECTION" ]; then @@ -708,6 +707,8 @@ function run_section() fi fi + get_next_config $section + mkdir -p $RESULT_BASE if [ ! -d $RESULT_BASE ]; then echo "failed to create results directory $RESULT_BASE" -- 2.26.3 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] fstests: get section config after RUN_SECTION checks 2022-08-24 19:32 [PATCH] fstests: get section config after RUN_SECTION checks Josef Bacik @ 2022-08-25 14:42 ` Zorro Lang 2022-09-23 14:19 ` Zorro Lang 2022-10-16 6:59 ` Zorro Lang 1 sibling, 1 reply; 6+ messages in thread From: Zorro Lang @ 2022-08-25 14:42 UTC (permalink / raw) To: Josef Bacik; +Cc: fstests On Wed, Aug 24, 2022 at 03:32:10PM -0400, Josef Bacik wrote: > While trying to do > > ./check -s <some section> > > I was failing because I had a section defined higher than <some section> > that had TEST_DEV=/some/nonexistent/device, since I was using the other > section to test an experimental drive. This appears to be because we > run through all of the sections, and when getting the section config we > check to see if it's valid, and in this case the section wasn't valid. > > The section I was actually trying to use was valid however. Fix check > to see if the section we're trying to run is in our list of sections to > run first, and then if it is get the config at that point. > > Signed-off-by: Josef Bacik <josef@toxicpanda.com> > --- May you provide any specific config examples to clarify what kind of issue you feel wrong, and what kind of usage you hope to support :) Thanks, Zorro > check | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/check b/check > index 0b2f10ed..ad0ab3cf 100755 > --- a/check > +++ b/check > @@ -678,7 +678,6 @@ function run_section() > > OLD_FSTYP=$FSTYP > OLD_TEST_FS_MOUNT_OPTS=$TEST_FS_MOUNT_OPTS > - get_next_config $section > > # Do we need to run only some sections ? > if [ ! -z "$RUN_SECTION" ]; then > @@ -708,6 +707,8 @@ function run_section() > fi > fi > > + get_next_config $section > + > mkdir -p $RESULT_BASE > if [ ! -d $RESULT_BASE ]; then > echo "failed to create results directory $RESULT_BASE" > -- > 2.26.3 > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] fstests: get section config after RUN_SECTION checks 2022-08-25 14:42 ` Zorro Lang @ 2022-09-23 14:19 ` Zorro Lang 2022-10-10 15:56 ` Josef Bacik 0 siblings, 1 reply; 6+ messages in thread From: Zorro Lang @ 2022-09-23 14:19 UTC (permalink / raw) To: Josef Bacik; +Cc: fstests On Thu, Aug 25, 2022 at 10:42:42PM +0800, Zorro Lang wrote: > On Wed, Aug 24, 2022 at 03:32:10PM -0400, Josef Bacik wrote: > > While trying to do > > > > ./check -s <some section> > > > > I was failing because I had a section defined higher than <some section> > > that had TEST_DEV=/some/nonexistent/device, since I was using the other > > section to test an experimental drive. This appears to be because we > > run through all of the sections, and when getting the section config we > > check to see if it's valid, and in this case the section wasn't valid. > > > > The section I was actually trying to use was valid however. Fix check > > to see if the section we're trying to run is in our list of sections to > > run first, and then if it is get the config at that point. > > > > Signed-off-by: Josef Bacik <josef@toxicpanda.com> > > --- > > May you provide any specific config examples to clarify what kind of issue > you feel wrong, and what kind of usage you hope to support :) Hi Josef, Although you didn't reply this email, but I think I might hit similar problem with you recently when I tried to do a btrfs test. I wrote a config.file likes: [default] export TEST_DEV=/dev/sda5 export TEST_DIR=/mnt/test export SCRATCH_DEV_POOL="/dev/mapper/testvg-scratchdev1 /dev/mapper/testvg-scratchdev2 /dev/mapper/testvg-scratchdev3 /dev/mapper/testvg-scratchdev4 /dev/mapper/testvg-scratchdev5" export SCRATCH_MNT=/mnt/scratch [logdev] export TEST_DEV=/dev/sda5 export TEST_DIR=/mnt/test export SCRATCH_DEV=/dev/sda3 export SCRATCH_MNT=/mnt/scratch export USE_EXTERNAL=yes export SCRATCH_LOGDEV=/dev/loop0 And run: # ./check -s default btrfs/275 Then I hit: SECTION -- default FSTYP -- btrfs PLATFORM -- Linux/x86_64 hp-xxxxx-xxxx 6.0.0-0.rc4.20220906git53e99dcff61e.32.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Sep 7 07:51:49 UTC 2022 MKFS_OPTIONS -- /dev/mapper/testvg-scratchdev1 MOUNT_OPTIONS -- -o context=system_u:object_r:root_t:s0 /dev/mapper/testvg-scratchdev1 /mnt/scratch btrfs/275 2s ... 4s Ran: btrfs/275 Passed all 1 tests common/config: Error: $SCRATCH_DEV (/dev/sda3) should be unset when $SCRATCH_DEV_POOL (/dev/mapper/testvg-scratchdev1 /dev/mapper/testvg-scratchdev2 /dev/mapper/testvg-scratchdev3 /dev/mapper/testvg-scratchdev4 /dev/mapper/testvg-scratchdev5) is set SECTION -- default ========================= Ran: btrfs/275 Passed all 1 tests Is that the problem what you said, or you have more problems? Thanks, Zorro > > Thanks, > Zorro > > > check | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/check b/check > > index 0b2f10ed..ad0ab3cf 100755 > > --- a/check > > +++ b/check > > @@ -678,7 +678,6 @@ function run_section() > > > > OLD_FSTYP=$FSTYP > > OLD_TEST_FS_MOUNT_OPTS=$TEST_FS_MOUNT_OPTS > > - get_next_config $section > > > > # Do we need to run only some sections ? > > if [ ! -z "$RUN_SECTION" ]; then > > @@ -708,6 +707,8 @@ function run_section() > > fi > > fi > > > > + get_next_config $section > > + > > mkdir -p $RESULT_BASE > > if [ ! -d $RESULT_BASE ]; then > > echo "failed to create results directory $RESULT_BASE" > > -- > > 2.26.3 > > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] fstests: get section config after RUN_SECTION checks 2022-09-23 14:19 ` Zorro Lang @ 2022-10-10 15:56 ` Josef Bacik 2022-10-11 14:17 ` Zorro Lang 0 siblings, 1 reply; 6+ messages in thread From: Josef Bacik @ 2022-10-10 15:56 UTC (permalink / raw) To: Zorro Lang; +Cc: fstests On Fri, Sep 23, 2022 at 10:19:58PM +0800, Zorro Lang wrote: > On Thu, Aug 25, 2022 at 10:42:42PM +0800, Zorro Lang wrote: > > On Wed, Aug 24, 2022 at 03:32:10PM -0400, Josef Bacik wrote: > > > While trying to do > > > > > > ./check -s <some section> > > > > > > I was failing because I had a section defined higher than <some section> > > > that had TEST_DEV=/some/nonexistent/device, since I was using the other > > > section to test an experimental drive. This appears to be because we > > > run through all of the sections, and when getting the section config we > > > check to see if it's valid, and in this case the section wasn't valid. > > > > > > The section I was actually trying to use was valid however. Fix check > > > to see if the section we're trying to run is in our list of sections to > > > run first, and then if it is get the config at that point. > > > > > > Signed-off-by: Josef Bacik <josef@toxicpanda.com> > > > --- > > > > May you provide any specific config examples to clarify what kind of issue > > you feel wrong, and what kind of usage you hope to support :) > > Hi Josef, > > Although you didn't reply this email, but I think I might hit similar > problem with you recently when I tried to do a btrfs test. I wrote a > config.file likes: > Sorry I don't actually get emails to my inbox, I use lei so sometimes miss simple things like this. I'm using kdevops, and I had a general config that I was using for all hosts, except one host has a PCI passthrough ZNS device. So I have something akin to this [defaut] TEST_DIR=/mnt/test SCRATCH_MNT=/mnt/scratch [btrfs-normal] TEST_DEV=/dev/sda SCRATCH_DEV_POOL="/dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg /dev/sdh" SCRATCH_LOGDEV=/dev/loop0 [btrfs-zns] TEST_DEV=/dev/nvme0n1 SCRATCH_DEV=/dev/nvme1n1 [btrfs-compress] TEST_DEV=/dev/sda SCRATCH_DEV_POOL="/dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg /dev/sdh" SCRATCH_LOGDEV=/dev/loop0 MOUNT_OPTIONS="-o compress" If I tried to run ./check -s btrfs-compress it would fail because it couldn't find /dev/nvme0n1, despite it not being in the section I'm running. Thanks, Josef ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] fstests: get section config after RUN_SECTION checks 2022-10-10 15:56 ` Josef Bacik @ 2022-10-11 14:17 ` Zorro Lang 0 siblings, 0 replies; 6+ messages in thread From: Zorro Lang @ 2022-10-11 14:17 UTC (permalink / raw) To: Josef Bacik; +Cc: fstests, Theodore Ts'o, Dave Chinner On Mon, Oct 10, 2022 at 11:56:48AM -0400, Josef Bacik wrote: > On Fri, Sep 23, 2022 at 10:19:58PM +0800, Zorro Lang wrote: > > On Thu, Aug 25, 2022 at 10:42:42PM +0800, Zorro Lang wrote: > > > On Wed, Aug 24, 2022 at 03:32:10PM -0400, Josef Bacik wrote: > > > > While trying to do > > > > > > > > ./check -s <some section> > > > > > > > > I was failing because I had a section defined higher than <some section> > > > > that had TEST_DEV=/some/nonexistent/device, since I was using the other > > > > section to test an experimental drive. This appears to be because we > > > > run through all of the sections, and when getting the section config we > > > > check to see if it's valid, and in this case the section wasn't valid. > > > > > > > > The section I was actually trying to use was valid however. Fix check > > > > to see if the section we're trying to run is in our list of sections to > > > > run first, and then if it is get the config at that point. > > > > > > > > Signed-off-by: Josef Bacik <josef@toxicpanda.com> > > > > --- > > > > > > May you provide any specific config examples to clarify what kind of issue > > > you feel wrong, and what kind of usage you hope to support :) > > > > Hi Josef, > > > > Although you didn't reply this email, but I think I might hit similar > > problem with you recently when I tried to do a btrfs test. I wrote a > > config.file likes: > > > > Sorry I don't actually get emails to my inbox, I use lei so sometimes miss > simple things like this. > > I'm using kdevops, and I had a general config that I was using for all hosts, > except one host has a PCI passthrough ZNS device. So I have something akin to > this > > [defaut] > TEST_DIR=/mnt/test > SCRATCH_MNT=/mnt/scratch > > [btrfs-normal] > TEST_DEV=/dev/sda > SCRATCH_DEV_POOL="/dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg /dev/sdh" > SCRATCH_LOGDEV=/dev/loop0 > > [btrfs-zns] > TEST_DEV=/dev/nvme0n1 > SCRATCH_DEV=/dev/nvme1n1 > > [btrfs-compress] > TEST_DEV=/dev/sda > SCRATCH_DEV_POOL="/dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg /dev/sdh" > SCRATCH_LOGDEV=/dev/loop0 > MOUNT_OPTIONS="-o compress" > > If I tried to run > > ./check -s btrfs-compress > > it would fail because it couldn't find /dev/nvme0n1, despite it not being in the > section I'm running. Thanks, Thanks Josef, I'm OK to have this patch. Due to fstests "section" related rules changing might affect some people's daily/weekly regression test script. I don't use fstests' "section" too much, I've asked Darrick, he said he don't either. But I think Dave and Ted might use it much, so I'd like to cc them to make sure this change won't cause their nightly testing broken suddently. Welcome more review points from anyone. Thanks, Zorro > > Josef > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] fstests: get section config after RUN_SECTION checks 2022-08-24 19:32 [PATCH] fstests: get section config after RUN_SECTION checks Josef Bacik 2022-08-25 14:42 ` Zorro Lang @ 2022-10-16 6:59 ` Zorro Lang 1 sibling, 0 replies; 6+ messages in thread From: Zorro Lang @ 2022-10-16 6:59 UTC (permalink / raw) To: fstests; +Cc: Josef Bacik On Wed, Aug 24, 2022 at 03:32:10PM -0400, Josef Bacik wrote: > While trying to do > > ./check -s <some section> > > I was failing because I had a section defined higher than <some section> > that had TEST_DEV=/some/nonexistent/device, since I was using the other > section to test an experimental drive. This appears to be because we > run through all of the sections, and when getting the section config we > check to see if it's valid, and in this case the section wasn't valid. > > The section I was actually trying to use was valid however. Fix check > to see if the section we're trying to run is in our list of sections to > run first, and then if it is get the config at that point. > > Signed-off-by: Josef Bacik <josef@toxicpanda.com> > --- This patch looks good to me, and I did a little testing on it, for example[1]. But I know other people might use section config in many different ways, so I keep this patch here for several weeks, and no any objection for now. So I'd like to merge this patch now, please feel free to tell me if anyone get problems after having this change. Reviewed-by: Zorro Lang <zlang@redhat.com> Thanks, Zorro [1] # cat local.config [default] export TEST_DEV=/dev/sda5 export TEST_DIR=/mnt/test export SCRATCH_MNT=/mnt/scratch [simpledev] SCRATCH_DEV_POOL="" export SCRATCH_DEV=/dev/sda3 [pooldev] SCRATCH_DEV="" export SCRATCH_DEV_POOL="/dev/mapper/testvg-scratchdev1 /dev/mapper/testvg-scratchdev2 /dev/mapper/testvg-scratchdev3 /dev/mapper/testvg-scratchdev4 /dev/mapper/testvg-scratchdev5" [logdev] SCRATCH_DEV_POOL="" export SCRATCH_DEV=/dev/sda3 export USE_EXTERNAL=yes export SCRATCH_LOGDEV=/dev/loop0 # ./check -s logdev xfs/001 SECTION -- logdev FSTYP -- xfs (debug) PLATFORM -- Linux/x86_64 hp-dl380pg8-01 5.18.0-rc2+ #2 SMP PREEMPT_DYNAMIC Mon May 16 16:36:31 CST 2022 MKFS_OPTIONS -- -f -llogdev=/dev/loop0 /dev/sda3 MOUNT_OPTIONS -- -o context=system_u:object_r:root_t:s0 -ologdev=/dev/loop0 /dev/sda3 /mnt/scratch xfs/001 9s ... 8s Ran: xfs/001 Passed all 1 tests # ./check -s simpledev -s pooldev -s logdev xfs/001 SECTION -- simpledev FSTYP -- xfs (debug) PLATFORM -- Linux/x86_64 hp-dl380pg8-01 5.18.0-rc2+ #2 SMP PREEMPT_DYNAMIC Mon May 16 16:36:31 CST 2022 MKFS_OPTIONS -- -f /dev/sda3 MOUNT_OPTIONS -- -o context=system_u:object_r:root_t:s0 /dev/sda3 /mnt/scratch xfs/001 7s ... 7s Ran: xfs/001 Passed all 1 tests SECTION -- pooldev FSTYP -- xfs (debug) PLATFORM -- Linux/x86_64 hp-dl380pg8-01 5.18.0-rc2+ #2 SMP PREEMPT_DYNAMIC Mon May 16 16:36:31 CST 2022 MKFS_OPTIONS -- -f /dev/mapper/testvg-scratchdev1 MOUNT_OPTIONS -- -o context=system_u:object_r:root_t:s0 /dev/mapper/testvg-scratchdev1 /mnt/scratch xfs/001 7s ... 6s Ran: xfs/001 Passed all 1 tests SECTION -- logdev FSTYP -- xfs (debug) PLATFORM -- Linux/x86_64 hp-dl380pg8-01 5.18.0-rc2+ #2 SMP PREEMPT_DYNAMIC Mon May 16 16:36:31 CST 2022 MKFS_OPTIONS -- -f -llogdev=/dev/loop0 /dev/sda3 MOUNT_OPTIONS -- -o context=system_u:object_r:root_t:s0 -ologdev=/dev/loop0 /dev/sda3 /mnt/scratch xfs/001 6s ... 9s Ran: xfs/001 Passed all 1 tests xfs/001 6s ... 9s Ran: xfs/001 Passed all 1 tests SECTION -- simpledev ========================= Ran: xfs/001 Passed all 1 tests SECTION -- pooldev ========================= Ran: xfs/001 Passed all 1 tests SECTION -- logdev ========================= Ran: xfs/001 Passed all 1 tests > check | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/check b/check > index 0b2f10ed..ad0ab3cf 100755 > --- a/check > +++ b/check > @@ -678,7 +678,6 @@ function run_section() > > OLD_FSTYP=$FSTYP > OLD_TEST_FS_MOUNT_OPTS=$TEST_FS_MOUNT_OPTS > - get_next_config $section > > # Do we need to run only some sections ? > if [ ! -z "$RUN_SECTION" ]; then > @@ -708,6 +707,8 @@ function run_section() > fi > fi > > + get_next_config $section > + > mkdir -p $RESULT_BASE > if [ ! -d $RESULT_BASE ]; then > echo "failed to create results directory $RESULT_BASE" > -- > 2.26.3 > ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-10-16 6:59 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-08-24 19:32 [PATCH] fstests: get section config after RUN_SECTION checks Josef Bacik 2022-08-25 14:42 ` Zorro Lang 2022-09-23 14:19 ` Zorro Lang 2022-10-10 15:56 ` Josef Bacik 2022-10-11 14:17 ` Zorro Lang 2022-10-16 6:59 ` Zorro Lang
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.