diff mbox series

[4/5] common/rc: use proper temporary file path in _repair_test_fs()

Message ID e8d43ad899188461f42f0184075dcaf70526bdbc.1710871719.git.dsterba@suse.com (mailing list archive)
State New, archived
Headers show
Series Btrfs fstests fixups and updates | expand

Commit Message

David Sterba March 19, 2024, 6:12 p.m. UTC
The path /tmp.repair would be on the system root that could not be
writable, the temporary files are available at $tmp .

Signed-off-by: David Sterba <dsterba@suse.com>
---
 common/rc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Anand Jain March 20, 2024, 11:35 a.m. UTC | #1
On 3/19/24 23:42, David Sterba wrote:
> The path /tmp.repair would be on the system root that could not be
> writable, the temporary files are available at $tmp .
> 
> Signed-off-by: David Sterba <dsterba@suse.com>

Reviewed-by: Anand Jain <anand.jain@oracle.com>

Thanks,
Anand

> ---
>   common/rc | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/common/rc b/common/rc
> index 37d26bf21b7c5f..ff2949bd05353d 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -1301,9 +1301,9 @@ _repair_test_fs()
>   		;;
>   	btrfs)
>   	echo 'yes|$BTRFS_UTIL_PROG check --repair --force "$TEST_DEV"' > \
> -								/tmp.repair 2>&1
> +								$tmp.repair 2>&1
>   	yes | $BTRFS_UTIL_PROG check --repair --force "$TEST_DEV" >> \
> -								/tmp.repair 2>&1
> +								$tmp.repair 2>&1
>   		res=$?
>   		;;
>   	*)
diff mbox series

Patch

diff --git a/common/rc b/common/rc
index 37d26bf21b7c5f..ff2949bd05353d 100644
--- a/common/rc
+++ b/common/rc
@@ -1301,9 +1301,9 @@  _repair_test_fs()
 		;;
 	btrfs)
 	echo 'yes|$BTRFS_UTIL_PROG check --repair --force "$TEST_DEV"' > \
-								/tmp.repair 2>&1
+								$tmp.repair 2>&1
 	yes | $BTRFS_UTIL_PROG check --repair --force "$TEST_DEV" >> \
-								/tmp.repair 2>&1
+								$tmp.repair 2>&1
 		res=$?
 		;;
 	*)