From 0c1218cbac93b1919a5c1cec28b4b716092fafc3 Mon Sep 17 00:00:00 2001 From: Paul Green Date: Wed, 29 Nov 2006 18:44:54 +0000 Subject: r19952: Fix socketpair() test case to write to fd(1) and read from fd(0) because when pipe files are substituting for unix domain sockets, pipes provide only uni-directional i/o capabilities. (This used to be commit d0a376732ed7b4f807b99a1c46c54ad1f07c85cf) --- source4/lib/replace/test/testsuite.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/lib/replace/test') diff --git a/source4/lib/replace/test/testsuite.c b/source4/lib/replace/test/testsuite.c index 48197cf721..a5defaf89d 100644 --- a/source4/lib/replace/test/testsuite.c +++ b/source4/lib/replace/test/testsuite.c @@ -390,14 +390,14 @@ static int test_socketpair(void) return false; } - if (write(sock[0], "automatisch", 12) == -1) { + if (write(sock[1], "automatisch", 12) == -1) { printf("failure: socketpair [\n" "write() failed: %s\n" "]\n", strerror(errno)); return false; } - if (read(sock[1], buf, 12) == -1) { + if (read(sock[0], buf, 12) == -1) { printf("failure: socketpair [\n" "read() failed: %s\n" "]\n", strerror(errno)); -- cgit