Commit [ba3bf0]  Maximize  Restore  History

acct01: add a check routine for acct implementation

A check routine for acct implementation is added at the beginning of the test.
check_acct_in_kernel function calls acct(NULL) and checks if errno is ENOSYS.
It means that acct system call is not implemented in kernel.
The other ENOSYS check routines in setup are removed.

This patch prevents from unintentional calling acct again in cleanup, which
makes TCONF to TBROK and helps configuration problems stay as TCONF.

Previous test output: (becomes TBROK in the end)
acct01 1 TCONF : BSD process accounting is not configured in this kernel
acct01 2 TCONF : Remaining cases not appropriate for configuration
acct01 3 TBROK : acct(NULL) failed: errno=ENOSYS(38): Function not implemented

Fixed test output: (stays as TCONF)
acct01 1 TCONF : BSD process accounting is not configured in this kernel

Signed-off-by: Honggyu Kim <hong.gyu.kim@lge.com>
Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>

Honggyu Kim Honggyu Kim 2013-11-06

Wanlong Gao Wanlong Gao 2013-11-06

changed testcases/kernel/syscalls/acct/acct01.c
testcases/kernel/syscalls/acct/acct01.c Diff Switch to side-by-side view
Loading...

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks