]> git.corax.cc Git - toolbox/commitdiff
test/ipc: Make setup() function idempotent
authorMatthias Kruk <m@m10k.eu>
Sat, 17 Sep 2022 05:16:24 +0000 (14:16 +0900)
committerMatthias Kruk <m@m10k.eu>
Sat, 17 Sep 2022 05:16:24 +0000 (14:16 +0900)
The setup() function in the test spec for the ipc module is not
idempotent, causing the second and all subsequent test cases that
use it to fail.

This commit modifies the setup() function so that it does not fail
if it is called more than once.

test/ipc_spec.sh

index 73da37962574960a293e1c6d0072f8b0bd17b817..447f0d53764eb12743667912633da829bd95b2de 100644 (file)
@@ -20,7 +20,7 @@
 include "ipc"
 
 setup() {
-       if ! mkdir "/tmp/test.$$"; then
+       if ! mkdir -p "/tmp/test.$$"; then
                return 1
        fi