diff options
author | Martin Schwenke <martin@meltin.net> | 2016-07-27 15:24:58 +1000 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2016-07-28 05:00:18 +0200 |
commit | 2f7096494badbd4453d8a85dd3d56ae5614c543c (patch) | |
tree | c9c624feeab212fe7186d6541f9f5c0245efc37c | |
parent | 806f54f15dd0ef2375b06c2d19376aae324b8bef (diff) | |
download | samba-2f7096494badbd4453d8a85dd3d56ae5614c543c.tar.gz |
ctdb-tests: Avoid portability issue in porting tests
EUID is bash-only, so this condition always fails on other shells.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
-rwxr-xr-x | ctdb/tests/cunit/porting_tests_001.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ctdb/tests/cunit/porting_tests_001.sh b/ctdb/tests/cunit/porting_tests_001.sh index 5612c99034f..2b030079da4 100755 --- a/ctdb/tests/cunit/porting_tests_001.sh +++ b/ctdb/tests/cunit/porting_tests_001.sh @@ -11,7 +11,8 @@ remove_socket () test_cleanup remove_socket -if [ $EUID -eq 0 ] ; then +uid=$(id -u) +if [ "$uid" -eq 0 ] ; then ok "../common/system_linux.c:607 interface 'fake' not found" else ok "../common/system_linux.c:601 failed to open raw socket" |