mirror of
https://salsa.debian.org/ha-team/libqb
synced 2026-01-21 20:52:57 +00:00
fix a couple of errors reported by covscan 1. /usr/lib64/libqb/tests/resources.test:8:34: warning[SC2039]: In POSIX sh, UID is undefined. 1. /usr/lib64/libqb/tests/resources.test:8:30: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. 1. /usr/lib64/libqb/tests/ipc_sock.test:10:34: warning[SC2039]: In POSIX sh, UID is undefined. 1. /usr/lib64/libqb/tests/ipc_sock.test:10:30: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
22 lines
535 B
Bash
Executable File
22 lines
535 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# Run the IPC tests under the stat wrapper,
|
|
# this simulates /etc/libqb/use-filesystem-sockets existing
|
|
# so we can test both options without breaking other things
|
|
# that might be running on this system.
|
|
#
|
|
# This creates sockets in /var/run so needs to be root
|
|
#
|
|
if [ "$(uname -s)" = "Linux" ] && [ "`id -u`" = "0" ]
|
|
then
|
|
if [ -f "$(pwd)/.libs/libstat_wrapper.so" ]
|
|
then
|
|
export "LD_PRELOAD=$(pwd)/.libs/libstat_wrapper.so"
|
|
else
|
|
export "LD_PRELOAD=$(pwd)/libstat_wrapper.so"
|
|
fi
|
|
./ipc.test
|
|
else
|
|
exit 0
|
|
fi
|