summaryrefslogtreecommitdiffstats
path: root/tests/features/ipc.t
diff options
context:
space:
mode:
Diffstat (limited to 'tests/features/ipc.t')
-rwxr-xr-xtests/features/ipc.t18
1 files changed, 16 insertions, 2 deletions
diff --git a/tests/features/ipc.t b/tests/features/ipc.t
index 2aaca6620bf..55ce8c871c1 100755
--- a/tests/features/ipc.t
+++ b/tests/features/ipc.t
@@ -13,9 +13,23 @@ TEST $CLI volume info;
TEST $CLI volume create $V0 $H0:$B0/1
TEST $CLI volume start $V0
+# Find OS-dependent EOPNOTSUPP value from system headers
+EOPNOTSUPP=$( echo '#include <errno.h>\\EOPNOTSUPP\\' | tr '\\' '\n' | \
+ cc -E -c - | tail -1 )
+
+# liglusterfs embbeds its own UUID implementation. The function name
+# may be the same as in built(in implementation from libc, but with
+# different prototype. In that case, we must make sure python will
+# use libglusterfs's version, and dlopen() does not make any guarantee
+# on this. By preloading libglusterfs.so before launching python, we
+# ensure libglusterfs's UUID functions will be used.
+LD_PRELOAD=${prefix}/lib/libglusterfs.so
+export LD_PRELOAD
+
# This is a pretty lame test. Basically we just want to make sure that we
# get all the way through the translator stacks on client and server to get a
-# simple error (95 = EOPNOTUPP) instead of a crash, RPC error, etc.
-EXPECT 95 $PYTHON $(dirname $0)/ipctest.py $H0 $V0
+# simple error (EOPNOTSUPP) instead of a crash, RPC error, etc.
+EXPECT ${EOPNOTSUPP} $PYTHON $(dirname $0)/ipctest.py $H0 $V0
+unset LD_PRELOAD
cleanup;