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 <[email protected]> --- 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) -- 2.54.0 (Apple Git-157)
