[Toybox] [PATCH 2/2] rm: Add testcase for "rm -f <readonly_filesystem>/missing_file"

Yi-Yo Chiang yochiang at google.com
Mon Feb 1 11:22:04 PST 2021


---
 tests/rm.test | 6 ++++++
 1 file changed, 6 insertions(+)

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" "" ""
-- 
2.30.0.365.g02bc693789-goog



More information about the Toybox mailing list