diff mbox series

[v6,4/4] test: cmd: fdt: fix chosen test for DM_RNG

Message ID 20240617191416.1351790-5-tharvey@gateworks.com
State Changes Requested
Delegated to: Tom Rini
Headers show
Series automatically add /chosen/kaslr-seed and deduplicate code | expand

Commit Message

Tim Harvey June 17, 2024, 7:14 p.m. UTC
Now that kaslr-seed is automatically added to the chosen node if DM_RNG
is enabled, adjust the test to expect this.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Cc: Michal Simek <michal.simek@amd.com>
Cc: Andy Yan <andy.yan@rock-chips.com>
Cc: Akash Gajjar <gajjar04akash@gmail.com>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Cc: Simon Glass <sjg@chromium.org>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Devarsh Thakkar <devarsht@ti.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Cc: Chris Morgan <macromorgan@hotmail.com>
---
v6: new patch
---
 test/cmd/fdt.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Heinrich Schuchardt June 18, 2024, 11:45 a.m. UTC | #1
On 17.06.24 21:14, Tim Harvey wrote:
> Now that kaslr-seed is automatically added to the chosen node if DM_RNG
> is enabled, adjust the test to expect this.

We need to check that if CONFIG_EFI_TCG2_PROTOCOL=y no kaslr-seed node
is passed to EFI binaries.

The right location for such a test is lib/efi_selftest/efi_selftest_tcg2.c.

We need as similar check for CONFIG_MEASURED_BOOT=y.

Best regards

Heinrich

>
> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
> Cc: Michal Simek <michal.simek@amd.com>
> Cc: Andy Yan <andy.yan@rock-chips.com>
> Cc: Akash Gajjar <gajjar04akash@gmail.com>
> Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
> Cc: Patrice Chotard <patrice.chotard@foss.st.com>
> Cc: Devarsh Thakkar <devarsht@ti.com>
> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Cc: Hugo Villeneuve <hvilleneuve@dimonoff.com>
> Cc: Marek Vasut <marex@denx.de>
> Cc: Tom Rini <trini@konsulko.com>
> Cc: Chris Morgan <macromorgan@hotmail.com>
> ---
> v6: new patch
> ---
>   test/cmd/fdt.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/test/cmd/fdt.c b/test/cmd/fdt.c
> index 547085521758..537d8a338bbf 100644
> --- a/test/cmd/fdt.c
> +++ b/test/cmd/fdt.c
> @@ -1347,6 +1347,8 @@ static int fdt_test_chosen(struct unit_test_state *uts)
>   	ut_assert_nextlinen("\tu-boot,version = "); /* Ignore the version string */
>   	if (env_bootargs)
>   		ut_assert_nextline("\tbootargs = \"%s\";", env_bootargs);
> +	if (CONFIG_IS_ENABLED(DM_RNG))
> +		ut_assert_nextlinen("\tkaslr-seed = ");
>   	ut_assert_nextline("};");
>   	ut_assertok(ut_check_console_end(uts));
>
> @@ -1363,6 +1365,8 @@ static int fdt_test_chosen(struct unit_test_state *uts)
>   	ut_assert_nextlinen("\tu-boot,version = "); /* Ignore the version string */
>   	if (env_bootargs)
>   		ut_assert_nextline("\tbootargs = \"%s\";", env_bootargs);
> +	if (CONFIG_IS_ENABLED(DM_RNG))
> +		ut_assert_nextlinen("\tkaslr-seed = ");
>   	ut_assert_nextline("};");
>   	ut_assertok(ut_check_console_end(uts));
>
Tim Harvey June 18, 2024, 3:48 p.m. UTC | #2
On Tue, Jun 18, 2024 at 4:51 AM Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> On 17.06.24 21:14, Tim Harvey wrote:
> > Now that kaslr-seed is automatically added to the chosen node if DM_RNG
> > is enabled, adjust the test to expect this.
>
> We need to check that if CONFIG_EFI_TCG2_PROTOCOL=y no kaslr-seed node
> is passed to EFI binaries.
>
> The right location for such a test is lib/efi_selftest/efi_selftest_tcg2.c.
>

Hi Heinrich,

I see you sent a patch for that but I'm not understanding how that
fits into the ut framework.

> We need as similar check for CONFIG_MEASURED_BOOT=y.

Can you explain more please?

Does this explain the CI failures I see here:
https://dev.azure.com/u-boot/u-boot/_build/results?buildId=8721&view=logs&j=6ebe5bb0-481f-5026-b4e6-2d4192a94e80&t=66c5926e-2461-580f-927d-c0d0a6120549&l=539
https://dev.azure.com/u-boot/u-boot/_build/results?buildId=8721&view=logs&j=a1270dec-081b-5c65-5cd5-5e915a842596&t=69f6cf72-86f3-551a-807d-f28f62a1426f&l=541

I'm still trying to make sense of those.

In order to test this locally I built for sandbox64_defconfig and ran
"./u-boot -Dc 'ut fdt'" but it seems that doesn't cover enough cases.

Best regards,

Tim

>
> Best regards
>
> Heinrich
>
> >
> > Signed-off-by: Tim Harvey <tharvey@gateworks.com>
> > Cc: Michal Simek <michal.simek@amd.com>
> > Cc: Andy Yan <andy.yan@rock-chips.com>
> > Cc: Akash Gajjar <gajjar04akash@gmail.com>
> > Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
> > Cc: Simon Glass <sjg@chromium.org>
> > Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
> > Cc: Patrice Chotard <patrice.chotard@foss.st.com>
> > Cc: Devarsh Thakkar <devarsht@ti.com>
> > Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
> > Cc: Hugo Villeneuve <hvilleneuve@dimonoff.com>
> > Cc: Marek Vasut <marex@denx.de>
> > Cc: Tom Rini <trini@konsulko.com>
> > Cc: Chris Morgan <macromorgan@hotmail.com>
> > ---
> > v6: new patch
> > ---
> >   test/cmd/fdt.c | 4 ++++
> >   1 file changed, 4 insertions(+)
> >
> > diff --git a/test/cmd/fdt.c b/test/cmd/fdt.c
> > index 547085521758..537d8a338bbf 100644
> > --- a/test/cmd/fdt.c
> > +++ b/test/cmd/fdt.c
> > @@ -1347,6 +1347,8 @@ static int fdt_test_chosen(struct unit_test_state *uts)
> >       ut_assert_nextlinen("\tu-boot,version = "); /* Ignore the version string */
> >       if (env_bootargs)
> >               ut_assert_nextline("\tbootargs = \"%s\";", env_bootargs);
> > +     if (CONFIG_IS_ENABLED(DM_RNG))
> > +             ut_assert_nextlinen("\tkaslr-seed = ");
> >       ut_assert_nextline("};");
> >       ut_assertok(ut_check_console_end(uts));
> >
> > @@ -1363,6 +1365,8 @@ static int fdt_test_chosen(struct unit_test_state *uts)
> >       ut_assert_nextlinen("\tu-boot,version = "); /* Ignore the version string */
> >       if (env_bootargs)
> >               ut_assert_nextline("\tbootargs = \"%s\";", env_bootargs);
> > +     if (CONFIG_IS_ENABLED(DM_RNG))
> > +             ut_assert_nextlinen("\tkaslr-seed = ");
> >       ut_assert_nextline("};");
> >       ut_assertok(ut_check_console_end(uts));
> >
>
Tim Harvey June 18, 2024, 4:45 p.m. UTC | #3
On Tue, Jun 18, 2024 at 8:48 AM Tim Harvey <tharvey@gateworks.com> wrote:
>
> On Tue, Jun 18, 2024 at 4:51 AM Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
> >
> > On 17.06.24 21:14, Tim Harvey wrote:
> > > Now that kaslr-seed is automatically added to the chosen node if DM_RNG
> > > is enabled, adjust the test to expect this.
> >
> > We need to check that if CONFIG_EFI_TCG2_PROTOCOL=y no kaslr-seed node
> > is passed to EFI binaries.
> >
> > The right location for such a test is lib/efi_selftest/efi_selftest_tcg2.c.
> >
>
> Hi Heinrich,
>
> I see you sent a patch for that but I'm not understanding how that
> fits into the ut framework.
>
> > We need as similar check for CONFIG_MEASURED_BOOT=y.
>
> Can you explain more please?
>
> Does this explain the CI failures I see here:
> https://dev.azure.com/u-boot/u-boot/_build/results?buildId=8721&view=logs&j=6ebe5bb0-481f-5026-b4e6-2d4192a94e80&t=66c5926e-2461-580f-927d-c0d0a6120549&l=539
> https://dev.azure.com/u-boot/u-boot/_build/results?buildId=8721&view=logs&j=a1270dec-081b-5c65-5cd5-5e915a842596&t=69f6cf72-86f3-551a-807d-f28f62a1426f&l=541
>
> I'm still trying to make sense of those.
>
> In order to test this locally I built for sandbox64_defconfig and ran
> "./u-boot -Dc 'ut fdt'" but it seems that doesn't cover enough cases.
>

I believe I understand the Azure pipeline failures now. I don't see
exactly where they pick a defconfig but the failed test cases are
under 'test.py for sandbox sandbox' and 'test.py for sandbox
sandbox_clang' which I've come to understand means they use
'sandbox_defconfig' which defines CONFIG_MEASURED_BOOT where
sandbox64_defconfig which I tested does not.

So I need to update the test to:
+       if (IS_ENABLED(CONFIG_DM_RNG) &&
+           !IS_ENABLED(CONFIG_MEASURED_BOOT) &&
+           !IS_ENABLED(CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT))
+               ut_assert_nextlinen("\tkaslr-seed = ");

I've issued a PR for v7 to test via CI and will submit if all is well.

Best Regards,

Tim

> Best regards,
>
> Tim
>
> >
> > Best regards
> >
> > Heinrich
> >
> > >
> > > Signed-off-by: Tim Harvey <tharvey@gateworks.com>
> > > Cc: Michal Simek <michal.simek@amd.com>
> > > Cc: Andy Yan <andy.yan@rock-chips.com>
> > > Cc: Akash Gajjar <gajjar04akash@gmail.com>
> > > Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
> > > Cc: Simon Glass <sjg@chromium.org>
> > > Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
> > > Cc: Patrice Chotard <patrice.chotard@foss.st.com>
> > > Cc: Devarsh Thakkar <devarsht@ti.com>
> > > Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
> > > Cc: Hugo Villeneuve <hvilleneuve@dimonoff.com>
> > > Cc: Marek Vasut <marex@denx.de>
> > > Cc: Tom Rini <trini@konsulko.com>
> > > Cc: Chris Morgan <macromorgan@hotmail.com>
> > > ---
> > > v6: new patch
> > > ---
> > >   test/cmd/fdt.c | 4 ++++
> > >   1 file changed, 4 insertions(+)
> > >
> > > diff --git a/test/cmd/fdt.c b/test/cmd/fdt.c
> > > index 547085521758..537d8a338bbf 100644
> > > --- a/test/cmd/fdt.c
> > > +++ b/test/cmd/fdt.c
> > > @@ -1347,6 +1347,8 @@ static int fdt_test_chosen(struct unit_test_state *uts)
> > >       ut_assert_nextlinen("\tu-boot,version = "); /* Ignore the version string */
> > >       if (env_bootargs)
> > >               ut_assert_nextline("\tbootargs = \"%s\";", env_bootargs);
> > > +     if (CONFIG_IS_ENABLED(DM_RNG))
> > > +             ut_assert_nextlinen("\tkaslr-seed = ");
> > >       ut_assert_nextline("};");
> > >       ut_assertok(ut_check_console_end(uts));
> > >
> > > @@ -1363,6 +1365,8 @@ static int fdt_test_chosen(struct unit_test_state *uts)
> > >       ut_assert_nextlinen("\tu-boot,version = "); /* Ignore the version string */
> > >       if (env_bootargs)
> > >               ut_assert_nextline("\tbootargs = \"%s\";", env_bootargs);
> > > +     if (CONFIG_IS_ENABLED(DM_RNG))
> > > +             ut_assert_nextlinen("\tkaslr-seed = ");
> > >       ut_assert_nextline("};");
> > >       ut_assertok(ut_check_console_end(uts));
> > >
> >
Heinrich Schuchardt June 18, 2024, 4:56 p.m. UTC | #4
Am 18. Juni 2024 18:45:53 MESZ schrieb Tim Harvey <tharvey@gateworks.com>:
>On Tue, Jun 18, 2024 at 8:48 AM Tim Harvey <tharvey@gateworks.com> wrote:
>>
>> On Tue, Jun 18, 2024 at 4:51 AM Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>> >
>> > On 17.06.24 21:14, Tim Harvey wrote:
>> > > Now that kaslr-seed is automatically added to the chosen node if DM_RNG
>> > > is enabled, adjust the test to expect this.
>> >
>> > We need to check that if CONFIG_EFI_TCG2_PROTOCOL=y no kaslr-seed node
>> > is passed to EFI binaries.
>> >
>> > The right location for such a test is lib/efi_selftest/efi_selftest_tcg2.c.
>> >
>>
>> Hi Heinrich,
>>
>> I see you sent a patch for that but I'm not understanding how that
>> fits into the ut framework.
>>
>> > We need as similar check for CONFIG_MEASURED_BOOT=y.
>>
>> Can you explain more please?

The idea of measured boot is that you check if the hash has the same value every time you boot. If you measure the device-tree and it contains a random value, you get a random hash.

Best regards

Heinrich

>>
>> Does this explain the CI failures I see here:
>> https://dev.azure.com/u-boot/u-boot/_build/results?buildId=8721&view=logs&j=6ebe5bb0-481f-5026-b4e6-2d4192a94e80&t=66c5926e-2461-580f-927d-c0d0a6120549&l=539
>> https://dev.azure.com/u-boot/u-boot/_build/results?buildId=8721&view=logs&j=a1270dec-081b-5c65-5cd5-5e915a842596&t=69f6cf72-86f3-551a-807d-f28f62a1426f&l=541
>>
>> I'm still trying to make sense of those.
>>
>> In order to test this locally I built for sandbox64_defconfig and ran
>> "./u-boot -Dc 'ut fdt'" but it seems that doesn't cover enough cases.
>>
>
>I believe I understand the Azure pipeline failures now. I don't see
>exactly where they pick a defconfig but the failed test cases are
>under 'test.py for sandbox sandbox' and 'test.py for sandbox
>sandbox_clang' which I've come to understand means they use
>'sandbox_defconfig' which defines CONFIG_MEASURED_BOOT where
>sandbox64_defconfig which I tested does not.
>
>So I need to update the test to:
>+       if (IS_ENABLED(CONFIG_DM_RNG) &&
>+           !IS_ENABLED(CONFIG_MEASURED_BOOT) &&
>+           !IS_ENABLED(CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT))
>+               ut_assert_nextlinen("\tkaslr-seed = ");
>
>I've issued a PR for v7 to test via CI and will submit if all is well.
>
>Best Regards,
>
>Tim
>
>> Best regards,
>>
>> Tim
>>
>> >
>> > Best regards
>> >
>> > Heinrich
>> >
>> > >
>> > > Signed-off-by: Tim Harvey <tharvey@gateworks.com>
>> > > Cc: Michal Simek <michal.simek@amd.com>
>> > > Cc: Andy Yan <andy.yan@rock-chips.com>
>> > > Cc: Akash Gajjar <gajjar04akash@gmail.com>
>> > > Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
>> > > Cc: Simon Glass <sjg@chromium.org>
>> > > Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
>> > > Cc: Patrice Chotard <patrice.chotard@foss.st.com>
>> > > Cc: Devarsh Thakkar <devarsht@ti.com>
>> > > Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
>> > > Cc: Hugo Villeneuve <hvilleneuve@dimonoff.com>
>> > > Cc: Marek Vasut <marex@denx.de>
>> > > Cc: Tom Rini <trini@konsulko.com>
>> > > Cc: Chris Morgan <macromorgan@hotmail.com>
>> > > ---
>> > > v6: new patch
>> > > ---
>> > >   test/cmd/fdt.c | 4 ++++
>> > >   1 file changed, 4 insertions(+)
>> > >
>> > > diff --git a/test/cmd/fdt.c b/test/cmd/fdt.c
>> > > index 547085521758..537d8a338bbf 100644
>> > > --- a/test/cmd/fdt.c
>> > > +++ b/test/cmd/fdt.c
>> > > @@ -1347,6 +1347,8 @@ static int fdt_test_chosen(struct unit_test_state *uts)
>> > >       ut_assert_nextlinen("\tu-boot,version = "); /* Ignore the version string */
>> > >       if (env_bootargs)
>> > >               ut_assert_nextline("\tbootargs = \"%s\";", env_bootargs);
>> > > +     if (CONFIG_IS_ENABLED(DM_RNG))
>> > > +             ut_assert_nextlinen("\tkaslr-seed = ");
>> > >       ut_assert_nextline("};");
>> > >       ut_assertok(ut_check_console_end(uts));
>> > >
>> > > @@ -1363,6 +1365,8 @@ static int fdt_test_chosen(struct unit_test_state *uts)
>> > >       ut_assert_nextlinen("\tu-boot,version = "); /* Ignore the version string */
>> > >       if (env_bootargs)
>> > >               ut_assert_nextline("\tbootargs = \"%s\";", env_bootargs);
>> > > +     if (CONFIG_IS_ENABLED(DM_RNG))
>> > > +             ut_assert_nextlinen("\tkaslr-seed = ");
>> > >       ut_assert_nextline("};");
>> > >       ut_assertok(ut_check_console_end(uts));
>> > >
>> >
Tim Harvey June 18, 2024, 7:30 p.m. UTC | #5
On Tue, Jun 18, 2024 at 9:45 AM Tim Harvey <tharvey@gateworks.com> wrote:
>
> On Tue, Jun 18, 2024 at 8:48 AM Tim Harvey <tharvey@gateworks.com> wrote:
> >
> > On Tue, Jun 18, 2024 at 4:51 AM Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
> > >
> > > On 17.06.24 21:14, Tim Harvey wrote:
> > > > Now that kaslr-seed is automatically added to the chosen node if DM_RNG
> > > > is enabled, adjust the test to expect this.
> > >
> > > We need to check that if CONFIG_EFI_TCG2_PROTOCOL=y no kaslr-seed node
> > > is passed to EFI binaries.
> > >
> > > The right location for such a test is lib/efi_selftest/efi_selftest_tcg2.c.
> > >
> >
> > Hi Heinrich,
> >
> > I see you sent a patch for that but I'm not understanding how that
> > fits into the ut framework.
> >
> > > We need as similar check for CONFIG_MEASURED_BOOT=y.
> >
> > Can you explain more please?
> >
> > Does this explain the CI failures I see here:
> > https://dev.azure.com/u-boot/u-boot/_build/results?buildId=8721&view=logs&j=6ebe5bb0-481f-5026-b4e6-2d4192a94e80&t=66c5926e-2461-580f-927d-c0d0a6120549&l=539
> > https://dev.azure.com/u-boot/u-boot/_build/results?buildId=8721&view=logs&j=a1270dec-081b-5c65-5cd5-5e915a842596&t=69f6cf72-86f3-551a-807d-f28f62a1426f&l=541
> >
> > I'm still trying to make sense of those.
> >
> > In order to test this locally I built for sandbox64_defconfig and ran
> > "./u-boot -Dc 'ut fdt'" but it seems that doesn't cover enough cases.
> >
>
> I believe I understand the Azure pipeline failures now. I don't see
> exactly where they pick a defconfig but the failed test cases are
> under 'test.py for sandbox sandbox' and 'test.py for sandbox
> sandbox_clang' which I've come to understand means they use
> 'sandbox_defconfig' which defines CONFIG_MEASURED_BOOT where
> sandbox64_defconfig which I tested does not.
>
> So I need to update the test to:
> +       if (IS_ENABLED(CONFIG_DM_RNG) &&
> +           !IS_ENABLED(CONFIG_MEASURED_BOOT) &&
> +           !IS_ENABLED(CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT))
> +               ut_assert_nextlinen("\tkaslr-seed = ");
>
> I've issued a PR for v7 to test via CI and will submit if all is well.
>

Hi Tom,

Can you explain what the following Azure pipeline error means [1]?

=================================== FAILURES ===================================
____________ TestEfiCapsuleFirmwareSignedRaw.test_efi_capsule_auth5 ____________
test/py/tests/test_efi_capsule/test_capsule_firmware_signed_raw.py:178:
in test_efi_capsule_auth5
capsule_setup(u_boot_console, disk_img, '0x0000000000000004')
test/py/tests/test_efi_capsule/capsule_common.py:17: in capsule_setup
u_boot_console.run_command_list([
test/py/u_boot_console_base.py:297: in run_command_list
output.append(self.run_command(cmd))
test/py/u_boot_console_base.py:256: in run_command
m = self.p.expect([chunk] + self.bad_patterns)
test/py/u_boot_spawn.py:193: in expect
raise Timeout()
E u_boot_spawn.Timeout
----------------------------- Captured stdout call -----------------------------
=> host bind 0 /tmp/sandbox/persistentcyclic function wdt-gpio-level
took too long: 5523us vs 5000us max
-data/test_efi_capsule.img

This seems like something from test/dm/wdt.c and unrelated to my patchset.

Best Regards,

Tim
[1] https://dev.azure.com/u-boot/u-boot/_build/results?buildId=8731&view=logs&j=a1270dec-081b-5c65-5cd5-5e915a842596&t=69f6cf72-86f3-551a-807d-f28f62a1426f&l=541

> Best Regards,
>
> Tim
>
> > Best regards,
> >
> > Tim
> >
> > >
> > > Best regards
> > >
> > > Heinrich
> > >
> > > >
> > > > Signed-off-by: Tim Harvey <tharvey@gateworks.com>
> > > > Cc: Michal Simek <michal.simek@amd.com>
> > > > Cc: Andy Yan <andy.yan@rock-chips.com>
> > > > Cc: Akash Gajjar <gajjar04akash@gmail.com>
> > > > Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
> > > > Cc: Simon Glass <sjg@chromium.org>
> > > > Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
> > > > Cc: Patrice Chotard <patrice.chotard@foss.st.com>
> > > > Cc: Devarsh Thakkar <devarsht@ti.com>
> > > > Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
> > > > Cc: Hugo Villeneuve <hvilleneuve@dimonoff.com>
> > > > Cc: Marek Vasut <marex@denx.de>
> > > > Cc: Tom Rini <trini@konsulko.com>
> > > > Cc: Chris Morgan <macromorgan@hotmail.com>
> > > > ---
> > > > v6: new patch
> > > > ---
> > > >   test/cmd/fdt.c | 4 ++++
> > > >   1 file changed, 4 insertions(+)
> > > >
> > > > diff --git a/test/cmd/fdt.c b/test/cmd/fdt.c
> > > > index 547085521758..537d8a338bbf 100644
> > > > --- a/test/cmd/fdt.c
> > > > +++ b/test/cmd/fdt.c
> > > > @@ -1347,6 +1347,8 @@ static int fdt_test_chosen(struct unit_test_state *uts)
> > > >       ut_assert_nextlinen("\tu-boot,version = "); /* Ignore the version string */
> > > >       if (env_bootargs)
> > > >               ut_assert_nextline("\tbootargs = \"%s\";", env_bootargs);
> > > > +     if (CONFIG_IS_ENABLED(DM_RNG))
> > > > +             ut_assert_nextlinen("\tkaslr-seed = ");
> > > >       ut_assert_nextline("};");
> > > >       ut_assertok(ut_check_console_end(uts));
> > > >
> > > > @@ -1363,6 +1365,8 @@ static int fdt_test_chosen(struct unit_test_state *uts)
> > > >       ut_assert_nextlinen("\tu-boot,version = "); /* Ignore the version string */
> > > >       if (env_bootargs)
> > > >               ut_assert_nextline("\tbootargs = \"%s\";", env_bootargs);
> > > > +     if (CONFIG_IS_ENABLED(DM_RNG))
> > > > +             ut_assert_nextlinen("\tkaslr-seed = ");
> > > >       ut_assert_nextline("};");
> > > >       ut_assertok(ut_check_console_end(uts));
> > > >
> > >
Fabio Estevam June 18, 2024, 7:35 p.m. UTC | #6
Hi Tim,

On Tue, Jun 18, 2024 at 4:30 PM Tim Harvey <tharvey@gateworks.com> wrote:

> This seems like something from test/dm/wdt.c and unrelated to my patchset.

Do you have this recent commit applied?

https://github.com/u-boot/u-boot/commit/1fd754cebd38d7456caa82bef15225cbe77960ec
Tim Harvey June 18, 2024, 7:51 p.m. UTC | #7
On Tue, Jun 18, 2024 at 12:35 PM Fabio Estevam <festevam@gmail.com> wrote:
>
> Hi Tim,
>
> On Tue, Jun 18, 2024 at 4:30 PM Tim Harvey <tharvey@gateworks.com> wrote:
>
> > This seems like something from test/dm/wdt.c and unrelated to my patchset.
>
> Do you have this recent commit applied?
>
> https://github.com/u-boot/u-boot/commit/1fd754cebd38d7456caa82bef15225cbe77960ec

Hi Fabio,

Nope - I'm 1 day behind :)

That would appear to be the issue... I'll rebase on todays
origin/master and try again.

Thanks,

Tim
Tim Harvey June 18, 2024, 9 p.m. UTC | #8
On Tue, Jun 18, 2024 at 12:51 PM Tim Harvey <tharvey@gateworks.com> wrote:
>
> On Tue, Jun 18, 2024 at 12:35 PM Fabio Estevam <festevam@gmail.com> wrote:
> >
> > Hi Tim,
> >
> > On Tue, Jun 18, 2024 at 4:30 PM Tim Harvey <tharvey@gateworks.com> wrote:
> >
> > > This seems like something from test/dm/wdt.c and unrelated to my patchset.
> >
> > Do you have this recent commit applied?
> >
> > https://github.com/u-boot/u-boot/commit/1fd754cebd38d7456caa82bef15225cbe77960ec
>
> Hi Fabio,
>
> Nope - I'm 1 day behind :)
>
> That would appear to be the issue... I'll rebase on todays
> origin/master and try again.
>

Fabio,

That didn't quite do it... I'm seeing Azure pipeline timeouts beyond 5000us:
host bind 0 /tmp/sandbox/persistent-cyclic function wdt-gpio-level
took too long: 5368us vs 5000us max

Seems silly to just keep bumping this default?

Tim
diff mbox series

Patch

diff --git a/test/cmd/fdt.c b/test/cmd/fdt.c
index 547085521758..537d8a338bbf 100644
--- a/test/cmd/fdt.c
+++ b/test/cmd/fdt.c
@@ -1347,6 +1347,8 @@  static int fdt_test_chosen(struct unit_test_state *uts)
 	ut_assert_nextlinen("\tu-boot,version = "); /* Ignore the version string */
 	if (env_bootargs)
 		ut_assert_nextline("\tbootargs = \"%s\";", env_bootargs);
+	if (CONFIG_IS_ENABLED(DM_RNG))
+		ut_assert_nextlinen("\tkaslr-seed = ");
 	ut_assert_nextline("};");
 	ut_assertok(ut_check_console_end(uts));
 
@@ -1363,6 +1365,8 @@  static int fdt_test_chosen(struct unit_test_state *uts)
 	ut_assert_nextlinen("\tu-boot,version = "); /* Ignore the version string */
 	if (env_bootargs)
 		ut_assert_nextline("\tbootargs = \"%s\";", env_bootargs);
+	if (CONFIG_IS_ENABLED(DM_RNG))
+		ut_assert_nextlinen("\tkaslr-seed = ");
 	ut_assert_nextline("};");
 	ut_assertok(ut_check_console_end(uts));