Re: [PATCH 2/2] tools/bootconfig: Test listing keys at the maximum depth

From
Masami Hiramatsu (Google) <mhiramat@kernel.org>
Date
2026-11-05 12:24:11
Also in
lkml
Reply to
Zhiqi Zhang, 2026-11-04
On Wed,  4 Nov 2026 15:37:42 +0800, Zhiqi Zhang [off-list ref] wrote:
Check that a key with 16 components can be attached to an initrd and
listed in full, and that a key with 17 components is still rejected.
Compare the complete list output instead of relying on the tool's
exit status: a failed key composition currently stops listing without
changing that status.

The existing good sample checks exercise the compact tree renderer,
which does not use xbc_node_compose_key_after() and therefore misses
its depth boundary error.

I wrote and ran these regression tests after reviewing the fix.

Signed-off-by: Zhiqi Zhang <redacted>
Thanks, this also looks good to me.
quoted hunk ↗ jump to hunk
---
 tools/bootconfig/test-bootconfig.sh | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff --git a/tools/bootconfig/test-bootconfig.sh b/tools/bootconfig/test-bootconfig.sh
index 530ce7e28d63..d19747e47890 100755
--- a/tools/bootconfig/test-bootconfig.sh
+++ b/tools/bootconfig/test-bootconfig.sh
@@ -100,6 +100,16 @@ xpass $BOOTCONF -a $TEMPCONF $INITRD
 printf "badnode\n" >> $TEMPCONF
 xfail $BOOTCONF -a $TEMPCONF $INITRD
 
+echo "Max key depth check"
+
+printf 'a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p = "value"\n' > $TEMPCONF
+xpass $BOOTCONF -a $TEMPCONF $INITRD
+$BOOTCONF -l $INITRD > $OUTFILE
+xpass cmp $TEMPCONF $OUTFILE
+
+printf 'a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q = "value"\n' > $TEMPCONF
+xfail $BOOTCONF -a $TEMPCONF $INITRD
+
 echo "Max filesize check"
 
 # Max size is 32767 (including terminal byte)
-- 
Masami Hiramatsu (Google) [off-list ref]
Thread (5 messages) 5 messages, 2 authors, last reply 8d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help