This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] x86/CET: Add a re-exec test with legacy bitmap
- From: Florian Weimer <fweimer at redhat dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 20 Nov 2018 17:14:19 +0100
- Subject: Re: [PATCH] x86/CET: Add a re-exec test with legacy bitmap
- References: <20181120142225.20868-1-hjl.tools@gmail.com>
* 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