chaos / diod

Distributed I/O Daemon - a 9P file server
GNU General Public License v2.0
351 stars 56 forks source link

kernel postmark test has a typo #104

Open garlick opened 4 months ago

garlick commented 4 months ago

Problem: tests/kern/t33 fails due to a typo in the test script

t33.diff:> ../../tests/kern/t33: line 13: popd: /tmp/tmp.dagRQES0tH: invalid argument
t33.diff:> popd: usage: popd [-n] [+N | -N]

This fixes it

diff --git a/tests/kern/t33 b/tests/kern/t33
index d1f5fc5..7cdebea 100755
--- a/tests/kern/t33
+++ b/tests/kern/t33
@@ -10,5 +10,5 @@ show
 run
 quit
 EOT
-popd $PATH_MNTDIR >/dev/null
+popd >/dev/null
 ) >t33.postmark
snogge commented 2 months ago

I suggest this instead to avoid using pushd/popd.

modified   tests/kern/t33
@@ -1,7 +1,8 @@
 #!/bin/bash -e

 PATH_POSTMARK=$(pwd)/postmark/postmark
-(pushd $PATH_MNTDIR >/dev/null
+(
+cd $PATH_MNTDIR >/dev/null
 $PATH_POSTMARK <<EOT
 set size 10 100000
 set number 2000
@@ -10,5 +11,4 @@ show
 run
 quit
 EOT
-popd $PATH_MNTDIR >/dev/null
 ) >t33.postmark