From aa6c2307ee5d66f8fd0f0658d552c99a026b65cb Mon Sep 17 00:00:00 2001 From: Dan Liu <58147198+nad2040@users.noreply.github.com> Date: Fri, 21 Jul 2023 21:41:34 -0400 Subject: [PATCH] added test for empty log to see if quiet was successful and rm all tmp files (#64) --- tests/quiet_inplace.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/quiet_inplace.sh b/tests/quiet_inplace.sh index 925f94b..1860d30 100755 --- a/tests/quiet_inplace.sh +++ b/tests/quiet_inplace.sh @@ -7,16 +7,18 @@ fail() { cd umount "$MNT" rmdir "$MNT" + rm "$JSON" "$LOG" fi exit 1 } MNT=$(mktemp -d) JSON=$(mktemp) +LOG=$(mktemp) cp ../json/object.json "$JSON" -ffs -qi -m "$MNT" "$JSON" & +ffs -qi -m "$MNT" "$JSON" >"$LOG" 2>&1 & PID=$! sleep 2 echo hi >"$MNT"/greeting @@ -26,6 +28,7 @@ sleep 1 kill -0 $PID >/dev/null 2>&1 && fail process1 diff ../json/object.json "$JSON" >/dev/null && fail same +[ "$(cat $LOG )" = "" ] || fail quiet ffs --readonly -m "$MNT" "$JSON" & PID=$!