Hi,
today I was digging a bit deeper into this source and find out following:
tst_exit() is defined as __attribute__ ((noreturn)). That's hint for gcc
compiler that this function never exits, so far it's good.

Problem in these two tests is that they pass tst_exit as cleanup function to
tst_brkm(). But function tst_brkm() is not defined as __attribute__
((noreturn)). So we have function that never retuns and we have the same
problem again. The fix is trivial, instead of passing tst_exit() as cleanup
function just call it directly.

Patch attached.

Signed-off-by: [email protected]

-- 
Cyril Hrubis
[email protected]
Index: ltp-full-20090430/testcases/kernel/io/aio/aio01/aio01.c
===================================================================
--- ltp-full-20090430.orig/testcases/kernel/io/aio/aio01/aio01.c
+++ ltp-full-20090430/testcases/kernel/io/aio/aio01/aio01.c
@@ -426,7 +426,8 @@ void cleanup() {
 
 int main(void)
 {
-  tst_brkm(TCONF, tst_exit, "libaio missing");
+	tst_brkm(TCONF, NULL, "libaio missing");
+	tst_exit();
 }
 
 #endif
Index: ltp-full-20090430/testcases/kernel/io/aio/aio02/main.c
===================================================================
--- ltp-full-20090430.orig/testcases/kernel/io/aio/aio02/main.c
+++ ltp-full-20090430/testcases/kernel/io/aio/aio02/main.c
@@ -23,18 +23,20 @@ int main(void)
 
 	res = test_main();
 	printf("test %s completed %s.\n", test_name,
-		res ? "FAILED" : "PASSED"
-		);
+		res ? "FAILED" : "PASSED");
 	fflush(stdout);
 	return res ? 1 : 0;
 }
+
 #else
+
 char *TCID = "aio02/" TEST_NAME;
 int TST_TOTAL=0;
 
 int main(void)
 {
-  tst_brkm(TCONF, tst_exit, "libaio missing");
+	tst_brkm(TCONF, NULL, "libaio missing");
+	tst_exit();
 }
 
 #endif
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to