1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00
samba-mirror/ctdb/tests/cunit/porting_tests_001.sh
Martin Schwenke 8fcd12ba29 ctdb-common: Move ctdb_system_check_iface_exists() to system.[ch]
The system_<os>.c files contain a lot of duplication, making
maintenance difficult.  These functions are being merged into
system_socket.[ch] and system.[ch].

This function doesn't need ctdb_sock_addr so put it with general
system utilities.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-07-02 08:51:21 +02:00

22 lines
374 B
Bash
Executable File

#!/bin/sh
. "${TEST_SCRIPTS_DIR}/unit.sh"
socket="${TEST_VAR_DIR}/test_sock.$$"
remove_socket ()
{
rm -f "$socket"
}
test_cleanup remove_socket
uid=$(id -u)
if [ "$uid" -eq 0 ] ; then
ok "ctdb_sys_check_iface_exists: Interface 'fake' not found"
else
ok "ctdb_sys_check_iface_exists: Failed to open raw socket"
fi
unit_test porting_tests --socket=${socket}