Re: [PATCH 2/2] tools/bootconfig: Test listing keys at the maximum depth
From: Masami Hiramatsu (Google)
Date: Thu Nov 05 2026 - 07:25:45 EST
On Wed, 4 Nov 2026 15:37:42 +0800, Zhiqi Zhang <zhiqizhangg@xxxxxxxxx> 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 <zhiqizhangg@xxxxxxxxx>
Thanks, this also looks good to me.
> ---
> 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) <mhiramat@xxxxxxxxxx>