[PATCH v2] tests: allow tests to append tunables
Yury Khrustalev
yury.khrustalev@arm.com
Wed Apr 15 11:28:06 GMT 2026
On Mon, Apr 13, 2026 at 03:26:18PM +0100, Yury Khrustalev wrote:
> Many tests use Glibc tunables. The tunable values are provided via
> the GLIBC_TUNABLES env variable. Tests set it in makefiles using
>
> tst-foo-ENV = GLIBC_TUNABLES=tunable=value
>
> This overwrites environment for this test, so if another env var is
> set elsewhere, one of these changes would be lost. The correct way
> should be to append to test's environment:
>
> tst-foo-ENV += GLIBC_TUNABLES=tunable=value
>
> However, if two or more tunables need to be set for the same test,
> the 'tunable=value' part should be appended to previously defined
> GLIBC_TUNABLES env variable.
>
> This commit adds 'tunable-add' that can be used to correctly append
> another tunable to a test's environment. We also change tests in the
> malloc and misc folder.
If it is better to use something like as suggested in [1]
tst-foo-TUNABLES
instead of modifying the whole environment of the test via
tst-foo-ENV += GLIBC_TUNABLES=tunable=value
or
$(eval $(call tunable-add, ...))
I can certainly look into this and send another patch. This might be a
better way of doing it.
Thanks,
Yury
----
[1]: https://inbox.sourceware.org/libc-alpha/53ce1324-63a9-488b-955b-99700e4fdcd6@linaro.org
More information about the Libc-alpha
mailing list