Skip to contentSkip to conversation

ttype: Replase TINFO with TPASS or TFAIL

PATCH New zhaogongyi 1 participant 1 message Apr 29, 2021

lore
Share & tools
lore

zhaogongyi

author
#0 lore raw

PATCH 1/1 ttype: Replase TINFO with TPASS or TFAIL

Hi Cyril,

I have split the commit to 4 separate commits and resubmit according your review.

Pleas see:
https://patchwork.ozlabs.org/project/ltp/patch/[email protected]/
https://patchwork.ozlabs.org/project/ltp/patch/[email protected]/
https://patchwork.ozlabs.org/project/ltp/patch/[email protected]/
https://patchwork.ozlabs.org/project/ltp/patch/[email protected]/

And for the files fcntl19.c/fcntl20.c/fcntl21.c, there are some difficult problems to cleanup, it would be fixed in latter patches.

Thanks so much!

Best Regards,
Gongyi

Quoted 37 lines

Hi!

Quoted 7 lines
testcases/kernel/syscalls/fcntl/fcntl16.c +0 -0
index a77a81298..f12474f79 100644
@@ -673,10 +673,10 @@ int main(int ac, char **av)
 		 */

testcases/kernel/syscalls/fcntl/fcntl16.c int main(int ac, char **av) · line 681

Quoted 10 lines
testcases/kernel/syscalls/fcntl/fcntl16.c +2 -2
 		tst_resm(TINFO, "Entering block 1");
 		if (run_test(O_CREAT | O_RDWR | O_TRUNC, 0777, 0, 11)) {
-			tst_resm(TINFO, "Test case 1: without mandatory "
+			tst_resm(TFAIL, "Test case 1: without mandatory "
 				 "locking FAILED");
 		} else {
-			tst_resm(TINFO, "Test case 1: without manadatory "
+			tst_resm(TPASS, "Test case 1: without manadatory "
 				 "locking PASSED");
 		}

I would be happier if we fixed the run_test() function to report TFAIL/TPASS in all cases and just called run_test() from the main().

It shouldn't be even a big change since we report most of the failures there, what we need is to change one TINFO into TFAIL and report TPASS at the end of the function.

testcases/kernel/syscalls/fcntl/fcntl16.c int main(int ac, char **av) · line 682

Quoted 1 line
testcases/kernel/syscalls/fcntl/fcntl16.c +0 -0
 		tst_resm(TINFO, "Exiting block 1");

Also can we please get rid of the useless entering/exitting block messages?

And the same applies for the rest of the tests changed by this patch.

--
Cyril Hrubis
[email protected]