[PATCH] stdlib: Test using setenv with updated environ [BZ #32588]
Florian Weimer
fweimer@redhat.com
Fri Jan 24 23:08:51 GMT 2025
* H. J. Lu:
> +int
> +do_test (void)
> +{
> + char *valp;
> + static char *dummy_environ[] = { NULL };
> + environ = dummy_environ;
> + setenv ("A", "1", 0);
> + valp = getenv ("A");
> + TEST_VERIFY_EXIT (valp[0] == '1' && valp[1] == '\0');
> + return 0;
> +}
> +
> +#include <support/test-driver.c>
Looks good.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
Thanks,
Florian
More information about the Libc-alpha
mailing list