mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
ctdb-tests: Porting tests should ignore unsupported features
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13520 Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
parent
23952c9165
commit
0273171c30
@ -11,11 +11,16 @@ remove_socket ()
|
||||
|
||||
test_cleanup remove_socket
|
||||
|
||||
uid=$(id -u)
|
||||
if [ "$uid" -eq 0 ] ; then
|
||||
ok "ctdb_sys_check_iface_exists: Interface 'fake' not found"
|
||||
os=$(uname)
|
||||
if [ "$os" = "Linux" ] ; then
|
||||
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
|
||||
else
|
||||
ok "ctdb_sys_check_iface_exists: Failed to open raw socket"
|
||||
ok_null
|
||||
fi
|
||||
|
||||
unit_test porting_tests --socket=${socket}
|
||||
|
@ -192,11 +192,15 @@ static int test_ctdb_get_peer_pid(void)
|
||||
fd = socket_server_wait_peer();
|
||||
|
||||
ret = ctdb_get_peer_pid(fd, &peer_pid);
|
||||
assert(ret == 0);
|
||||
assert(ret == 0 || ret == ENOSYS);
|
||||
|
||||
assert(peer_pid == globals.helper_pid);
|
||||
if (ret == 0) {
|
||||
assert(peer_pid == globals.helper_pid);
|
||||
|
||||
kill(peer_pid, SIGTERM);
|
||||
kill(peer_pid, SIGTERM);
|
||||
} else {
|
||||
kill(globals.helper_pid, SIGTERM);
|
||||
}
|
||||
|
||||
close(fd);
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user