]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
btrfs/058: fix test to actually have an open tmpfile during the send operation
authorFilipe Manana <fdmanana@suse.com>
Wed, 19 Mar 2025 12:13:28 +0000 (12:13 +0000)
committerZorro Lang <zlang@kernel.org>
Fri, 28 Mar 2025 01:05:35 +0000 (09:05 +0800)
commitb8cbda37d9cece70805000dbf79c646e1b4129e6
tree385f5535ab9f13df3759e17620ffca62548ef146
parent6542628fc958a0acc58f764659ee6680637a005f
btrfs/058: fix test to actually have an open tmpfile during the send operation

The test's goal is to exercise a send operation while there's a tmpfile in
the snapshot, but that doesn't happen since the background xfs_io process
that created the tmpfile ends up exiting before we create the snapshot, so
the snapshot nevers gets a tmpfile.

Fix this by using a different approach, with a fifo and tailing it to the
stdin of a background xfs_io process and then writing to the fifo to
create the tmpfile. This keeps the xfs_io process running with the tmpfile
open while we snapshot and run the send operation.

While at it also add code to verify we have the tmpfile (an orphan inode
item) in the snapshot's tree.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
tests/btrfs/058