On Tue, Apr 22, 2008 at 8:07 AM, Subrata Modak
<[EMAIL PROTECTED]> wrote:
> Did this help you out in any way ?
>
> Regards--
> Subrata
Attached is a patch to implement a strategy like this one. Is this an
appropriate way to disable the tests in your opinion?
Thanks,
diff -ur ltp-full-20080229/testcases/kernel/syscalls/sysfs/sysfs01.c ltp-full-20080229.mod/testcases/kernel/syscalls/sysfs/sysfs01.c
--- ltp-full-20080229/testcases/kernel/syscalls/sysfs/sysfs01.c 2008-02-29 07:55:45.000000000 +0000
+++ ltp-full-20080229.mod/testcases/kernel/syscalls/sysfs/sysfs01.c 2008-04-22 11:32:36.000000000 +0100
@@ -91,6 +91,7 @@
/* perform global setup for test */
setup();
+#ifdef __NR_sysfs
/* check looping state if -i option given */
for (lc = 0; TEST_LOOPING(lc); lc++) {
@@ -109,6 +110,9 @@
tst_resm(TPASS, "sysfs(2) Passed for " "option 1");
}
} /*End of TEST_LOOPING */
+#else
+ tst_resm(TWARN, "This test can only run on kernels that support the sysfs system call");
+#endif
/*Clean up and exit */
cleanup();
diff -ur ltp-full-20080229/testcases/kernel/syscalls/sysfs/sysfs02.c ltp-full-20080229.mod/testcases/kernel/syscalls/sysfs/sysfs02.c
--- ltp-full-20080229/testcases/kernel/syscalls/sysfs/sysfs02.c 2008-02-29 07:55:45.000000000 +0000
+++ ltp-full-20080229.mod/testcases/kernel/syscalls/sysfs/sysfs02.c 2008-04-22 11:34:17.000000000 +0100
@@ -90,6 +90,7 @@
/* perform global setup for test */
setup();
+#ifdef __NR_sysfs
/* check looping state if -i option given */
for (lc = 0; TEST_LOOPING(lc); lc++) {
@@ -109,6 +110,9 @@
tst_resm(TPASS, "sysfs(2) Passed for option 2");
}
} /*End of TEST_LOOPING */
+#else
+ tst_resm(TWARN, "This test can only run on kernels that support the sysfs system call");
+#endif
/*Clean up and exit */
cleanup();
diff -ur ltp-full-20080229/testcases/kernel/syscalls/sysfs/sysfs03.c ltp-full-20080229.mod/testcases/kernel/syscalls/sysfs/sysfs03.c
--- ltp-full-20080229/testcases/kernel/syscalls/sysfs/sysfs03.c 2008-02-29 07:55:45.000000000 +0000
+++ ltp-full-20080229.mod/testcases/kernel/syscalls/sysfs/sysfs03.c 2008-04-22 11:35:04.000000000 +0100
@@ -89,6 +89,7 @@
/* perform global setup for test */
setup();
+#ifdef __NR_sysfs
/* check looping state if -i option given */
for (lc = 0; TEST_LOOPING(lc); lc++) {
@@ -107,6 +108,9 @@
tst_resm(TPASS, "sysfs(2) Passed for option 3");
}
} /*End of TEST_LOOPING */
+#else
+ tst_resm(TWARN, "This test can only run on kernels that support the sysfs system call");
+#endif
/*Clean up and exit */
cleanup();
diff -ur ltp-full-20080229/testcases/kernel/syscalls/sysfs/sysfs04.c ltp-full-20080229.mod/testcases/kernel/syscalls/sysfs/sysfs04.c
--- ltp-full-20080229/testcases/kernel/syscalls/sysfs/sysfs04.c 2008-02-29 07:55:45.000000000 +0000
+++ ltp-full-20080229.mod/testcases/kernel/syscalls/sysfs/sysfs04.c 2008-04-22 11:35:22.000000000 +0100
@@ -94,6 +94,7 @@
/* perform global setup for test */
setup();
+#ifdef __NR_sysfs
/* check looping state if -i option given */
for (lc = 0; TEST_LOOPING(lc); lc++) {
@@ -113,6 +114,9 @@
TEST_ERROR_LOG(TEST_ERRNO);
} /* End of TEST_LOOPING */
+#else
+ tst_resm(TWARN, "This test can only run on kernels that support the sysfs system call");
+#endif
/*Clean up and exit */
cleanup();
diff -ur ltp-full-20080229/testcases/kernel/syscalls/sysfs/sysfs05.c ltp-full-20080229.mod/testcases/kernel/syscalls/sysfs/sysfs05.c
--- ltp-full-20080229/testcases/kernel/syscalls/sysfs/sysfs05.c 2008-02-29 07:55:45.000000000 +0000
+++ ltp-full-20080229.mod/testcases/kernel/syscalls/sysfs/sysfs05.c 2008-04-22 11:35:51.000000000 +0100
@@ -106,6 +106,7 @@
/* perform global setup for test */
setup();
+#ifdef __NR_sysfs
/* check looping state if -i option given */
for (lc = 0; TEST_LOOPING(lc); lc++) {
@@ -132,6 +133,9 @@
} /*End of TEST LOOPS */
} /* End of TEST_LOOPING */
+#else
+ tst_resm(TWARN, "This test can only run on kernels that support the sysfs system call");
+#endif
/*Clean up and exit */
cleanup();
diff -ur ltp-full-20080229/testcases/kernel/syscalls/sysfs/sysfs06.c ltp-full-20080229.mod/testcases/kernel/syscalls/sysfs/sysfs06.c
--- ltp-full-20080229/testcases/kernel/syscalls/sysfs/sysfs06.c 2008-02-29 07:55:45.000000000 +0000
+++ ltp-full-20080229.mod/testcases/kernel/syscalls/sysfs/sysfs06.c 2008-04-22 11:36:15.000000000 +0100
@@ -109,6 +109,7 @@
/* perform global setup for test */
setup();
+#ifdef __NR_sysfs
/* check looping state if -i option given */
for (lc = 0; TEST_LOOPING(lc); lc++) {
@@ -134,6 +135,9 @@
TEST_ERROR_LOG(TEST_ERRNO);
} /*End of TEST LOOPS */
} /* End of TEST_LOOPING */
+#else
+ tst_resm(TWARN, "This test can only run on kernels that support the sysfs system call");
+#endif
/*Clean up and exit */
cleanup();
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list