summaryrefslogtreecommitdiff
path: root/src/user/app/tests/pipe.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/user/app/tests/pipe.c')
-rw-r--r--src/user/app/tests/pipe.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/user/app/tests/pipe.c b/src/user/app/tests/pipe.c
index d6e954a..2d67fa7 100644
--- a/src/user/app/tests/pipe.c
+++ b/src/user/app/tests/pipe.c
@@ -17,28 +17,28 @@ void test_pipe(void) {
if (!fork()) {
/* those repeated asserts ensure that you can't read/write to the wrong ends */
assert(_syscall_read(ends[1], buf, 16, 0) < 0);
- assert(_syscall_write(ends[0], buf, 16, 0) < 0);
+ assert(_syscall_write(ends[0], buf, 16, 0, 0) < 0);
- ret = _syscall_write(ends[1], pipe_msgs[0], 5, -1);
+ ret = _syscall_write(ends[1], pipe_msgs[0], 5, -1, 0);
assert(ret == 5);
assert(_syscall_read(ends[1], buf, 16, 0) < 0);
- assert(_syscall_write(ends[0], buf, 16, 0) < 0);
+ assert(_syscall_write(ends[0], buf, 16, 0, 0) < 0);
- ret = _syscall_write(ends[1], pipe_msgs[1], 5, -1);
+ ret = _syscall_write(ends[1], pipe_msgs[1], 5, -1, 0);
assert(ret == 5);
exit(0);
} else {
assert(_syscall_read(ends[1], buf, 16, 0) < 0);
- assert(_syscall_write(ends[0], buf, 16, 0) < 0);
+ assert(_syscall_write(ends[0], buf, 16, 0, 0) < 0);
ret = _syscall_read(ends[0], buf, 16, 0);
assert(ret == 5);
assert(!memcmp(buf, pipe_msgs[0], 5));
assert(_syscall_read(ends[1], buf, 16, 0) < 0);
- assert(_syscall_write(ends[0], buf, 16, 0) < 0);
+ assert(_syscall_write(ends[0], buf, 16, 0, 0) < 0);
_syscall_read(ends[0], buf, 16, 0);
assert(ret == 5);
@@ -68,7 +68,7 @@ void test_pipe(void) {
for (int i = 0; i < 16; i++) {
if (!fork()) {
close(ends[0]);
- assert(_syscall_write(ends[1], buf, 16, 0) < 0);
+ assert(_syscall_write(ends[1], buf, 16, 0, 0) < 0);
exit(0);
}
}
@@ -82,7 +82,7 @@ void test_pipe(void) {
assert(_syscall_pipe(ends, 0) >= 0);
for (int i = 0; i < 16; i++) {
if (!fork()) {
- assert(_syscall_write(ends[1], pipe_msgs[0], 5, -1) == 5);
+ assert(_syscall_write(ends[1], pipe_msgs[0], 5, -1, 0) == 5);
exit(0);
}
}
@@ -105,10 +105,10 @@ void test_pipe(void) {
}
close(ends[0]);
for (int i = 0; i < 16; i++) {
- assert(_syscall_write(ends[1], pipe_msgs[1], 5, -1) == 5);
+ assert(_syscall_write(ends[1], pipe_msgs[1], 5, -1, 0) == 5);
_syscall_await();
}
- assert(_syscall_write(ends[1], pipe_msgs[1], 5, -1) < 0);
+ assert(_syscall_write(ends[1], pipe_msgs[1], 5, -1, 0) < 0);
close(ends[1]);