Assert return values.
This commit is contained in:
parent
fbca4e8b9a
commit
aaa463ec9f
@ -56,7 +56,7 @@ void test_instruction_read() {
|
|||||||
"5.test2,10.hellohello,15.worldworldworld;";
|
"5.test2,10.hellohello,15.worldworldworld;";
|
||||||
|
|
||||||
/* Create pipe */
|
/* Create pipe */
|
||||||
pipe(fd);
|
CU_ASSERT_EQUAL_FATAL(pipe(fd), 0);
|
||||||
|
|
||||||
/* File descriptors */
|
/* File descriptors */
|
||||||
rfd = fd[0];
|
rfd = fd[0];
|
||||||
@ -72,7 +72,10 @@ void test_instruction_read() {
|
|||||||
/* Child (pipe writer) */
|
/* Child (pipe writer) */
|
||||||
if (childpid != 0) {
|
if (childpid != 0) {
|
||||||
close(rfd);
|
close(rfd);
|
||||||
write(wfd, test_string, sizeof(test_string));
|
CU_ASSERT_EQUAL(
|
||||||
|
write(wfd, test_string, sizeof(test_string)),
|
||||||
|
sizeof(test_string)
|
||||||
|
);
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ void test_instruction_write() {
|
|||||||
int fd[2], childpid;
|
int fd[2], childpid;
|
||||||
|
|
||||||
/* Create pipe */
|
/* Create pipe */
|
||||||
pipe(fd);
|
CU_ASSERT_EQUAL_FATAL(pipe(fd), 0);
|
||||||
|
|
||||||
/* File descriptors */
|
/* File descriptors */
|
||||||
rfd = fd[0];
|
rfd = fd[0];
|
||||||
|
Loading…
Reference in New Issue
Block a user