aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnand Jain <anand.jain@oracle.com>2023-08-29 20:34:06 +0800
committerZorro Lang <zlang@kernel.org>2023-09-16 11:27:52 +0800
commit8abf8a203a9e09838e6b4cc9e51680aa82d930e9 (patch)
tree7c187af9609d17dc8787acfca7e1d060242b86b9
parent2da0d2692c94d656585c1d81dc9e043a1a0384f1 (diff)
downloadxfstests-dev-8abf8a203a9e09838e6b4cc9e51680aa82d930e9.tar.gz
fstests: btrfs/261 fix failure if /var/lib/btrfs isn't writable
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> Reviewed-by: Zorro Lang <zlang@redhat.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
-rwxr-xr-xtests/btrfs/2614
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/btrfs/261 b/tests/btrfs/261
index 21567052d5..26aed2c207 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