]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
selftests/nolibc: fix testcase status alignment
authorThomas Weißschuh <linux@weissschuh.net>
Sun, 5 Nov 2023 14:16:38 +0000 (15:16 +0100)
committerThomas Weißschuh <linux@weissschuh.net>
Mon, 11 Dec 2023 21:38:26 +0000 (22:38 +0100)
Center-align all possible status reports.
Before OK and FAIL were center-aligned in relation to each other but
SKIPPED and FAILED would be left-aligned.

Before:

7 environ_addr = <0x7fffef3e7c50>                                [OK]
8 environ_envp = <0x7fffef3e7c58>                               [FAIL]
9 environ_auxv                                                  [SKIPPED]
10 environ_total                                                [SKIPPED]
11 environ_HOME = <0x7fffef3e99bd>                               [OK]
12 auxv_addr                                                    [SKIPPED]
13 auxv_AT_UID = 1000                                            [OK]

After:

7 environ_addr = <0x7ffff13b00a0>                                 [OK]
8 environ_envp = <0x7ffff13b00a8>                                [FAIL]
9 environ_auxv                                                  [SKIPPED]
10 environ_total                                                [SKIPPED]
11 environ_HOME = <0x7ffff13b19bd>                                [OK]
12 auxv_addr                                                    [SKIPPED]
13 auxv_AT_UID = 1000                                             [OK]

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
tools/testing/selftests/nolibc/nolibc-test.c

index 2f10541e6f38199dbb30c9af4853484ec19d11cf..e173014f6b667ddc735de8895a9fe0347fd22462 100644 (file)
@@ -150,11 +150,11 @@ static void result(int llen, enum RESULT r)
        const char *msg;
 
        if (r == OK)
-               msg = " [OK]";
+               msg = "  [OK]";
        else if (r == SKIPPED)
                msg = "[SKIPPED]";
        else
-               msg = "[FAIL]";
+               msg = " [FAIL]";
 
        if (llen < 64)
                putcharn(' ', 64 - llen);