Skip to content

Commit 3447f8d

Browse files
committed
tst_test.c: Change fork_testrun() return type to void
Return code is not used anymore. Link: https://lore.kernel.org/ltp/20251107102939.1111074-9-pvorel@suse.cz/ Fixes: a1f8270 ("lib/tst_test.c: Fix tst_brk() handling") Reviewed-by: Avinesh Kumar <akumar@suse.de> Signed-off-by: Petr Vorel <pvorel@suse.cz>
1 parent c442d75 commit 3447f8d

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

lib/tst_test.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1880,7 +1880,7 @@ void tst_set_runtime(int runtime)
18801880
heartbeat();
18811881
}
18821882

1883-
static int fork_testrun(void)
1883+
static void fork_testrun(void)
18841884
{
18851885
int status;
18861886

@@ -1911,8 +1911,8 @@ static int fork_testrun(void)
19111911
SAFE_SIGNAL(SIGINT, SIG_DFL);
19121912

19131913
if (tst_test->taint_check && tst_taint_check()) {
1914-
tst_res(TFAIL, "Kernel is now tainted.");
1915-
return TFAIL;
1914+
tst_res(TFAIL, "Kernel is now tainted");
1915+
return;
19161916
}
19171917

19181918
if (tst_test->forks_child && kill(-test_pid, SIGKILL) == 0)
@@ -1922,7 +1922,7 @@ static int fork_testrun(void)
19221922
tst_brk(TBROK, "Child returned with %i", WEXITSTATUS(status));
19231923

19241924
if (context->abort_flag)
1925-
return 0;
1925+
return;
19261926

19271927
if (WIFSIGNALED(status) && WTERMSIG(status) == SIGKILL) {
19281928
tst_res(TINFO, "If you are running on slow machine, "
@@ -1932,8 +1932,6 @@ static int fork_testrun(void)
19321932

19331933
if (WIFSIGNALED(status))
19341934
tst_brk(TBROK, "Test killed by %s!", tst_strsig(WTERMSIG(status)));
1935-
1936-
return 0;
19371935
}
19381936

19391937
static struct tst_fs *lookup_fs_desc(const char *fs_type, int all_filesystems)

0 commit comments

Comments
 (0)