selftests/nolibc: make result alignment more robust
authorThomas Weißschuh <linux@weissschuh.net>
Wed, 22 Nov 2023 07:27:59 +0000 (08:27 +0100)
committerThomas Weißschuh <linux@weissschuh.net>
Mon, 11 Dec 2023 21:38:31 +0000 (22:38 +0100)
commitb9e64724cd8aeca9e7ab4523a92ccf2ba0cd1de2
tree56c8763fb8b4dfeee195323b315d1a5c36e861c7
parent544102458a8d1c33f9f5f99f9bda8e2b858bcb10
selftests/nolibc: make result alignment more robust

Move the check of the existing length into the function so it can't be
forgotten by the caller.

Also hardcode the padding character as only spaces are ever used.

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