1
0
mirror of https://github.com/gluster/glusterfs.git synced 2026-02-05 15:48:40 +01:00
Files
glusterfs/tests/features/ipc.t
Niels de Vos d26f0bac14 tests: disable IPC test-case
The IPC test-case is not correct, and can cause segfaults or hangs. The
ipctest.py script calls glfs_ipc() with the `glfs_t` structure, but
should do so with a `glfs_fd_t`.

In addition, the test-case is written in a way that we do not suggest to
use libgfapi. Python scripts are encouraged to use the bindings from the
libgfapi-python project. It would be better to rewrite the test in C so
that there is type-checking while compiling and no additional issues
with portability (see `LD_PRELOAD` note in the `.t` file).

Change-Id: Icb52b5b1585fbee98f2c694547c31df0aa2ba70b
Updates: #269
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: https://review.gluster.org/17786
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
2017-07-18 11:13:34 +00:00

39 lines
1.2 KiB
Bash
Executable File

#!/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;