All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peng Haitao <penght@cn.fujitsu.com>
To: Garrett Cooper <yanegomi@gmail.com>
Cc: ltp-list@lists.sourceforge.net
Subject: [LTP] [PATCH] fix error of wrong return code in cases rt_sigsuspend01, sched_getaffinity01, ftest06, sem02 and hugemmap03
Date: Fri, 21 Jan 2011 16:35:57 +0800	[thread overview]
Message-ID: <4D39456D.4040308@cn.fujitsu.com> (raw)

Hi Garrett,

"return 1" should be replaced with "tst_exit()" in the following cases.

Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>

---
 testcases/kernel/fs/ftest/ftest06.c                |    4 ++--
 testcases/kernel/ipc/semaphore/sem02.c             |    4 ++--
 testcases/kernel/mem/hugetlb/hugemmap/hugemmap03.c |    4 ++--
 .../syscalls/rt_sigsuspend/rt_sigsuspend01.c       |    4 ++--
 .../sched_getaffinity/sched_getaffinity01.c        |    5 ++---
 5 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/testcases/kernel/fs/ftest/ftest06.c b/testcases/kernel/fs/ftest/ftest06.c
index b985a1d..d8ff8b6 100644
--- a/testcases/kernel/fs/ftest/ftest06.c
+++ b/testcases/kernel/fs/ftest/ftest06.c
@@ -249,7 +249,7 @@ int main(int ac, char *av[])
 		tst_resm(TPASS, "Test passed.");
 
 	cleanup();
-	return 1;
+	tst_exit();
 }
 
 #define	warn(val,m1,m2)	if ((val) < 0) dowarn(me,m1,m2)
@@ -479,4 +479,4 @@ static void cleanup(void)
 	}
 	tst_rmdir();
 
-}
\ No newline at end of file
+}
diff --git a/testcases/kernel/ipc/semaphore/sem02.c b/testcases/kernel/ipc/semaphore/sem02.c
index 17645d8..5b9c58d 100644
--- a/testcases/kernel/ipc/semaphore/sem02.c
+++ b/testcases/kernel/ipc/semaphore/sem02.c
@@ -126,7 +126,7 @@ int main(int argc, char **argv)
 	tst_resm(TPASS, "passed");
     cleanup();
 
-    return 1;
+    tst_exit();
 }
 
 /* This thread sleeps 10 seconds then waits on the semaphore.  As long
@@ -169,4 +169,4 @@ void cleanup(void)
 {
 	TEST_CLEANUP;
 
-}
\ No newline at end of file
+}
diff --git a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap03.c b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap03.c
index 209e40e..c1479fe 100644
--- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap03.c
+++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap03.c
@@ -134,7 +134,7 @@ main(int ac, char **av)
 
 	cleanup();
 
-	return 1;
+	tst_exit();
 #endif
 }
 
@@ -178,4 +178,4 @@ cleanup()
 
 	unlink(TEMPFILE);
 
-}
\ No newline at end of file
+}
diff --git a/testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c b/testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c
index f9e3b34..60f63dd 100644
--- a/testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c
+++ b/testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c
@@ -182,5 +182,5 @@ int main(int ac, char **av) {
 
 	cleanup();
 
-	return 1;
-}
\ No newline at end of file
+	tst_exit();
+}
diff --git a/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c b/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c
index d5182da..014acf2 100644
--- a/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c
+++ b/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c
@@ -236,6 +236,5 @@ realloc:
 
 	cleanup();
 
-	return (1);
-
-}
\ No newline at end of file
+	tst_exit();
+}
-- 
1.7.3.1


-- 
Best Regards,
Peng Haitao


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

             reply	other threads:[~2011-01-21  8:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-21  8:35 Peng Haitao [this message]
2011-01-21  8:43 ` [LTP] [PATCH] fix error of wrong return code in cases rt_sigsuspend01, sched_getaffinity01, ftest06, sem02 and hugemmap03 Garrett Cooper
2011-01-21  9:14   ` Peng Haitao
2011-01-21  9:17     ` Garrett Cooper
2011-01-21  9:18       ` Garrett Cooper

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=4D39456D.4040308@cn.fujitsu.com \
    --to=penght@cn.fujitsu.com \
    --cc=ltp-list@lists.sourceforge.net \
    --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.