提交 64297898 编写于 作者: M Mark Brown 提交者: Will Deacon

kselftest/arm64: Set test names prior to starting children

Since we now flush output immediately on starting children we should ensure
that the child name is set beforehand so that any output that does get
flushed from the newly created child has the name of the child attached.
Signed-off-by: NMark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20221124120722.150988-1-broonie@kernel.orgSigned-off-by: NWill Deacon <will@kernel.org>
上级 284d2b44
...@@ -290,12 +290,12 @@ static void start_fpsimd(struct child_data *child, int cpu, int copy) ...@@ -290,12 +290,12 @@ static void start_fpsimd(struct child_data *child, int cpu, int copy)
{ {
int ret; int ret;
child_start(child, "./fpsimd-test");
ret = asprintf(&child->name, "FPSIMD-%d-%d", cpu, copy); ret = asprintf(&child->name, "FPSIMD-%d-%d", cpu, copy);
if (ret == -1) if (ret == -1)
ksft_exit_fail_msg("asprintf() failed\n"); ksft_exit_fail_msg("asprintf() failed\n");
child_start(child, "./fpsimd-test");
ksft_print_msg("Started %s\n", child->name); ksft_print_msg("Started %s\n", child->name);
} }
...@@ -307,12 +307,12 @@ static void start_sve(struct child_data *child, int vl, int cpu) ...@@ -307,12 +307,12 @@ static void start_sve(struct child_data *child, int vl, int cpu)
if (ret < 0) if (ret < 0)
ksft_exit_fail_msg("Failed to set SVE VL %d\n", vl); ksft_exit_fail_msg("Failed to set SVE VL %d\n", vl);
child_start(child, "./sve-test");
ret = asprintf(&child->name, "SVE-VL-%d-%d", vl, cpu); ret = asprintf(&child->name, "SVE-VL-%d-%d", vl, cpu);
if (ret == -1) if (ret == -1)
ksft_exit_fail_msg("asprintf() failed\n"); ksft_exit_fail_msg("asprintf() failed\n");
child_start(child, "./sve-test");
ksft_print_msg("Started %s\n", child->name); ksft_print_msg("Started %s\n", child->name);
} }
...@@ -320,16 +320,16 @@ static void start_ssve(struct child_data *child, int vl, int cpu) ...@@ -320,16 +320,16 @@ static void start_ssve(struct child_data *child, int vl, int cpu)
{ {
int ret; int ret;
ret = asprintf(&child->name, "SSVE-VL-%d-%d", vl, cpu);
if (ret == -1)
ksft_exit_fail_msg("asprintf() failed\n");
ret = prctl(PR_SME_SET_VL, vl | PR_SME_VL_INHERIT); ret = prctl(PR_SME_SET_VL, vl | PR_SME_VL_INHERIT);
if (ret < 0) if (ret < 0)
ksft_exit_fail_msg("Failed to set SME VL %d\n", ret); ksft_exit_fail_msg("Failed to set SME VL %d\n", ret);
child_start(child, "./ssve-test"); child_start(child, "./ssve-test");
ret = asprintf(&child->name, "SSVE-VL-%d-%d", vl, cpu);
if (ret == -1)
ksft_exit_fail_msg("asprintf() failed\n");
ksft_print_msg("Started %s\n", child->name); ksft_print_msg("Started %s\n", child->name);
} }
...@@ -341,12 +341,12 @@ static void start_za(struct child_data *child, int vl, int cpu) ...@@ -341,12 +341,12 @@ static void start_za(struct child_data *child, int vl, int cpu)
if (ret < 0) if (ret < 0)
ksft_exit_fail_msg("Failed to set SME VL %d\n", ret); ksft_exit_fail_msg("Failed to set SME VL %d\n", ret);
child_start(child, "./za-test");
ret = asprintf(&child->name, "ZA-VL-%d-%d", vl, cpu); ret = asprintf(&child->name, "ZA-VL-%d-%d", vl, cpu);
if (ret == -1) if (ret == -1)
ksft_exit_fail_msg("asprintf() failed\n"); ksft_exit_fail_msg("asprintf() failed\n");
child_start(child, "./za-test");
ksft_print_msg("Started %s\n", child->name); ksft_print_msg("Started %s\n", child->name);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册