This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: test-container: ability to specify exec path
- From: Florian Weimer <fweimer at redhat dot com>
- To: DJ Delorie <dj at redhat dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Wed, 11 Dec 2019 12:50:30 +0100
- Subject: Re: test-container: ability to specify exec path
- References: <xn7e33u0nv.fsf@greed.delorie.com>
* DJ Delorie:
> Carlos asked for something like this for $ORIGIN testing...
>
> diff --git a/nss/tst-nss-test3.root/tst-nss-test3.script b/nss/tst-nss-test3.root/tst-nss-test3.script
> index a10beb1e6c..03ba5c5276 100644
> --- a/nss/tst-nss-test3.root/tst-nss-test3.script
> +++ b/nss/tst-nss-test3.root/tst-nss-test3.script
> @@ -1,2 +1,3 @@
> cp $B/nss/libnss_test1.so $L/libnss_test1.so.2
> cp $B/nss/libnss_test2.so $L/libnss_test2.so.2
> +exec /usr/bin/foo
> diff --git a/support/test-container.c b/support/test-container.c
> index 5d08979df3..d4ecfe8a98 100644
> --- a/support/test-container.c
> +++ b/support/test-container.c
> @@ -95,6 +95,7 @@ int verbose = 0;
> mv FILE FILE
> cp FILE FILE
> rm FILE
> + exec PATH
> FILE must start with $B/, $S/, $I/, $L/, or /
> (expands to build dir, source dir, install dir, library dir
> (in container), or container's root)
> @@ -104,6 +105,7 @@ int verbose = 0;
> - 'mv': A minimal move files command.
> - 'cp': A minimal copy files command.
> - 'rm': A minimal remove files command.
> + - 'exec': change where test is run from (may end in /)
So it's the path to the executable in the container, and the test
program is copied there?
I think you should make this more explicit, because the comment above
sounds like as this changes the current directory for the test.
Thanks,
Florian