[CRIU] [PATCH 2/2] fix error in tests when /bin/sh is not bash

Tycho Andersen tycho.andersen at canonical.com
Thu Mar 19 07:50:56 PDT 2015


== is a bashism, we should use = for /bin/sh; this prevents output like:

/home/ubuntu/criu/test/post-dump.sh: 3: [: post-dump: unexpected operator
/home/ubuntu/criu/test/post-dump.sh: 3: [: network-unlock: unexpected operator

Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
---
 test/post-dump.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/post-dump.sh b/test/post-dump.sh
index cb1d151..0c7e739 100755
--- a/test/post-dump.sh
+++ b/test/post-dump.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-[ "$CRTOOLS_SCRIPT_ACTION" == post-dump ] || exit 0
+[ "$CRTOOLS_SCRIPT_ACTION" = post-dump ] || exit 0
 
 #
 # Special code to inform zdtm that we're
-- 
2.1.0



More information about the CRIU mailing list