Skip to contentSkip to conversation

fix error of wrong return code in cases rt_sigsuspend01, sched_getaffinity01, ftest06, sem02 and hugemmap03

PATCH In review Peng Haitao 2 participants 5 messages Jan 21, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix error of wrong return code in cases rt_sigsuspend01, sched_getaffinity01, ftest06, sem02 and hugemmap03

Hi Garrett,

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

---
 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(-)
testcases/kernel/fs/ftest/ftest06.c +2 -2
index b985a1d..d8ff8b6 100644
@@ -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
+}
testcases/kernel/ipc/semaphore/sem02.c +2 -2
index 17645d8..5b9c58d 100644
@@ -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
+}
testcases/kernel/mem/hugetlb/hugemmap/hugemmap03.c +2 -2
index 209e40e..c1479fe 100644
@@ -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
+}
testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c +2 -2
index f9e3b34..60f63dd 100644
@@ -182,5 +182,5 @@ int main(int ac, char **av) {
 
 	cleanup();
 
-	return 1;
-}
\ No newline at end of file
+	tst_exit();
+}
testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c +2 -3
index d5182da..014acf2 100644
@@ -236,6 +236,5 @@ realloc:
 
 	cleanup();
 
-	return (1);
-
-}
\ No newline at end of file
+	tst_exit();
+}
Signature · 18 lines
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#1 lore raw
Quoted 3 lines · Peng Haitao

Hi Garrett,

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

Patch please?
Thanks,
-Garrett

------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#2 lore raw

Hi Garrett,

Garrett Cooper said the following on 2011-1-21 16:43:

Quoted 6 lines · Peng Haitao
Quoted 3 lines

Hi Garrett,

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

Patch please?

The patch is in the first mail. Do you need an attached patch?

Signature · 2 lines
Best Regards,
Peng Haitao

"return 1" should be replaced with "tst_exit()".

---
 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(-)
testcases/kernel/fs/ftest/ftest06.c +2 -2
index b985a1d..d8ff8b6 100644
@@ -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
+}
testcases/kernel/ipc/semaphore/sem02.c +2 -2
index 17645d8..5b9c58d 100644
@@ -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
+}
testcases/kernel/mem/hugetlb/hugemmap/hugemmap03.c +2 -2
index 209e40e..c1479fe 100644
@@ -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
+}
testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c +2 -2
index f9e3b34..60f63dd 100644
@@ -182,5 +182,5 @@ int main(int ac, char **av) {
 
 	cleanup();
 
-	return 1;
-}
\ No newline at end of file
+	tst_exit();
+}
testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c +2 -3
index d5182da..014acf2 100644
@@ -236,6 +236,5 @@ realloc:
 
 	cleanup();
 
-	return (1);
-
-}
\ No newline at end of file
+	tst_exit();
+}
Signature · 1 line
1.7.3.1

------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#3 lore raw
Quoted 11 lines · Peng Haitao

Hi Garrett,

Garrett Cooper said the following on 2011-1-21 16:43:

Quoted 6 lines · Peng Haitao
Quoted 3 lines

Hi Garrett,

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

    Patch please?

The patch is in the first mail. Do you need an attached patch?

Please see the style guide ( doc/style-guide.rst ) for requested
behavior on what to do when contributing patches.
Thanks!
-Garrett

------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#4 lore raw
Quoted 7 lines · Garrett Cooper
Quoted 6 lines · Peng Haitao

Hi Garrett,

Garrett Cooper said the following on 2011-1-21 16:43:

Quoted 3 lines · Peng Haitao
Quoted 2 lines

Hi Garrett,

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

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

    Patch please?

The patch is in the first mail. Do you need an attached patch?

   Please see the style guide ( doc/style-guide.rst ) for requested behavior on what to do when contributing patches.

Oh yes... and I committed the fix. Thanks!
-Garrett

------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list