Skip to contentSkip to conversation

fix "sysctl03" test

PATCH In review Mitani 2 participants 2 messages Sep 21, 2010

lore
Share & tools
lore

Mitani

author
#0 lore raw

PATCH 1/1 fix "sysctl03" test

Hi,

I noticed that "sysctl03" failed from about August 17. "PASS" is indicated in the log file of "runltp -l", but "TFAIL" is indicated in console log:

------------(runltp -l)
sysctl03 PASS 0
------------

------------(console log)
sysctl03 1 TPASS : Got expected error: TEST_ERRNO=EPERM(1): Operation
not permitted
sysctl03 2 TFAIL : Got expected error: TEST_ERRNO=EPERM(1): Operation
not permitted
sysctl03 1 TPASS : Got expected error: TEST_ERRNO=EPERM(1): Operation
not permitted
------------

"sysctl03" changed in following revision:
http://ltp.git.sourceforge.net/git/gitweb.cgi?p=ltp/ltp-dev.git;a=commit;h=b
49b375167eade5cb2f05678bc60fc5b2d231af9

This revision patch is as followings:
------------
@@ -114,13 +139,10 @@ int main(int ac, char **av)
} else {
TEST_ERROR_LOG(TEST_ERRNO);

- if (TEST_ERRNO != EPERM) {
- tst_resm(TFAIL,
- "Expected EPERM (%d), got %d: %s",
- EPERM, TEST_ERRNO,
- strerror(TEST_ERRNO));
+ if (TEST_ERRNO == exp_eno) {
+ tst_resm(TPASS|TTERRNO, "Got expected
error");
} else {
- tst_resm(TPASS, "Got expected EPERM error");
+ tst_resm(TFAIL|TTERRNO, "Got unexpected
error");
}
}

@@ -147,12 +169,12 @@ int main(int ac, char **av)
} else {
TEST_ERROR_LOG(TEST_ERRNO);

- if (TEST_ERRNO != EPERM) {
- tst_resm(TFAIL, "Expected EPERM, got
"
- "%d", TEST_ERRNO);
+ if (TEST_ERRNO == exp_eno) {
+ tst_resm(TFAIL|TTERRNO, -------->
This will be "TPASS".
+ "Got expected error");
} else {
- tst_resm(TPASS, "Got expected EPERM
"
- "error");
+ tst_resm(TPASS|TTERRNO, -------->
This will be "TFAIL".
+ "Got unexpected error");
}
}
------------

I suggest to change "TFAIL" <-> "TPASS" in above revision.

============
--- a/testcases/kernel/syscalls/sysctl/sysctl03.c 2010-09-11
01:05:02.000000000 +0900
+++ b/testcases/kernel/syscalls/sysctl/sysctl03.c 2010-09-14
17:52:12.000000000 +0900
@@ -170,10 +170,10 @@
TEST_ERROR_LOG(TEST_ERRNO);

if (TEST_ERRNO == exp_eno) {
- tst_resm(TFAIL|TTERRNO,
+ tst_resm(TPASS|TTERRNO,
"Got expected error");
} else {
- tst_resm(TPASS|TTERRNO,
+ tst_resm(TFAIL|TTERRNO,
"Got unexpected error");
}
}
============

Thanks--

-Tomonori Mitani

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Ltp-list mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#1 lore raw
Quoted 5 lines · Mitani

Hi,

I noticed that "sysctl03" failed from about August 17. "PASS" is indicated in the log file of "runltp -l", but "TFAIL" is indicated in console log:

Thanks for the keen eye and sorry for getting this backwards :/. -Garrett

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Ltp-list mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list