From: 蔡晓斌 <caixiaobin0807@163.com>
To: "Zorro Lang" <zlang@redhat.com>
Cc: fstests@vger.kernel.org
Subject: Re:Re: Question: Why tests/generic/482 and tests/generic/487 can't pass both at the same time.
Date: Tue, 2 Apr 2024 09:20:33 +0800 (CST) [thread overview]
Message-ID: <36091b82.19fa.18e9c64c69d.Coremail.caixiaobin0807@163.com> (raw)
In-Reply-To: <20240326141613.ekd5wk4zmeqnde3x@dell-per750-06-vm-08.rhts.eng.pek2.redhat.com>
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.
>>
prev parent reply other threads:[~2024-04-02 1:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=36091b82.19fa.18e9c64c69d.Coremail.caixiaobin0807@163.com \
--to=caixiaobin0807@163.com \
--cc=fstests@vger.kernel.org \
--cc=zlang@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox