public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] fix mail02,03 fail due to different sender names
@ 2011-01-28 17:41 Caspar Zhang
  2011-02-11 15:45 ` Caspar Zhang
  2011-02-14  7:43 ` [LTP] Review Required: [Re: [PATCH] fix mail02, 03 fail due to different sender names] Caspar Zhang
  0 siblings, 2 replies; 10+ messages in thread
From: Caspar Zhang @ 2011-01-28 17:41 UTC (permalink / raw)
  To: ltp-list

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

Hi all, mail02 and mail03 tests non-existed host and non-existed
username in the test. However in some systems (at least in RHEL6),
they both fails because of the sender name of the returned letter is
"Mail Deliver System" instead of "Mail Delivery Subsys", which makes RC1
to be zero and fail the test. The patch fixes this issue.

Signed-off-by: Caspar Zhang <czhang@redhat.com>
---
 testcases/commands/mail/mail_tests.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/testcases/commands/mail/mail_tests.sh
b/testcases/commands/mail/mail_tests.sh
index 53a5d90..c30e2c3 100755
--- a/testcases/commands/mail/mail_tests.sh
+++ b/testcases/commands/mail/mail_tests.sh
@@ -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

@@ -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
 	##################################################################
-- 
1.7.4.rc2


-- 
Quality Assurance Engineer (Kernel) in
Red Hat Software (Beijing) Co., R&D Branch

TEL: +86-10-62608150
WEB: http://www.redhat.com/
--
C-A-S-P-A-R, Caspar /kæspɑ:/ ;-)

[-- Attachment #2: 0001-fix-mail02-03-fail-due-to-different-sender-names.patch --]
[-- Type: text/plain, Size: 1533 bytes --]

Subject: [PATCH] fix mail02,03 fail due to different sender names

Hi all, mail02 and mail03 tests non-existed host and non-existed
username in the test. However in some systems (at least in RHEL6),
they both fails because of the sender name of the returned letter is
"Mail Deliver System" instead of "Mail Delivery Subsys", which makes RC1
to be zero and fail the test. The patch fixes this issue.

Signed-off-by: Caspar Zhang <czhang@redhat.com>
---
 testcases/commands/mail/mail_tests.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/testcases/commands/mail/mail_tests.sh b/testcases/commands/mail/mail_tests.sh
index 53a5d90..c30e2c3 100755
--- a/testcases/commands/mail/mail_tests.sh
+++ b/testcases/commands/mail/mail_tests.sh
@@ -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
 
@@ -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
 	##################################################################
-- 
1.7.4.rc2


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

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d

[-- 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] 10+ messages in thread

end of thread, other threads:[~2011-02-28  7:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-28 17:41 [LTP] [PATCH] fix mail02,03 fail due to different sender names Caspar Zhang
2011-02-11 15:45 ` Caspar Zhang
2011-02-14  7:43 ` [LTP] Review Required: [Re: [PATCH] fix mail02, 03 fail due to different sender names] Caspar Zhang
2011-02-22 19:15   ` Shubham Goyal
2011-02-22 21:08     ` Garrett Cooper
2011-02-24 18:31       ` Shubham Goyal
2011-02-24 18:37         ` Garrett Cooper
2011-02-28  7:41           ` Shubham Goyal
2011-02-28  7:43             ` Garrett Cooper
2011-02-28  7:55             ` Caspar Zhang

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