* [LTP] [PATCH] test.sh: tst_resm and tst_brkm enhance @ 2014-12-06 8:53 Zeng Linggang 2014-12-08 11:35 ` Cyril Hrubis 0 siblings, 1 reply; 4+ messages in thread From: Zeng Linggang @ 2014-12-06 8:53 UTC (permalink / raw) To: ltp-list If the output information is too long, we need a newline. But tst_resm and tst_brkm only print $1 and $2. This patch will make them print all parameters. Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com> --- testcases/lib/test.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/testcases/lib/test.sh b/testcases/lib/test.sh index eecbfba..9606b21 100644 --- a/testcases/lib/test.sh +++ b/testcases/lib/test.sh @@ -45,9 +45,11 @@ tst_resm() local mask=$? LTP_RET_VAL=$((LTP_RET_VAL|mask)) - echo "$TCID $TST_COUNT $1 : $2" + local ret=$1 + shift + echo "$TCID $TST_COUNT $ret : $@" - case "$1" in + case "$ret" in TPASS|TFAIL) TST_COUNT=$((TST_COUNT+1));; esac @@ -62,7 +64,9 @@ tst_brkm() *) tst_brkm TBROK "Invalid tst_brkm type '$1'";; esac - tst_resm "$1" "$2" + local ret=$1 + shift + tst_resm "$ret" "$@" tst_exit } -- 1.9.3 ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH] test.sh: tst_resm and tst_brkm enhance 2014-12-06 8:53 [LTP] [PATCH] test.sh: tst_resm and tst_brkm enhance Zeng Linggang @ 2014-12-08 11:35 ` Cyril Hrubis [not found] ` <1418042315.13292.4.camel@G08JYZSD130126.localdomain> 0 siblings, 1 reply; 4+ messages in thread From: Cyril Hrubis @ 2014-12-08 11:35 UTC (permalink / raw) To: Zeng Linggang; +Cc: ltp-list Hi! > If the output information is too long, we need a newline. > But tst_resm and tst_brkm only print $1 and $2. > This patch will make them print all parameters. Can you include examples usage after the change? -- Cyril Hrubis chrubis@suse.cz ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <1418042315.13292.4.camel@G08JYZSD130126.localdomain>]
* Re: [LTP] [PATCH] test.sh: tst_resm and tst_brkm enhance [not found] ` <1418042315.13292.4.camel@G08JYZSD130126.localdomain> @ 2014-12-08 13:00 ` Cyril Hrubis [not found] ` <1418087559.13292.5.camel@G08JYZSD130126.localdomain> 0 siblings, 1 reply; 4+ messages in thread From: Cyril Hrubis @ 2014-12-08 13:00 UTC (permalink / raw) To: Zeng Linggang; +Cc: ltp-list Hi! > In <LTP>/testcases/network/multicast/mc_cmds > -------------------------------------------------------------------------------- > ... > 113 ping -c2 -I $INTERFACE 224.0.0.1 > $PING_OUT > 114 if [ $? -ne 0 ]; then > 115 tst_resm TINFO "Trying to ping with $INTERFACE_DEVICE"\ > 116 "with the -I option instead of IP address" > ... > 122 fi > ... > -------------------------------------------------------------------------------- > > If "ping -c2 -I $INTERFACE 224.0.0.1 > $PING_OUT" failed, > it just output "Trying to ping with $INTERFACE_DEVICE", > "with the -I option instead of IP address" would be discard. > > After this patch, if "ping ..." failed the second string also output. Good catch. Can you please send a patch that includes this information in the description as well? -- Cyril Hrubis chrubis@suse.cz ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <1418087559.13292.5.camel@G08JYZSD130126.localdomain>]
* Re: [LTP] [PATCH v2] test.sh: tst_resm and tst_brkm enhance [not found] ` <1418087559.13292.5.camel@G08JYZSD130126.localdomain> @ 2014-12-09 12:02 ` Cyril Hrubis 0 siblings, 0 replies; 4+ messages in thread From: Cyril Hrubis @ 2014-12-09 12:02 UTC (permalink / raw) To: Zeng Linggang; +Cc: ltp-list Hi! Pushed, thanks. -- Cyril Hrubis chrubis@suse.cz ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-12-09 12:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-06 8:53 [LTP] [PATCH] test.sh: tst_resm and tst_brkm enhance Zeng Linggang
2014-12-08 11:35 ` Cyril Hrubis
[not found] ` <1418042315.13292.4.camel@G08JYZSD130126.localdomain>
2014-12-08 13:00 ` Cyril Hrubis
[not found] ` <1418087559.13292.5.camel@G08JYZSD130126.localdomain>
2014-12-09 12:02 ` [LTP] [PATCH v2] " Cyril Hrubis
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox