From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] splice02: Generate input in C
Date: Tue, 9 Mar 2021 07:03:40 +0100 [thread overview]
Message-ID: <YEcPvIckAEbmMBi9@pevik> (raw)
In-Reply-To: <YEZs/MTW0Pcyz6Ml@yuki.lan>
Hi Cyril,
> Hi!
> > > I do wonder if this should be replaced with something that includes a
> > > shell pipe instead. It has been selected here to make sure we pass the
> > > command line correctly to a shell interpreter.
> > > Maybe something as:
> > > shell_test01 echo "SUCCESS" | cat
> > I guess you mean to add another test to cover shell pipe.
> > Makes sense to me, but I'd wrap it to a test file, e.g. something like:
> > cat shell01.sh
> > #!/bin/sh
> > TST_TESTFUNC=do_test
> > TST_NEEDS_CMDS="cat"
> > . tst_test.sh
> > do_test()
> > {
> > EXPECT_PASS [ "$(echo 'SUCCESS' | cat)" = "SUCCESS" ]
> > }
> > tst_run
> That would not work, the pipe is supposed to be in the runtest file.
Do you want to test that runtest is working with pipe?
I considered anything but shell script with getopt parameters a bit strange and
thought it'd be removed in new shell runner. But obviously you want to keep it.
But in case of failure script don't detect it. e.g.:
echo "SUCCESS" | cat /asdf
cat: /asdf: No such file or directory
=> there is no TFAIL/TBROK/TCONF. Not sure if all users check exit status (which
they should now, because that is the only common thing so far).
Kind regards,
Petr
next prev parent reply other threads:[~2021-03-09 6:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-08 15:44 [LTP] [PATCH] splice02: Generate input in C Petr Vorel
2021-03-08 16:40 ` Cyril Hrubis
2021-03-08 18:08 ` Petr Vorel
2021-03-08 18:29 ` Cyril Hrubis
2021-03-09 6:03 ` Petr Vorel [this message]
2021-03-09 8:15 ` Cyril Hrubis
2021-03-09 9:22 ` Petr Vorel
2021-03-09 12:26 ` Cyril Hrubis
2021-03-09 14:14 ` Petr Vorel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YEcPvIckAEbmMBi9@pevik \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.