torture: Make init program dump command-line arguments

This commit causes the init program generated by mkinitrd.sh dump out
its parameters.  Although this is in some sense redundant given that
the kernel already dumps them out, confirmation can be a good thing.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
This commit is contained in:
Paul E. McKenney 2023-07-13 18:22:07 -07:00
parent 93a556b8b3
commit 451d2a52f6
1 changed files with 5 additions and 1 deletions

View File

@ -33,12 +33,16 @@ cat > init.c << '___EOF___'
volatile unsigned long delaycount; volatile unsigned long delaycount;
int main(int argc, int argv[]) int main(int argc, char *argv[])
{ {
int i; int i;
struct timeval tv; struct timeval tv;
struct timeval tvb; struct timeval tvb;
printf("Torture-test rudimentary init program started, command line:\n");
for (i = 0; i < argc; i++)
printf(" %s", argv[i]);
printf("\n");
for (;;) { for (;;) {
sleep(1); sleep(1);
/* Need some userspace time. */ /* Need some userspace time. */