aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorYi-Yo Chiang <yochiang@google.com>2021-02-02 03:22:04 +0800
committerRob Landley <rob@landley.net>2021-02-01 22:04:58 -0600
commit40fbe7eb5e3b41504947d942bf39471fff8df1b7 (patch)
tree3074229b04d9a921c6255af550bb232e6371d4a1 /tests
parenta8d8fbfa659b1e7e68110e6468de1bcf6a61fe34 (diff)
downloadtoybox-40fbe7eb5e3b41504947d942bf39471fff8df1b7.tar.gz
rm: Add testcase for "rm -f <readonly_filesystem>/missing_file"
Diffstat (limited to 'tests')
-rwxr-xr-xtests/rm.test6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/rm.test b/tests/rm.test
index 5ecbfdc1..9ab4c4bc 100755
--- a/tests/rm.test
+++ b/tests/rm.test
@@ -60,3 +60,9 @@ rm -rf d1
touch "meep"
testing "-v" "rm -v meep | sed 's/emoved/m/'" "rm 'meep'\n" "" ""
rm -f meep
+
+skipnot [ $(id -u) -eq 0 ]
+testing "-f <readonly_filesystem>/<missing_file>" \
+ "rm -rf mnt_point && mkdir -p mnt_point &&
+ mount -t tmpfs -o ro none ./mnt_point && rm -f mnt_point/missing_file &&
+ echo yes; umount ./mnt_point; rm -rf mnt_point" "yes\n" "" ""