On Tue, Apr 16, 2024 at 11:44 AM Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote: > > Thanks. How does this look? > > --- a/tools/testing/selftests/kselftest_harness.h~selftests-harness-remove-use-of-line_max-fix-fix > +++ a/tools/testing/selftests/kselftest_harness.h > @@ -1163,8 +1163,12 @@ void __run_test(struct __fixture_metadat > t->trigger = 0; > memset(t->results->reason, 0, sizeof(t->results->reason)); > > - asprintf(&test_name, "%s%s%s.%s", f->name, > - variant->name[0] ? "." : "", variant->name, t->name); > + if (asprintf(&test_name, "%s%s%s.%s", f->name, > + variant->name[0] ? "." : "", variant->name, t->name) == -1) { > + ksft_print_msg("ERROR ALLOCATING MEMORY\n"); > + t->exit_code = KSFT_FAIL; > + _exit(t->exit_code); > + } > > ksft_print_msg(" RUN %s ...\n", test_name); > > _ > Thanks for fixing this, that looks good to me. Reviewed-by: Edward Liaw <edliaw@xxxxxxxxxx>