public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] fix "mail" test
@ 2010-06-10  7:02 Mitani
  2010-06-14 12:34 ` Subrata Modak
  0 siblings, 1 reply; 5+ messages in thread
From: Mitani @ 2010-06-10  7:02 UTC (permalink / raw)
  To: ltp-list; +Cc: kamimura

[-- Attachment #1: Type: text/plain, Size: 2449 bytes --]

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

[-- Attachment #2: mail_tests.sh.patch --]
[-- Type: application/octet-stream, Size: 1379 bytes --]

--- 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

[-- Attachment #3: Type: text/plain, Size: 287 bytes --]

------------------------------------------------------------------------------
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

[-- Attachment #4: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LTP] [PATCH] fix "mail" test
  2010-06-10  7:02 [LTP] [PATCH] fix "mail" test Mitani
@ 2010-06-14 12:34 ` Subrata Modak
  0 siblings, 0 replies; 5+ messages in thread
From: Subrata Modak @ 2010-06-14 12:34 UTC (permalink / raw)
  To: Mitani; +Cc: ltp-list, kamimura

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [LTP] [PATCH] fix mail test
       [not found] <1072286102.707931279683604082.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com>
@ 2010-07-21  3:40 ` Caspar Zhang
  2010-07-21  4:38   ` Garrett Cooper
  0 siblings, 1 reply; 5+ messages in thread
From: Caspar Zhang @ 2010-07-21  3:40 UTC (permalink / raw)
  To: LTP List

[-- Attachment #1: Type: text/plain, Size: 3971 bytes --]

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 <czhang@redhat.com>

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_user@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
        ##################################################################

-- 
Quality Assurance Associate (Kernel) in
Red Hat Inc. (Beijing R&D Branch)

TEL: +86-10-62608150
Web: http://www.redhat.com/

[-- Attachment #2: commands-mail.patch --]
[-- Type: text/x-patch, Size: 2641 bytes --]

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 <czhang@redhat.com>

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_user@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
 	##################################################################

[-- Attachment #3: Type: text/plain, Size: 235 bytes --]

------------------------------------------------------------------------------
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

[-- Attachment #4: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [LTP] [PATCH] fix mail test
  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
  0 siblings, 1 reply; 5+ messages in thread
From: Garrett Cooper @ 2010-07-21  4:38 UTC (permalink / raw)
  To: Caspar Zhang; +Cc: LTP List

On Tue, Jul 20, 2010 at 8:40 PM, Caspar Zhang <czhang@redhat.com> 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 <czhang@redhat.com>
>
> 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_user@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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LTP] [PATCH] fix mail test
  2010-07-21  4:38   ` Garrett Cooper
@ 2010-07-21  6:08     ` Caspar Zhang
  0 siblings, 0 replies; 5+ messages in thread
From: Caspar Zhang @ 2010-07-21  6:08 UTC (permalink / raw)
  To: Garrett Cooper; +Cc: LTP List


----- "Garrett Cooper" <yanegomi@gmail.com> wrote:

> On Tue, Jul 20, 2010 at 8:40 PM, Caspar Zhang <czhang@redhat.com>
> 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 <czhang@redhat.com>
> >
>  ##################################################################
> 
> How about MailDeliverySub? It's a simpler version of the same string,
> so it's more resilient to change. 

I don't think so. The string is `Mail Delivery System' which doesn't
match `MailDeliverySub'. In fact, I get this different string in automated
testing framework, like this:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Heirloom Mail version 12.4 7/29/08.  Type ? for help.
"/var/mail/root": 1 message 1 new
>N  1 Mail Delivery System  Thu Jul 15 01:21  77/3077  "Undelivered Mail Retu"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

> Besides, the point isn't to check
> for the name being that, it's to verify that the the delivery failed
> :)..

Yes I see. The original codes tried to catch 'Mail Delivery Subsys' string 
and select the new item, then catch 'Undelivered Mail Retu' string to 
confirm it's a failed delivered mail. As I said before, in automated testing 
framework, the first catch will fail because the first string become 'Mail 
Delivery System' instead of 'Mail Delivery Subsys' and thus it cause the 
whole testing failed. 

Thanks,
Caspar

-- 
Quality Assurance Associate (Kernel) in
Red Hat Inc. (Beijing R&D Branch)

TEL: +86-10-62608150
Web: http://www.redhat.com/

------------------------------------------------------------------------------
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-07-21  6:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-10  7:02 [LTP] [PATCH] fix "mail" test Mitani
2010-06-14 12:34 ` Subrata Modak
     [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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox