On Tue, Jul 20, 2010 at 8:40 PM, Caspar Zhang <[email protected]> wrote:
> Hi all,
>   In latest RHEL6, the mail format sometimes becomes "...Mail
>   Delivery System..." instead of "...Mail Delivery Subsys...".
>   This patch fixes this problem. Plus, corrected misspelling.
>
>   Signed-off-by: Caspar Zhang <[email protected]>
>
> diff --git a/testcases/commands/mail/mail_tests.sh 
> b/testcases/commands/mail/mail_tests.sh
> index 53a5d90..2aaf764 100755
> --- a/testcases/commands/mail/mail_tests.sh
> +++ b/testcases/commands/mail/mail_tests.sh
> @@ -160,7 +160,7 @@ if [ $? -ne 0 ]; then
>            "Test #2: mail command failed. Reason:"
>        : $(( TFAILCNT += 1 ))
>  else
> -       # check if Mailer-Deamon reported any delivery failure.
> +       # check if Mailer-Daemon reported any delivery failure.
>        # but wait for the mail to arrive first, sleep 5.
>        sleep 5
>        echo "d" | mail -u root > $LTPTMP/tst_mail.res 2>&1
> @@ -169,7 +169,7 @@ else
>                RC1=$(awk '/^>N/ {IGNORECASE=1; print match($3, 
> "Mailer-Daemon")}' \
>                    $LTPTMP/tst_mail.res)
>        else
> -               RC1=$(awk '/^>N/ {IGNORECASE=1; print match($3 $4 $5, 
> "MailDeliverySubsys")}' \
> +               RC1=$(awk '/^>N/ {IGNORECASE=1; print match($3 $4 $5, 
> "MailDelivery(Subsys|System)")}' \
>                    $LTPTMP/tst_mail.res)
>        fi
>
> @@ -208,10 +208,10 @@ else
>
>                if [ $RC1 -ne 0 -a $RC2 -ne 0 ] || [ $RC1 -ne 0 -a $RC3 -ne 0 
> ]; then
>                        tst_resm TPASS \
> -                               "Test #2: Mailer-Deamon reported delivery 
> failure"
> +                               "Test #2: Mailer-Daemon reported delivery 
> failure"
>                else
>                        tst_res TFAIL $LTPTMP/tst_mail.res \
> -                       "Test #2: Mailer-Deamon failed to report delivery 
> failure. Reason:"
> +                       "Test #2: Mailer-Daemon failed to report delivery 
> failure. Reason:"
>                        : $(( TFAILCNT += 1 ))
>                fi
>
> @@ -222,7 +222,7 @@ fi
>
>  # Test #3
>  # Test that mail non_existent_u...@localhost will result in delivery failure.
> -# Mailer-Deamon will report this failure.
> +# Mailer-Daemon will report this failure.
>
>  export TCID=mail_tests::mail03
>  export TST_COUNT=3
> @@ -241,7 +241,7 @@ if [ $? -ne 0 ]; then
>            "Test #3: mail command failed. Reason: "
>        : $(( TFAILCNT += 1 ))
>  else
> -       # check if Mailer-Deamon reported any delivery failure.
> +       # check if Mailer-Daemon reported any delivery failure.
>        # but wait for the mail to arrive first, sleep 5.
>        sleep 5
>        echo "d" | mail -u root > $LTPTMP/tst_mail.res 2>&1
> @@ -250,7 +250,7 @@ else
>                RC1=$(awk '/^>N/ {IGNORECASE=1; print match($3, 
> "Mailer-Daemon")}' \
>                    $LTPTMP/tst_mail.res)
>        else
> -               RC1=$(awk '/^>N/ {IGNORECASE=1; print match($3 $4 $5, 
> "MailDeliverySubsys")}' \
> +               RC1=$(awk '/^>N/ {IGNORECASE=1; print match($3 $4 $5, 
> "MailDelivery(Subsys|System)")}' \
>                    $LTPTMP/tst_mail.res)
>        fi
>        ##################################################################

How about MailDeliverySub? It's a simpler version of the same string,
so it's more resilient to change. Besides, the point isn't to check
for the name being that, it's to verify that the the delivery failed
:)..

Thanks!
-Garrett

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to