File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 2121#include <pthread.h>
2222#include <pwd.h>
2323#include <setjmp.h>
24+ #include <signal.h>
2425#include <stdarg.h>
2526#include <stdio.h>
2627#include <stdlib.h>
@@ -475,6 +476,7 @@ test_cleartext_path(void **state)
475476int
476477main (void )
477478{
479+ struct sigaction action = {0 };
478480 const struct CMUnitTest tests [] = {
479481 cmocka_unit_test_setup (test_connect , setup_local_f ),
480482 cmocka_unit_test_setup (test_invalid_user , setup_local_f ),
@@ -485,5 +487,10 @@ main(void)
485487 };
486488
487489 setenv ("CMOCKA_TEST_ABORT" , "1" , 1 );
490+
491+ /* ignore SIGPIPE */
492+ action .sa_handler = SIG_IGN ;
493+ sigaction (SIGPIPE , & action , NULL );
494+
488495 return cmocka_run_group_tests (tests , setup_glob_f , ln2_glob_test_teardown );
489496}
You can’t perform that action at this time.
0 commit comments