Turn the 'void integck(void)' function into 'static int integck(void)'.
We need to teach the test to gracefully handle some error cases like
'EROFS' instead of failing and exiting straight away. And the ground
work for this is making all functions return errors. This is the first
tiny step in this direction.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
do_an_operation();
}
-void integck(void)
+static int integck(void)
{
pid_t pid;
int64_t rpt;
top_dir = dir_new(NULL, dir_name);
if (!top_dir)
- return;
+ return -1;
srand(pid);
close_open_files();
tests_clear_dir(dir_name);
CHECK(rmdir(dir_name) != -1);
+
+ return 0;
}
/*
}
/* Do the actual test */
- integck();
- return 0;
+ ret = integck();
+ if (ret)
+ return EXIT_FAILURE;
+
+ return EXIT_SUCCESS;
}