Patch "selftests/kcmp: Make the test output consistent and clear" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    selftests/kcmp: Make the test output consistent and clear

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     selftests-kcmp-make-the-test-output-consistent-and-c.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 867e25acc1b493c1aea5a02426071340c590e7ad
Author: Gautam Menghani <gautammenghani201@xxxxxxxxx>
Date:   Thu Jun 30 00:58:22 2022 +0530

    selftests/kcmp: Make the test output consistent and clear
    
    [ Upstream commit ff682226a353d88ffa5db9c2a9b945066776311e ]
    
    Make the output format of this test consistent. Currently the output is
    as follows:
    
    +TAP version 13
    +1..1
    +# selftests: kcmp: kcmp_test
    +# pid1:  45814 pid2:  45815 FD:  1 FILES:  1 VM:  2 FS:  1 SIGHAND:  2
    +  IO:  0 SYSVSEM:  0 INV: -1
    +# PASS: 0 returned as expected
    +# PASS: 0 returned as expected
    +# PASS: 0 returned as expected
    +# # Planned tests != run tests (0 != 3)
    +# # Totals: pass:3 fail:0 xfail:0 xpass:0 skip:0 error:0
    +# # Planned tests != run tests (0 != 3)
    +# # Totals: pass:3 fail:0 xfail:0 xpass:0 skip:0 error:0
    +# # Totals: pass:0 fail:0 xfail:0 xpass:0 skip:0 error:0
    +ok 1 selftests: kcmp: kcmp_test
    
    With this patch applied the output is as follows:
    
    +TAP version 13
    +1..1
    +# selftests: kcmp: kcmp_test
    +# TAP version 13
    +# 1..3
    +# pid1:  46330 pid2:  46331 FD:  1 FILES:  2 VM:  2 FS:  2 SIGHAND:  1
    +  IO:  0 SYSVSEM:  0 INV: -1
    +# PASS: 0 returned as expected
    +# PASS: 0 returned as expected
    +# PASS: 0 returned as expected
    +# # Totals: pass:3 fail:0 xfail:0 xpass:0 skip:0 error:0
    +ok 1 selftests: kcmp: kcmp_test
    
    Signed-off-by: Gautam Menghani <gautammenghani201@xxxxxxxxx>
    Signed-off-by: Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx>
    Stable-dep-of: eb59a5811371 ("selftests/kcmp: remove unused open mode")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/testing/selftests/kcmp/kcmp_test.c b/tools/testing/selftests/kcmp/kcmp_test.c
index 6ea7b9f37a411..25110c7c0b3ed 100644
--- a/tools/testing/selftests/kcmp/kcmp_test.c
+++ b/tools/testing/selftests/kcmp/kcmp_test.c
@@ -88,6 +88,9 @@ int main(int argc, char **argv)
 		int pid2 = getpid();
 		int ret;
 
+		ksft_print_header();
+		ksft_set_plan(3);
+
 		fd2 = open(kpath, O_RDWR, 0644);
 		if (fd2 < 0) {
 			perror("Can't open file");
@@ -152,7 +155,6 @@ int main(int argc, char **argv)
 			ksft_inc_pass_cnt();
 		}
 
-		ksft_print_cnts();
 
 		if (ret)
 			ksft_exit_fail();
@@ -162,5 +164,5 @@ int main(int argc, char **argv)
 
 	waitpid(pid2, &status, P_ALL);
 
-	return ksft_exit_pass();
+	return 0;
 }




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux