summaryrefslogtreecommitdiff
path: root/lib9p/tests/runtest
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-02-04 09:05:14 -0700
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-02-04 21:01:49 -0700
commit57d4c9f154cacd5d0dcc2f45033d784b3e0b6734 (patch)
treef96f5c57bbb042b3962bed49853621f6d344de04 /lib9p/tests/runtest
parent635539cd0da713729ec2852b3691dc9f73734e59 (diff)
lib9p: Test that we can do clean shutdown
Diffstat (limited to 'lib9p/tests/runtest')
-rwxr-xr-xlib9p/tests/runtest9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib9p/tests/runtest b/lib9p/tests/runtest
index 29d2089..d963c53 100755
--- a/lib9p/tests/runtest
+++ b/lib9p/tests/runtest
@@ -26,7 +26,8 @@ while [[ -d /proc/$server_pid && "$(readlink /proc/$server_pid/fd/4 2>/dev/null)
out=$("${client[@]}" ls -l '')
expect_lines \
'd-r-xr-xr-x M 0 root root 0 Oct 7 15:51 Documentation' \
- '--r--r--r-- M 0 root root 14 Oct 7 15:51 README.md'
+ '--r--r--r-- M 0 root root 14 Oct 7 15:51 README.md' \
+ '---w--w--w- M 0 root root 0 Oct 7 15:51 shutdown'
out=$("${client[@]}" ls -l 'Documentation/')
expect_lines \
@@ -43,3 +44,9 @@ expect_lines \
out=$("${client[@]}" stat 'Documentation/x')
expect_lines \
"'x' 'root' 'root' 'root' q (0000000000000009 1 ) m 0444 at 1728337905 mt 1728337904 l 4 t 0 d 0"
+
+out=$("${client[@]}" write 'shutdown' <<<1)
+expect_lines ''
+
+wait "$server_pid"
+trap - EXIT