ctdb: close the correct pipe fd in a test
authorRalph Boehme <slow@samba.org>
Tue, 19 Jun 2018 08:35:04 +0000 (10:35 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 10 Jul 2018 18:31:13 +0000 (20:31 +0200)
commit93f61639a64f0b3156437b75c31330aa189d3db7
treea5780040369ff7028875acc027a44f06372c07a7
parentb12f6c6f76440788cadda1fca4fe30531301f668
ctdb: close the correct pipe fd in a test

This was discovered in an autobuild with a patched tevent that used the
"poll" backend by default. Test failure:

$ bin/sock_daemon_test /dev/shm/sock_daemon_test.pid /dev/shm/sock_daemon_test.sock 5
test5[28011]: daemon started, pid=28011
test5[28011]: listening on /dev/shm/sock_daemon_test.sock
sock_daemon_test: ../ctdb/tests/src/sock_daemon_test.c:980: test5: Assertion `ret == i+1' failed.
Abgebrochen (Speicherabzug geschrieben)
metze@SERNOX14:~/devel/samba/4.0/master4-test$ test5[28011]: PID 28010 gone away, exiting
test5[28011]: Shutting down
sock_daemon_test: ../ctdb/tests/src/sock_daemon_test.c:964: test5:
Assertion `ret == EINTR' failed.

After an epic debugging session we spotted the problem.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
ctdb/tests/src/sock_daemon_test.c