|
From: Cyril H. <su...@li...> - 2013-11-04 02:51:12
|
The branch, master, has been updated
via 591c992a07fce81eb6d0f4ba712c1b0768e03aab (commit)
from 01f01828681dbf8b5820b9494ead278e4678e5de (commit)
- Log -----------------------------------------------------------------
commit 591c992a07fce81eb6d0f4ba712c1b0768e03aab
Author: Honggyu Kim <nex...@gm...>
Date: Sun Nov 3 17:14:42 2013 +0900
acct01: fix TBROK to TCONF if acct not implemented
acct system call is avaliable only when the kernel option is on.
When it fails, acct returns -1 and sets errno correspondingly.
ENOSYS is set when the system call is not implemented.
Currently, ENOSYS is not checked when the TEST_FILE5 argument is passed.
It just goes to TBROK regardless of the implementation in kernel.
This patch modifies to check errno ENOSYS, and marks as TCONF in that case.
Signed-off-by: Honggyu Kim <nex...@gm...>
Reviewed-by: Wanlong Gao <gao...@cn...>
-----------------------------------------------------------------------
Summary of changes:
testcases/kernel/syscalls/acct/acct01.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/testcases/kernel/syscalls/acct/acct01.c b/testcases/kernel/syscalls/acct/acct01.c
index c38d4db..0fe973b 100644
--- a/testcases/kernel/syscalls/acct/acct01.c
+++ b/testcases/kernel/syscalls/acct/acct01.c
@@ -103,8 +103,15 @@ static void setup(void)
fd = SAFE_CREAT(cleanup, TEST_FILE5, 0777);
SAFE_CLOSE(cleanup, fd);
- if (acct(TEST_FILE5) == -1)
- tst_brkm(TBROK | TERRNO, cleanup, "acct failed unexpectedly");
+ if (acct(TEST_FILE5) == -1) {
+ if (errno == ENOSYS) {
+ tst_brkm(TCONF, cleanup,
+ "BSD process accounting is not configured in "
+ "this kernel");
+ } else {
+ tst_brkm(TBROK | TERRNO, cleanup, "acct failed unexpectedly");
+ }
+ }
/* turn off acct, so we are in a known state */
if (acct(NULL) == -1) {
hooks/post-receive
--
ltp
|