From: Subrata Modak <subrata@linux.vnet.ibm.com>
To: Mitani <mitani@ryobi.co.jp>
Cc: ltp-list@lists.sourceforge.net, kamimura@ryobi.co.jp
Subject: Re: [LTP] [PATCH] fix "mail" test
Date: Mon, 14 Jun 2010 18:04:24 +0530 [thread overview]
Message-ID: <1276518865.4885.8.camel@subratamodak.linux.ibm.com> (raw)
In-Reply-To: <000001cb086a$f2fc55d0$d8f50170$@co.jp>
Thanks.
Regards--
Subrata
On Thu, 2010-06-10 at 16:02 +0900, Mitani wrote:
> Hi,
>
> I want to suggest a patch for #2 test of "mail_tests.sh".
>
> The failure of #2 is as following:
> ------------
> mail_tests::mail02 0 TINFO : Test #2: mail u...@bad-domain will result
> in failure
> mail_tests::mail02 0 TINFO : Test #2: to deliver the mail. Mailer
> daemon should
> mail_tests::mail02 0 TINFO : Test #2: report this failure.
> mail_tests::mail02 2 TFAIL : Test #2: No new mail for root. Reason:
> No mail for root
> ------------
>
> I use RHEL5.4, RHEL4.8 systems and x86, x86_64, ia64 architectures.
> "#2" test failed in all combinations.
>
> At "#2" test, there is "No mail for root" in "tst_mail.res" file.
> I want to add this condition to judgment for "tst_mail.res".
>
> The other day, I made a question whether #2 test failed or not
> in other systems.
> -->http://www.mail-archive.com/ltp-list@lists.sourceforge.net/msg10184.html
> But I have received no reply yet. Therefore I don't know about other
> systems, and I made this revision to become effective for only RHEL
> systems.
>
>
> Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp>
>
> ============
> --- a/testcases/commands/mail/mail_tests.sh 2010-06-02
> 21:46:46.000000000 +0900
> +++ b/testcases/commands/mail/mail_tests.sh 2010-06-09
> 15:33:19.000000000 +0900
> @@ -140,14 +140,18 @@
>
> export TCID=mail_tests::mail02
> export TST_COUNT=2
> -RC=0
> RC1=0
> RC2=0
> +RC3=0
> +RC4=0
>
> tst_resm TINFO "Test #2: mail user@bad-domain will result in failure"
> tst_resm TINFO "Test #2: to deliver the mail. Mailer daemon should"
> tst_resm TINFO "Test #2: report this failure."
>
> +tvar=${MACHTYPE%-*}
> +tvar=${tvar#*-}
> +
> # Don't use underscores in domain names (they're illegal)...
> mail -s "Test" root@thisdomaindoesnotexist < $LTPTMP/tst_mail.in \
> > $LTPTMP/tst_mail.out 2>&1
> @@ -190,9 +194,16 @@
> $LTPTMP/tst_mail.res)
> fi
> if [ -z "$RC1" -a -z "$RC2" -a -z "$RC3" ]; then
> - tst_res TFAIL $LTPTMP/tst_mail.res \
> - "Test #2: No new mail for root. Reason:"
> - : $(( TFAILCNT += 1 ))
> + RC4=$(awk '{print match($1 $2 $3, "Nomailfor")}' \
> + $LTPTMP/tst_mail.res)
> + if [ \( "$tvar" = "redhat" -o "$tvar" = "redhat-linux" \) -a
> -n "$RC4" ]; then
> + tst_resm TPASS \
> + "Test #2: No new mail for root as expected"
> + else
> + tst_res TFAIL $LTPTMP/tst_mail.res \
> + "Test #2: No new mail for root. Reason:"
> + : $(( TFAILCNT += 1 ))
> + fi
> else
>
> if [ $RC1 -ne 0 -a $RC2 -ne 0 ] || [ $RC1 -ne 0 -a $RC3 -ne
> 0 ]; then
> ============
>
>
>
> Regards--
>
> -Tomonori Mitani
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit. See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2010-06-14 12:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-10 7:02 [LTP] [PATCH] fix "mail" test Mitani
2010-06-14 12:34 ` Subrata Modak [this message]
[not found] <1072286102.707931279683604082.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com>
2010-07-21 3:40 ` [LTP] [PATCH] fix mail test Caspar Zhang
2010-07-21 4:38 ` Garrett Cooper
2010-07-21 6:08 ` Caspar Zhang
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=1276518865.4885.8.camel@subratamodak.linux.ibm.com \
--to=subrata@linux.vnet.ibm.com \
--cc=kamimura@ryobi.co.jp \
--cc=ltp-list@lists.sourceforge.net \
--cc=mitani@ryobi.co.jp \
/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