From 2d5edb37b924715b4fbee4d917ac334c773fca61 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Mon, 7 Nov 2022 15:10:50 -0500 Subject: tests/xtouch: New utility POSIX touch(1) doesn't include the -h option, and indeed OpenBSD doesn't implement it. Making our own utility also lets us add some handy extensions like -p (create parents) and -M (set permissions). --- tests/common/L_mount.sh | 2 +- tests/common/delete.sh | 2 +- tests/common/delete_many.sh | 2 +- tests/common/inum_bind_mount.sh | 2 +- tests/common/mount.sh | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/common') diff --git a/tests/common/L_mount.sh b/tests/common/L_mount.sh index d9e1dec..dad7e00 100644 --- a/tests/common/L_mount.sh +++ b/tests/common/L_mount.sh @@ -5,7 +5,7 @@ clean_scratch mkdir scratch/{foo,mnt} sudo mount -t tmpfs tmpfs scratch/mnt ln -s ../mnt scratch/foo/bar -$TOUCH scratch/mnt/baz +"$XTOUCH" scratch/mnt/baz ln -s ../mnt/baz scratch/foo/qux bfs_diff -L scratch -mount diff --git a/tests/common/delete.sh b/tests/common/delete.sh index 3709897..89cf2a2 100644 --- a/tests/common/delete.sh +++ b/tests/common/delete.sh @@ -1,5 +1,5 @@ clean_scratch -touchp scratch/foo/bar/baz +"$XTOUCH" -p scratch/foo/bar/baz # Don't try to delete '.' (cd scratch && invoke_bfs . -delete) diff --git a/tests/common/delete_many.sh b/tests/common/delete_many.sh index 6f54825..6274319 100644 --- a/tests/common/delete_many.sh +++ b/tests/common/delete_many.sh @@ -2,7 +2,7 @@ clean_scratch mkdir scratch/foo -$TOUCH scratch/foo/{1..256} +"$XTOUCH" scratch/foo/{1..256} invoke_bfs scratch/foo -delete bfs_diff scratch diff --git a/tests/common/inum_bind_mount.sh b/tests/common/inum_bind_mount.sh index 8b1ac0e..e35ed4e 100644 --- a/tests/common/inum_bind_mount.sh +++ b/tests/common/inum_bind_mount.sh @@ -2,7 +2,7 @@ skip_unless test "$SUDO" skip_unless test "$UNAME" = "Linux" clean_scratch -$TOUCH scratch/{foo,bar} +"$XTOUCH" scratch/{foo,bar} sudo mount --bind scratch/{foo,bar} bfs_diff scratch -inum "$(inum scratch/bar)" diff --git a/tests/common/mount.sh b/tests/common/mount.sh index 6131ad4..2732a68 100644 --- a/tests/common/mount.sh +++ b/tests/common/mount.sh @@ -4,7 +4,7 @@ skip_if test "$UNAME" = "Darwin" clean_scratch mkdir scratch/{foo,mnt} sudo mount -t tmpfs tmpfs scratch/mnt -$TOUCH scratch/foo/bar scratch/mnt/baz +"$XTOUCH" scratch/foo/bar scratch/mnt/baz bfs_diff scratch -mount ret=$? -- cgit v1.2.3