From: Hangbin Liu <liuhangbin@gmail.com>
To: Alexey Kodanev <alexey.kodanev@oracle.com>
Cc: vasily.isaenko@oracle.com,
LTP List <ltp-list@lists.sourceforge.net>,
Vincent Hsu <vincent.hsu@linaro.org>
Subject: Re: [LTP] [PATCH v2] ltp-networking/tcp_cmds/finger: fix finger bad user and host test
Date: Thu, 9 Oct 2014 10:58:08 +0800 [thread overview]
Message-ID: <20141009025808.GC24933@Leo.nay.redhat.com> (raw)
In-Reply-To: <54298ACA.1050101@oracle.com>
On Mon, Sep 29, 2014 at 08:37:30PM +0400, Alexey Kodanev wrote:
> Hi!
>
> On 09/25/2014 04:59 PM, Hangbin Liu wrote:
> >Finger always return 0 with bad user and host test. And it also return
> >different error message on different distros. So let's only check stderr
> >message and decide whether the test pass or fail.
> >
> >Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
> >---
> > testcases/network/tcp_cmds/finger/finger01 | 9 +++------
> > 1 file changed, 3 insertions(+), 6 deletions(-)
> >
> >diff --git a/testcases/network/tcp_cmds/finger/finger01 b/testcases/network/tcp_cmds/finger/finger01
> >index 203d746..89693ff 100755
> >--- a/testcases/network/tcp_cmds/finger/finger01
> >+++ b/testcases/network/tcp_cmds/finger/finger01
> >@@ -115,13 +115,10 @@ do_test2()
> > finger -x 2>&1 1>/dev/null && end_testcase "finger -x should fail"
>
> I would change redirection here to > /dev/null 2>&1 as we don't need to
> print stderr.
Yes, will correct it.
>
> > tst_resm TINFO "finger -bad user "
> >- finger $BADUSER 2>&1 1>/dev/null || end_testcase "finger $BADUSER"
> >- finger @$BADHOST 2>&1 1>/dev/null | grep "finger: unknown host" \
> >- || end_testcase "finger @$BADHOST"
> >- if ! finger $BADUSER@$BADHOST 2>&1 1>/dev/null \
> >- | grep "finger: unknown host"; then
> >+ [ "finger $BADUSER 2>&1 1>/dev/null" ] || end_testcase "finger $BADUSER"
> >+ [ "finger @$BADHOST 2>&1 1>/dev/null" ] || end_testcase "finger @$BADHOST"
> >+ [ "finger $BADUSER@$BADHOST 2>&1 1>/dev/null" ] || \
>
> Checking string constants... not command output, forgot to add '$()'?
Opps, sorry for the stupid mistake.
>
> Besides, it'd be great to get rid of obsolete 'net_cmdlib.sh' in the test.
OK, I will send another patch to clean up net_cmdlib.sh and mv read_opts() to
test_net.sh
--
Thanks & Best Regards
Hangbin Liu <liuhangbin@gmail.com>
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
prev parent reply other threads:[~2014-10-09 2:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-25 12:59 [LTP] [PATCH v2] ltp-networking/tcp_cmds/finger: fix finger bad user and host test Hangbin Liu
2014-09-29 16:37 ` Alexey Kodanev
2014-10-09 2:58 ` Hangbin Liu [this message]
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=20141009025808.GC24933@Leo.nay.redhat.com \
--to=liuhangbin@gmail.com \
--cc=alexey.kodanev@oracle.com \
--cc=ltp-list@lists.sourceforge.net \
--cc=vasily.isaenko@oracle.com \
--cc=vincent.hsu@linaro.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox