Re: [PATCH v2] fstests: btrfs: redirect stdout of "btrfs subvolume snapshot" to fix output change

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]





On 4/11/24 00:26, David Sterba wrote:
On Wed, Apr 10, 2024 at 03:18:49PM +0930, Qu Wenruo wrote:
What past discussions favored does not seem to satisfy our needs and as
btrfs-progs are evolving we're hitting random test breakage just because
some message has changed. The testsuite should verify what matters, ie.
return code, state of the filesystem etc, not exact command output.
There's high correlation between output and correctness, yes, but this
is too fragile.

Agreed. So, why don't we use `_run_btrfs_util_prog subvolume
snapshot`, which makes it consistent with the rest of the test cases,
and also remove the golden output for this command?

For `_run_btrfs_util_prog`, the only thing I do not like is the name itself.

I also do not like how fstests always go $BTRFS_UTIL_PROG neither,
however I understand it's there to make sure we do not got weird bash
function name like "btrfs()" overriding the real "btrfs".

If we can make the name shorter like `_btrfs` or something like it, I'm
totally fine with that, and would be happy to move to the new interface.

In fact, `_run_btrfs_util_prog` is pretty helpful to generate a debug
friendly seqres.full, which is another good point.

I did not realize the _run_btrfs_util_prog helper was there and actually
the run_check as well. I vaguely remember this from many years ago and
this somehow landed in btrfs-progs testsuite but fstests was against it.
Using such helpers sounds like a plan to me (with renames etc).

We can do the renaming part in the separate patch. Qu, are
you sending the revised patch?

I use run command in some of my local test scripts it help debug,
switch on / off the output easily and verifies the success return
code.

    https://github.com/asj/run

Thanks, Anand




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux