proc-cmdline: parse the whole /proc/cmdline

The kernel command line may contain newlines which kernel happily
accepts, but we'd ignore everything past the first newline. Let's fix
that by replacing read_one_line_file() with read_full_file().
This commit is contained in:
Frantisek Sumsal
2023-06-13 09:54:02 +02:00
committed by Lennart Poettering
parent 0f85a0d38f
commit d5a937a62a
3 changed files with 11 additions and 2 deletions
+6
View File
@@ -3,6 +3,12 @@
set -eux
set -o pipefail
if ! systemd-detect-virt -qc && [[ "${TEST_CMDLINE_NEWLINE:-}" != bar ]]; then
cat /proc/cmdline
echo >&2 "Expected TEST_CMDLINE_NEWLINE=bar from the kernel command line"
exit 1
fi
NPROC=$(nproc)
MAX_QUEUE_SIZE=${NPROC:-2}
TESTS_GLOB=${TESTS_GLOB:-test-*}