Message ID | 3e6b018ef39babe84d3a307e547b480b4834c4e1.1693312220.git.anand.jain@oracle.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | fstests: btrfs/261 fix failure if /var/lib/btrfs isn't writable | expand |
On Tue, Aug 29, 2023 at 08:34:06PM +0800, Anand Jain wrote: > We don't need scrub status; it is okay to ignore the warnings due to > the readonly /var/lib/btrfs if any. Redirect stderr to seqres.full. > We check the scrub return status. > > +WARNING: failed to open the progress status socket at /var/lib/btrfs/scrub.progress.42fad803-d505-48f4-a04d-612dbf8bd724: Read-only file system. Progress cannot be queried > +WARNING: failed to write the progress status file: Read-only file system. Status recording disabled > > Signed-off-by: Anand Jain <anand.jain@oracle.com> > --- Good to me, Reviewed-by: Zorro Lang <zlang@redhat.com> > tests/btrfs/261 | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/tests/btrfs/261 b/tests/btrfs/261 > index b33c053fbca0..50173de351f3 100755 > --- a/tests/btrfs/261 > +++ b/tests/btrfs/261 > @@ -68,7 +68,9 @@ workload() > $BTRFS_UTIL_PROG scrub start -B $SCRATCH_MNT >> $seqres.full 2>&1 > > # Make sure above scrub fixed the fs > - $BTRFS_UTIL_PROG scrub start -Br $SCRATCH_MNT >> $seqres.full > + # Redirect the stderr to seqres.full as well to avoid warnings if > + # /var/lib filesystem is readonly, as scrub fails to write status. > + $BTRFS_UTIL_PROG scrub start -Br $SCRATCH_MNT >> $seqres.full 2>&1 > if [ $? -ne 0 ]; then > echo "scrub failed to fix the fs for profile $mkfs_opts" > fi > -- > 2.39.3 >
diff --git a/tests/btrfs/261 b/tests/btrfs/261 index b33c053fbca0..50173de351f3 100755 --- a/tests/btrfs/261 +++ b/tests/btrfs/261 @@ -68,7 +68,9 @@ workload() $BTRFS_UTIL_PROG scrub start -B $SCRATCH_MNT >> $seqres.full 2>&1 # Make sure above scrub fixed the fs - $BTRFS_UTIL_PROG scrub start -Br $SCRATCH_MNT >> $seqres.full + # Redirect the stderr to seqres.full as well to avoid warnings if + # /var/lib filesystem is readonly, as scrub fails to write status. + $BTRFS_UTIL_PROG scrub start -Br $SCRATCH_MNT >> $seqres.full 2>&1 if [ $? -ne 0 ]; then echo "scrub failed to fix the fs for profile $mkfs_opts" fi
We don't need scrub status; it is okay to ignore the warnings due to the readonly /var/lib/btrfs if any. Redirect stderr to seqres.full. We check the scrub return status. +WARNING: failed to open the progress status socket at /var/lib/btrfs/scrub.progress.42fad803-d505-48f4-a04d-612dbf8bd724: Read-only file system. Progress cannot be queried +WARNING: failed to write the progress status file: Read-only file system. Status recording disabled Signed-off-by: Anand Jain <anand.jain@oracle.com> --- tests/btrfs/261 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)