#!/bin/sh # This tests a helper, externally configured via ! # By default this is the fcntl helper, so this is a subset of test 002. # However, other helps can be tested by setting CTDB_TEST_MUTEX_HELPER. . "${TEST_SCRIPTS_DIR}/unit.sh" export CTDB_CLUSTER_MUTEX_HELPER="/bin/false" lockfile="${CTDB_TEST_TMP_DIR}/cluster_mutex.lockfile" trap 'rm ${lockfile}' 0 if [ -n "$CTDB_TEST_MUTEX_HELPER" ] ; then helper="$CTDB_TEST_MUTEX_HELPER" else t="${CTDB_SCRIPTS_HELPER_BINDIR}/ctdb_mutex_fcntl_helper" helper="!${t} ${lockfile}" fi test_case "No contention: lock, unlock" ok <