diff options
author | robbiew <robbiew> | 2003-01-22 18:38:19 +0000 |
---|---|---|
committer | robbiew <robbiew> | 2003-01-22 18:38:19 +0000 |
commit | fc86986e923b07a0d189d7699b1b29530b710cd5 (patch) | |
tree | cae7307cb42f07cf1d8f44f48b0d91519fd1636f /testcases/kernel/syscalls/acct/acct02.c | |
parent | 12f56539305fbb659ea277e91f5441e4ae6b8669 (diff) | |
download | ltp-fc86986e923b07a0d189d7699b1b29530b710cd5.tar.gz |
Added code to check if BSD process accounting is turned on, if not exit
with a TCONF message, instead of TFAIL.
Diffstat (limited to 'testcases/kernel/syscalls/acct/acct02.c')
-rw-r--r-- | testcases/kernel/syscalls/acct/acct02.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/testcases/kernel/syscalls/acct/acct02.c b/testcases/kernel/syscalls/acct/acct02.c index 1a352b028..b3795fec8 100644 --- a/testcases/kernel/syscalls/acct/acct02.c +++ b/testcases/kernel/syscalls/acct/acct02.c @@ -80,7 +80,7 @@ int main (argc, argv) /*--------------------------------------------------------------*/ - /* turn off acct, so we are in a known state + /* Attempt to turn off acct as non-root */ if( acct( NULL ) != -1 ) { tst_resm(TBROK, "Non-root attempting to disable acct: didn't fail\n", errno ); @@ -88,9 +88,15 @@ int main (argc, argv) } if( errno != EPERM ) { - tst_resm(TBROK, "Non-root acct disable - errno expect: %d got: %d\n", - EPERM, errno ); - tst_exit(); + if( errno == ENOSYS ){ + tst_resm(TCONF,"BSD process accounting is not configured in this kernel."); + tst_resm(TCONF,"Test will not run."); + tst_exit(); + }else{ + tst_resm(TBROK, "Non-root acct disable - errno expect: %d got: %d\n", + EPERM, errno ); + tst_exit(); + } } else tst_resm(TPASS, "Received expected error: EPERM"); //------------------------------------------------- |