From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyril Hrubis Date: Mon, 8 Mar 2021 19:29:16 +0100 Subject: [LTP] [PATCH] splice02: Generate input in C In-Reply-To: References: <20210308154421.2002-1-pvorel@suse.cz> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ltp@lists.linux.it 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. -- Cyril Hrubis chrubis@suse.cz