Skip to content

Commit aabfda9

Browse files
committed
test(input_output): close file descriptors
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
1 parent d34e688 commit aabfda9

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

tests/system/input_output.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ void test_ocre_container_output_stdout(void)
6969
TEST_ASSERT_EQUAL_STRING("argv[1]=" ARG_TEST_STRING "\n", buf);
7070

7171
ocre_container_kill(container);
72+
close(stdout_pair[0]);
7273
ocre_container_wait(container, NULL);
7374

7475
ocre_context_remove_container(context, container);
@@ -98,6 +99,8 @@ void test_ocre_container_input_stdin_output_stdout(void)
9899
TEST_ASSERT_EQUAL_STRING(ARG_TEST_STRING "\n", buf);
99100

100101
ocre_container_kill(container);
102+
close(stdin_pair[0]);
103+
close(stdout_pair[0]);
101104
ocre_container_wait(container, NULL);
102105

103106
ocre_context_remove_container(context, container);
@@ -135,6 +138,8 @@ void test_ocre_container_input_stdin_output_stderr(void)
135138
TEST_ASSERT_EQUAL_STRING(ARG_TEST_STRING "\n", buf);
136139

137140
ocre_container_kill(container);
141+
close(stdin_pair[0]);
142+
close(stderr_pair[0]);
138143
ocre_container_wait(container, NULL);
139144

140145
ocre_context_remove_container(context, container);

0 commit comments

Comments
 (0)