Re: [PATCH v3 08/12] amd-pstate-ut: Add ability to run a single testcase

From: K Prateek Nayak

Date: Wed Mar 25 2026 - 00:34:30 EST


Hello Gautham,

On 3/24/2026 9:59 AM, Gautham R. Shenoy wrote:
> +static bool test_in_list(const char *list, const char *name)
> +{
> + size_t name_len = strlen(name);
> + const char *p = list;
> +
> + while (*p) {
> + const char *sep = strchr(p, ';');

Any particular reason for using a ";" as the separator instead of ","?

I personally prefer "," because with ";", I need to explicitly add
'' around the test_list otherwise bash thinks the command ends at ";"
but with "," that is avoided.

Thoughts?

> + size_t token_len = sep ? sep - p : strlen(p);
> +
> + if (token_len == name_len && !strncmp(p, name, token_len))
> + return true;
> +
> + if (!sep)
> + break;
> + p = sep + 1;
> + }
> +
> + return false;
> +}
--
Thanks and Regards,
Prateek