acct01: fix TBROK to TCONF if acct not implemented
PATCH v3 1/1 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.
--- testcases/kernel/syscalls/acct/acct01.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
testcases/kernel/syscalls/acct/acct01.c +9 -2
@@ -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 ) {
Signature · 13 lines
1.7.9.5 ------------------------------------------------------------------------------ Android is increasing in popularity, but the open development platform that developers love is also attractive to malware creators. Download this white paper to learn more about secure code signing practices that can help keep Android apps secure. http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 6 lines · Honggyu Kim
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_FILE5argument 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.
What's changed from V2 to V3?
Thanks,
Wanlong Gao
Quoted 19 lines
Signed-off-by Honggyu Kim <[email protected]>--- testcases/kernel/syscalls/acct/acct01.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)testcases/kernel/syscalls/acct/acct01.c +2
-2@@ -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 ) {
testcases/kernel/syscalls/acct/acct01.c static void setup(void) · line 117
Quoted 10 lines
testcases/kernel/syscalls/acct/acct01.c +7
-0+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 ) {
------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that developers love is also attractive to malware creators. Download this white paper to learn more about secure code signing practices that can help keep Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
A message that is not in the archive (sent off-list or not yet received): CAEcr6y0OmaAyEiTwicvpF7cuHx_GNC+QrU5wPmAwD-1SGwZLRw@mail.gmail.com
Wanlong Gao
AppliedQuoted 1 line · Honggyu Kim
I just made a mistake on the commit message. No change was made in the source code.
Applied, thank you.
Wanlong Gao
Quoted 5 lines
Thank you for your reply.
Honggyu Kim
------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that developers love is also attractive to malware creators. Download this white paper to learn more about secure code signing practices that can help keep Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list