You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ti...@apache.org on 2016/12/14 13:45:08 UTC

mesos git commit: Used correct shell string comparison operator in test.

Repository: mesos
Updated Branches:
  refs/heads/master e99ea9ce8 -> 608e2006e


Used correct shell string comparison operator in test.

In order to compare two strings for equality in shell with the `[`
operator (which is often mapped to `test`), the `=` operator should be
used.

This patches replaces usage of `==` with `=` in one such comparison.
While on many system this appears to work with the shell mapped to
`sh`, it does not work for e.g., ubuntu which uses `dash` as the
default shell.

Review: https://reviews.apache.org/r/54739/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/608e2006
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/608e2006
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/608e2006

Branch: refs/heads/master
Commit: 608e2006e394824f4b74261fcfa59bc8e33eac77
Parents: e99ea9c
Author: Benjamin Bannier <be...@mesosphere.io>
Authored: Wed Dec 14 14:31:50 2016 +0100
Committer: Till Toenshoff <to...@me.com>
Committed: Wed Dec 14 14:31:50 2016 +0100

----------------------------------------------------------------------
 src/tests/containerizer/cni_isolator_tests.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/608e2006/src/tests/containerizer/cni_isolator_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/cni_isolator_tests.cpp b/src/tests/containerizer/cni_isolator_tests.cpp
index 0380f2c..eb19407 100644
--- a/src/tests/containerizer/cni_isolator_tests.cpp
+++ b/src/tests/containerizer/cni_isolator_tests.cpp
@@ -568,7 +568,7 @@ TEST_F(CniIsolatorTest, ROOT_EnvironmentLibprocessIP)
   const string command =
       R"~(
       #!/bin/sh
-      if [ x"$LIBPROCESS_IP" == x"0.0.0.0" ]; then
+      if [ x"$LIBPROCESS_IP" = x"0.0.0.0" ]; then
         exit 0
       else
         exit 1