Skip to content

Commit c13e02d

Browse files
committed
Merge tag 'bootconfig-fixes-v6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull bootconfig fixes from Masami Hiramatsu: - Fix bootconfig test script to test increased maximum number (8192) node correctly - Change the console message if there is no bootconfig data and the kernel is compiled with CONFIG_BOOT_CONFIG_FORCE=y * tag 'bootconfig-fixes-v6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: bootconfig: Change message if no bootconfig with CONFIG_BOOT_CONFIG_FORCE=y bootconfig: Fix testcase to increase max node
2 parents a1effab + caa0708 commit c13e02d

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

init/main.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ static char *extra_init_args;
156156

157157
#ifdef CONFIG_BOOT_CONFIG
158158
/* Is bootconfig on command line? */
159-
static bool bootconfig_found = IS_ENABLED(CONFIG_BOOT_CONFIG_FORCE);
159+
static bool bootconfig_found;
160160
static size_t initargs_offs;
161161
#else
162162
# define bootconfig_found false
@@ -429,15 +429,19 @@ static void __init setup_boot_config(void)
429429
err = parse_args("bootconfig", tmp_cmdline, NULL, 0, 0, 0, NULL,
430430
bootconfig_params);
431431

432-
if (IS_ERR(err) || !bootconfig_found)
432+
if (IS_ERR(err) || !(bootconfig_found || IS_ENABLED(CONFIG_BOOT_CONFIG_FORCE)))
433433
return;
434434

435435
/* parse_args() stops at the next param of '--' and returns an address */
436436
if (err)
437437
initargs_offs = err - tmp_cmdline;
438438

439439
if (!data) {
440-
pr_err("'bootconfig' found on command line, but no bootconfig found\n");
440+
/* If user intended to use bootconfig, show an error level message */
441+
if (bootconfig_found)
442+
pr_err("'bootconfig' found on command line, but no bootconfig found\n");
443+
else
444+
pr_info("No bootconfig data provided, so skipping bootconfig");
441445
return;
442446
}
443447

tools/bootconfig/test-bootconfig.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,14 @@ xfail grep -i "error" $OUTFILE
8787

8888
echo "Max node number check"
8989

90-
echo -n > $TEMPCONF
91-
for i in `seq 1 1024` ; do
92-
echo "node$i" >> $TEMPCONF
93-
done
90+
awk '
91+
BEGIN {
92+
for (i = 0; i < 26; i += 1)
93+
printf("%c\n", 65 + i % 26)
94+
for (i = 26; i < 8192; i += 1)
95+
printf("%c%c%c\n", 65 + i % 26, 65 + (i / 26) % 26, 65 + (i / 26 / 26))
96+
}
97+
' > $TEMPCONF
9498
xpass $BOOTCONF -a $TEMPCONF $INITRD
9599

96100
echo "badnode" >> $TEMPCONF

0 commit comments

Comments
 (0)