Re: [PATCH v2 1/2] perf test workload noploop: Name the noploop process

From: Namhyung Kim
Date: Fri Jun 20 2025 - 15:37:04 EST


Hi Ian,

On Wed, Jun 18, 2025 at 05:20:33PM -0700, Ian Rogers wrote:
> Name the noploop process "perf-noploop" so that tests can easily check
> for its existence.
>
> Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
> ---
> tools/perf/tests/workloads/noploop.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/tools/perf/tests/workloads/noploop.c b/tools/perf/tests/workloads/noploop.c
> index 940ea5910a84..8b954d466083 100644
> --- a/tools/perf/tests/workloads/noploop.c
> +++ b/tools/perf/tests/workloads/noploop.c
> @@ -2,6 +2,8 @@
> #include <stdlib.h>
> #include <signal.h>
> #include <unistd.h>
> +#include <linux/prctl.h>
> +#include <sys/prctl.h>

I'm afraid it'd introduce a build failure on musl. Please see

https://lore.kernel.org/linux-perf-users/20250611092542.F4ooE2FL@xxxxxxxxxxxxx/

I think <sys/prctl.h> would be enough.

Thanks,
Namhyung


> #include <linux/compiler.h>
> #include "../tests.h"
>
> @@ -16,6 +18,7 @@ static int noploop(int argc, const char **argv)
> {
> int sec = 1;
>
> + prctl(PR_SET_NAME, "perf-noploop");
> if (argc > 0)
> sec = atoi(argv[0]);
>
> --
> 2.50.0.rc2.701.gf1e915cc24-goog
>