summaryrefslogtreecommitdiffstats
path: root/tests/features/ipc.t
blob: 5c92287eaa120a99f9a332c8059f0b12aad8aacd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash

. $(dirname $0)/../include.rc

#G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=GH269
#G_TESTDEF_TEST_STATUS_NETBSD7=BAD_TEST,BUG=GH269

cleanup;
mkdir -p $B0/1
mkdir -p $M0

TEST glusterd
TEST pidof glusterd
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 (EOPNOTSUPP) instead of a crash, RPC error, etc.
EXPECT ${EOPNOTSUPP}  $PYTHON $(dirname $0)/ipctest.py $H0 $V0

unset LD_PRELOAD
cleanup;