[PATCH] x86/CET: Add a re-exec test with legacy bitmap

Florian Weimer fweimer@redhat.com
Tue Nov 20 16:14:00 GMT 2018


* H. J. Lu:

> +/* Nonzero if the program gets called via `exec'.  */
> +static int restart;
> +
> +#define CMDLINE_OPTIONS \
> +  { "restart", no_argument, &restart, 1 },
> +
> +extern int do_test (int argc, char *argv[]);
> +
> +#include "../test-skeleton.c"

Please do not use test-skeleton.c for new tests.

> +  if (argc != 1 && argc != 4)
> +    error (EXIT_FAILURE, 0, "wrong number of arguments (%d)", argc);

error prints to standard error and is therefore not appropriate in
tests.

> +
> +  if (argc == 4)
> +    execl (argv[0], argv[0], argv[1], argv[2], argv[3], "--direct",
> +	   "--restart",  NULL);

I think you have to add further makefile changes to support
--disable-hardcoded-path-in-tests.

Thanks,
Florian



More information about the Libc-alpha mailing list