From: chrubis@suse.cz
To: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Cc: Garrett Cooper <yanegomi@gmail.com>,
LTP <ltp-list@lists.sourceforge.net>,
Mike Frysinger <vapier@gentoo.org>
Subject: Re: [LTP] [PATCH] su01: fix the uncompleted string match
Date: Wed, 3 Apr 2013 13:52:19 +0200 [thread overview]
Message-ID: <20130403115218.GC2002@rei> (raw)
In-Reply-To: <1364958179-5410-1-git-send-email-gaowanlong@cn.fujitsu.com>
Hi!
> We find that sometimes "spawn /bin/su -l $USER1 -c whoami"
> may return two lines:
> "Attempting to create directory /home/su_usr2/perl5"
> "su_usr2"
> So the uncompleted "su_usr2" string match the first line,
> but we expect to match the second line here.
> So, fix it to match "su_usr2\r" instead.
>
> Reported-by: DAN LI <li.dan@cn.fujitsu.com>
> Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Looks good. What about making it even more strict with "^$USER\r"?
> expect {
> - "$USER1" { set i_am_correct 1 }
> + "$USER1\r" { set i_am_correct 1 }
> }
> }
> }
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire
the most talented Cisco Certified professionals. Visit the
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next parent reply other threads:[~2013-04-03 11:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1364958179-5410-1-git-send-email-gaowanlong@cn.fujitsu.com>
2013-04-03 11:52 ` chrubis [this message]
[not found] ` <515C2398.4060906@cn.fujitsu.com>
2013-04-03 12:55 ` [LTP] [PATCH] su01: fix the uncompleted string match chrubis
[not found] ` <515CDA27.9010309@cn.fujitsu.com>
2013-04-04 9:02 ` chrubis
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=20130403115218.GC2002@rei \
--to=chrubis@suse.cz \
--cc=gaowanlong@cn.fujitsu.com \
--cc=ltp-list@lists.sourceforge.net \
--cc=vapier@gentoo.org \
--cc=yanegomi@gmail.com \
/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.