* Question: Why tests/generic/482 and tests/generic/487 can't pass both at the same time.
@ 2024-03-25 2:47 蔡晓斌
2024-03-26 14:16 ` Zorro Lang
0 siblings, 1 reply; 3+ messages in thread
From: 蔡晓斌 @ 2024-03-25 2:47 UTC (permalink / raw)
To: fstests
Hi, I have a question when I ran the xfstests, please help me to solve this question, tks.
In my environment, I ues the machine with architecture of aarch64, and then setting the env in local.config file like below:
# Ideally define at least these 4 to match your environment
# The first 2 are required.
# See README for other variables which can be set.
#
# Note: SCRATCH_DEV >will< get overwritten!
export TEST_DEV=/dev/mmcblk0p12
export TEST_DIR=/mnt/xfstests/dir
export FSTYP=ext4
export SCRATCH_DEV=/dev/mmcblk0p13
export SCRATCH_MNT=/mnt/xfstests/dir-mnt
export SCRATCH_LOGDEV=/dev/mmcblk0p14
export USE_EXTERNAL=yes
export DUMP_CORRUPT_FS=1
export KEEP_DMESG=yes
export USE_KMEMLEK=yes
export LOGWRITES_DEV=/dev/mmcblk0p15
export MIN_FSSIZE=10485760 # 10MB
export DIFF_LENGTH=0
And execute the command "./check -l -T tests/generic/[0-9][0-9][0-9]" to run the xfstests. When it ran out, I find that "tests/generic/482" was failed, and "tests/generic/487" was successed.
So I check the source code for those two tests, and I found that used different function in them, like below :
tests/generic/482 :
# real QA test starts here
# Modify as appropriate.
_supported_fs generic
_require_no_logdev
_require_command "$KILLALL_PROG" killall
--------------------------------------------------------------
tests/generic/487 :
# real QA test starts here
_require_scratch_nocheck
sflag='-s'
case $FSTYP in
btrfs)
_notrun "btrfs has a specialized test for this"
;;
*)
;;
esac
_require_logdev
_require_dm_target error
Then continue to check the source code :
common/rc :
# this test needs a logdev
#
_require_logdev()
{
[ -z "$SCRATCH_LOGDEV" -o ! -b "$SCRATCH_LOGDEV" ] && \
_notrun "This test requires a valid \$SCRATCH_LOGDEV"
[ "$USE_EXTERNAL" != yes ] && \
_notrun "This test requires USE_EXTERNAL to be enabled"
# ensure its not mounted
$UMOUNT_PROG $SCRATCH_LOGDEV 2>/dev/null
}
# This test requires that an external log device is not in use
#
_require_no_logdev()
{
[ "$USE_EXTERNAL" = "yes" ] && [ -n "$SCRATCH_LOGDEV" ] && \
_notrun "Test not compatible with external logs, skipped this test"
}
I find that these two functions behave as mutually exclusive in use, so I don't understand why xfstests can't pass both tests at the same time. Please help me to solve this question, thank you again.
Looking forward to your reply.
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Question: Why tests/generic/482 and tests/generic/487 can't pass both at the same time. 2024-03-25 2:47 Question: Why tests/generic/482 and tests/generic/487 can't pass both at the same time 蔡晓斌 @ 2024-03-26 14:16 ` Zorro Lang 2024-04-02 1:20 ` 蔡晓斌 0 siblings, 1 reply; 3+ messages in thread From: Zorro Lang @ 2024-03-26 14:16 UTC (permalink / raw) To: 蔡晓斌; +Cc: fstests On Mon, Mar 25, 2024 at 10:47:22AM +0800, 蔡晓斌 wrote: > > Hi, I have a question when I ran the xfstests, please help me to solve this question, tks. > > > In my environment, I ues the machine with architecture of aarch64, and then setting the env in local.config file like below: > > > > > # Ideally define at least these 4 to match your environment > # The first 2 are required. > # See README for other variables which can be set. > # > # Note: SCRATCH_DEV >will< get overwritten! > > > export TEST_DEV=/dev/mmcblk0p12 > export TEST_DIR=/mnt/xfstests/dir > export FSTYP=ext4 > export SCRATCH_DEV=/dev/mmcblk0p13 > export SCRATCH_MNT=/mnt/xfstests/dir-mnt > export SCRATCH_LOGDEV=/dev/mmcblk0p14 > export USE_EXTERNAL=yes > export DUMP_CORRUPT_FS=1 > export KEEP_DMESG=yes > export USE_KMEMLEK=yes > export LOGWRITES_DEV=/dev/mmcblk0p15 > export MIN_FSSIZE=10485760 # 10MB > export DIFF_LENGTH=0 > > > And execute the command "./check -l -T tests/generic/[0-9][0-9][0-9]" to run the xfstests. When it ran out, I find that "tests/generic/482" was failed, and "tests/generic/487" was successed. > > > So I check the source code for those two tests, and I found that used different function in them, like below : > > > tests/generic/482 : > > > # real QA test starts here > > > # Modify as appropriate. > _supported_fs generic > > > _require_no_logdev > _require_command "$KILLALL_PROG" killall > > > -------------------------------------------------------------- > > > tests/generic/487 : > > > > # real QA test starts here > _require_scratch_nocheck > > > sflag='-s' > case $FSTYP in > btrfs) > _notrun "btrfs has a specialized test for this" > ;; > *) > ;; > esac > > > _require_logdev > _require_dm_target error > > > Then continue to check the source code : > > common/rc : > > > > # this test needs a logdev > # > _require_logdev() > { > [ -z "$SCRATCH_LOGDEV" -o ! -b "$SCRATCH_LOGDEV" ] && \ > _notrun "This test requires a valid \$SCRATCH_LOGDEV" > [ "$USE_EXTERNAL" != yes ] && \ > _notrun "This test requires USE_EXTERNAL to be enabled" > > > # ensure its not mounted > $UMOUNT_PROG $SCRATCH_LOGDEV 2>/dev/null > } > > > # This test requires that an external log device is not in use > # > _require_no_logdev() > { > [ "$USE_EXTERNAL" = "yes" ] && [ -n "$SCRATCH_LOGDEV" ] && \ > _notrun "Test not compatible with external logs, skipped this test" > } > > > I find that these two functions behave as mutually exclusive in use, so I don't understand why xfstests can't pass both tests at the same time. Please help me to solve this question, thank you again. Not sure what's the problem you hit. g/482 and g/487 are totally different two test cases. The g/482 calls _require_no_logdev due to it needs dmlogwrites device, and: commit 50f6d46410367586ab151b357e67393599eebd1c Author: Darrick J. Wong <djwong@kernel.org> Date: Tue Jul 26 12:48:51 2022 -0700 dmlogwrites: skip generic tests when external logdev in use but the g/487 calls _require_logdev due to it needs an external log device, to avoid the effection from the dm-error of data device. The g/482 shouldn't fail if there's a SCRATCH_LOGDEV, it should _notrun. If it failed you'd better to check that failure. About how to run g/482 and g/487, as one requires logdev, the other one requires no_log, so you should have two config sections at least, one have SCRATCH_LOGDEV, the other one unset it. Then run two kinds of tests (with or without log device). Thanks, Zorro > > > Looking forward to your reply. > ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re:Re: Question: Why tests/generic/482 and tests/generic/487 can't pass both at the same time. 2024-03-26 14:16 ` Zorro Lang @ 2024-04-02 1:20 ` 蔡晓斌 0 siblings, 0 replies; 3+ messages in thread From: 蔡晓斌 @ 2024-04-02 1:20 UTC (permalink / raw) To: Zorro Lang; +Cc: fstests At 2024-03-26 22:16:13, "Zorro Lang" <zlang@redhat.com> wrote: >On Mon, Mar 25, 2024 at 10:47:22AM +0800, 蔡晓斌 wrote: >> >> Hi, I have a question when I ran the xfstests, please help me to solve this question, tks. >> >> >> In my environment, I ues the machine with architecture of aarch64, and then setting the env in local.config file like below: >> >> >> >> >> # Ideally define at least these 4 to match your environment >> # The first 2 are required. >> # See README for other variables which can be set. >> # >> # Note: SCRATCH_DEV >will< get overwritten! >> >> >> export TEST_DEV=/dev/mmcblk0p12 >> export TEST_DIR=/mnt/xfstests/dir >> export FSTYP=ext4 >> export SCRATCH_DEV=/dev/mmcblk0p13 >> export SCRATCH_MNT=/mnt/xfstests/dir-mnt >> export SCRATCH_LOGDEV=/dev/mmcblk0p14 >> export USE_EXTERNAL=yes >> export DUMP_CORRUPT_FS=1 >> export KEEP_DMESG=yes >> export USE_KMEMLEK=yes >> export LOGWRITES_DEV=/dev/mmcblk0p15 >> export MIN_FSSIZE=10485760 # 10MB >> export DIFF_LENGTH=0 >> >> >> And execute the command "./check -l -T tests/generic/[0-9][0-9][0-9]" to run the xfstests. When it ran out, I find that "tests/generic/482" was failed, and "tests/generic/487" was successed. >> >> >> So I check the source code for those two tests, and I found that used different function in them, like below : >> >> >> tests/generic/482 : >> >> >> # real QA test starts here >> >> >> # Modify as appropriate. >> _supported_fs generic >> >> >> _require_no_logdev >> _require_command "$KILLALL_PROG" killall >> >> >> -------------------------------------------------------------- >> >> >> tests/generic/487 : >> >> >> >> # real QA test starts here >> _require_scratch_nocheck >> >> >> sflag='-s' >> case $FSTYP in >> btrfs) >> _notrun "btrfs has a specialized test for this" >> ;; >> *) >> ;; >> esac >> >> >> _require_logdev >> _require_dm_target error >> >> >> Then continue to check the source code : >> >> common/rc : >> >> >> >> # this test needs a logdev >> # >> _require_logdev() >> { >> [ -z "$SCRATCH_LOGDEV" -o ! -b "$SCRATCH_LOGDEV" ] && \ >> _notrun "This test requires a valid \$SCRATCH_LOGDEV" >> [ "$USE_EXTERNAL" != yes ] && \ >> _notrun "This test requires USE_EXTERNAL to be enabled" >> >> >> # ensure its not mounted >> $UMOUNT_PROG $SCRATCH_LOGDEV 2>/dev/null >> } >> >> >> # This test requires that an external log device is not in use >> # >> _require_no_logdev() >> { >> [ "$USE_EXTERNAL" = "yes" ] && [ -n "$SCRATCH_LOGDEV" ] && \ >> _notrun "Test not compatible with external logs, skipped this test" >> } >> >> >> I find that these two functions behave as mutually exclusive in use, so I don't understand why xfstests can't pass both tests at the same time. Please help me to solve this question, thank you again. > >Not sure what's the problem you hit. g/482 and g/487 are totally different two >test cases. > >The g/482 calls _require_no_logdev due to it needs dmlogwrites device, and: > > commit 50f6d46410367586ab151b357e67393599eebd1c > Author: Darrick J. Wong <djwong@kernel.org> > Date: Tue Jul 26 12:48:51 2022 -0700 > > dmlogwrites: skip generic tests when external logdev in use > >but the g/487 calls _require_logdev due to it needs an external log device, to >avoid the effection from the dm-error of data device. > >The g/482 shouldn't fail if there's a SCRATCH_LOGDEV, it should _notrun. If it >failed you'd better to check that failure. > >About how to run g/482 and g/487, as one requires logdev, the other one requires >no_log, so you should have two config sections at least, one have SCRATCH_LOGDEV, >the other one unset it. Then run two kinds of tests (with or without log device). > >Thanks, >Zorro > Hi Zorro, thank you for resolving my question, I know what to do next. >> >> >> Looking forward to your reply. >> ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-04-02 1:20 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-03-25 2:47 Question: Why tests/generic/482 and tests/generic/487 can't pass both at the same time 蔡晓斌 2024-03-26 14:16 ` Zorro Lang 2024-04-02 1:20 ` 蔡晓斌
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox