]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
btrfs/339: test receive dump stream for different user
authorSidong Yang <realwakka@gmail.com>
Wed, 3 Dec 2025 11:43:25 +0000 (11:43 +0000)
committerZorro Lang <zlang@kernel.org>
Fri, 5 Dec 2025 07:46:17 +0000 (15:46 +0800)
Test receive to dump stream file from different user.

This is a regression test for the btrfs-progs commit cd933616d485
("btrfs-progs: receive: don't use O_NOATIME to open stream for
dumping").

Signed-off-by: Sidong Yang <realwakka@gmail.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/btrfs/339 [new file with mode: 0755]
tests/btrfs/339.out [new file with mode: 0644]

diff --git a/tests/btrfs/339 b/tests/btrfs/339
new file mode 100755 (executable)
index 0000000..234a9ea
--- /dev/null
@@ -0,0 +1,32 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2025 Sidong Yang.  All Rights Reserved.
+#
+# FS QA Test 339
+#
+# Test btrfs receive dump stream from different user
+#
+. ./common/preamble
+_begin_fstest auto quick send snapshot
+
+. ./common/filter
+
+_require_scratch
+_require_user
+
+_fixed_by_git_commit btrfs-progs cd933616d485 \
+       "btrfs-progs: receive: don't use O_NOATIME to open stream for dumping"
+
+_scratch_mkfs >> $seqres.full 2>&1 || _fail "mkfs failed"
+_scratch_mount
+
+stream=$tmp.fsv.ss
+
+_btrfs subvolume snapshot -r $SCRATCH_MNT $SCRATCH_MNT/snap
+_btrfs send -f $stream $SCRATCH_MNT/snap
+chmod a+r $stream
+_su $qa_user -c "$BTRFS_UTIL_PROG receive --dump -f $stream" >> $seqres.full
+
+# success, all done
+echo "Silence is golden"
+_exit 0
diff --git a/tests/btrfs/339.out b/tests/btrfs/339.out
new file mode 100644 (file)
index 0000000..293ea80
--- /dev/null
@@ -0,0 +1,2 @@
+QA output created by 339
+Silence is golden