From: Donet Tom donettom@linux.ibm.com
execv argument is an array of pointers to null-terminated strings. In this patch we added NULL in the execv argument to fix the test failure.
Signed-off-by: Donet Tom donettom@linux.ibm.com Signed-off-by: Aboorva Devarajan aboorvad@linux.ibm.com --- tools/testing/selftests/mm/ksm_functional_tests.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/mm/ksm_functional_tests.c b/tools/testing/selftests/mm/ksm_functional_tests.c index d7d3c22c077a..6ea50272a0ba 100644 --- a/tools/testing/selftests/mm/ksm_functional_tests.c +++ b/tools/testing/selftests/mm/ksm_functional_tests.c @@ -579,7 +579,7 @@ static void test_prctl_fork_exec(void) return; } else if (child_pid == 0) { char *prg_name = "./ksm_functional_tests"; - char *argv_for_program[] = { prg_name, FORK_EXEC_CHILD_PRG_NAME }; + char *argv_for_program[] = { prg_name, FORK_EXEC_CHILD_PRG_NAME, NULL };
execv(prg_name, argv_for_program); return;