btrfs: fix test btrfs/007 to not leave temporary files in /tmp
authorFilipe Manana <fdmanana@suse.com>
Mon, 15 Oct 2018 09:22:46 +0000 (10:22 +0100)
committerEryu Guan <guaneryu@gmail.com>
Sun, 21 Oct 2018 09:36:44 +0000 (17:36 +0800)
commitda8ac46681d002caf28b631804e6a92e245f57fb
treef6eaab1a31e11ed828901faff442c7b4a669366b
parent2b621418f4e96b6af558c238f29ff1a84d901a91
btrfs: fix test btrfs/007 to not leave temporary files in /tmp

This test was using the "mktemp -d" command to create a temporary
directory for storing send streams and computations from fssum,
without ever deleting them when it finishes. Therefore after running
it for many times it filled up all space from /tmp.

Fix this by using a temporary directory in TEST_DEV instead, as all
the more recent send/receive tests do, to store these files, and
making sure they get deleted when the test finishes. On average the
sum of the size of those files is between 5.5Mb to 6Mb, but changing
the number of operations for fsstress makes it even bigger.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/btrfs/007
tests/btrfs/007.out