summaryrefslogtreecommitdiff
path: root/source4/lib/replace/test
diff options
context:
space:
mode:
authorPaul Green <paulg@samba.org>2006-11-29 18:44:54 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:28:39 -0500
commit0c1218cbac93b1919a5c1cec28b4b716092fafc3 (patch)
tree46dd16ca02b2315203729e0cf355296ab01c8cd3 /source4/lib/replace/test
parent7b249237b0fee004c61dbf0eda79a3ab68e3ea9e (diff)
downloadsamba-0c1218cbac93b1919a5c1cec28b4b716092fafc3.tar.gz
samba-0c1218cbac93b1919a5c1cec28b4b716092fafc3.tar.bz2
samba-0c1218cbac93b1919a5c1cec28b4b716092fafc3.zip
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)
Diffstat (limited to 'source4/lib/replace/test')
-rw-r--r--source4/lib/replace/test/testsuite.c4
1 files changed, 2 insertions, 2 deletions
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));