
Hi Jerome,
Just something I noticed earlier...when running 'ut lib' I see this failure on sandbox:
test/cmd/wget.c:215, net_test_wget(): 0 == run_command("wget ${loadaddr} 1.1.2.2:/index.html", 0): Expected 0x0 (0), got 0x1 (1)
Also, since it is testing a command and is in test/cmd it really should be in the 'cmd' test suite, not 'lib'.
Regards, Simon

Hello Simon,
On 10/27/24 17:16, Simon Glass wrote:
Hi Jerome,
Just something I noticed earlier...when running 'ut lib' I see this failure on sandbox:
test/cmd/wget.c:215, net_test_wget(): 0 == run_command("wget ${loadaddr} 1.1.2.2:/index.html", 0): Expected 0x0 (0), got 0x1 (1)
The reason is:
$ make sandbox_defconfig $ make -j$(nproc) $ ./u-boot -c "ut lib" [...] Net: eth_initialize() No ethernet found.
I don't know how sandbox is supposed to instantiate ethernet devices?
Also, since it is testing a command and is in test/cmd it really should be in the 'cmd' test suite, not 'lib'.
Agreed. I've posted a patch for that: https://lore.kernel.org/u-boot/20241105120653.99438-1-jerome.forissier@linar...
Regards, Simon
Thanks,

Hi Jerome,
On Tue, 5 Nov 2024 at 05:12, Jerome Forissier jerome.forissier@linaro.org wrote:
Hello Simon,
On 10/27/24 17:16, Simon Glass wrote:
Hi Jerome,
Just something I noticed earlier...when running 'ut lib' I see this failure on sandbox:
test/cmd/wget.c:215, net_test_wget(): 0 == run_command("wget ${loadaddr} 1.1.2.2:/index.html", 0): Expected 0x0 (0), got 0x1 (1)
The reason is:
$ make sandbox_defconfig $ make -j$(nproc) $ ./u-boot -c "ut lib" [...] Net: eth_initialize() No ethernet found.
I don't know how sandbox is supposed to instantiate ethernet devices?
If you try it before your changes you will see what it is supposed to do. There is a sandbox network device and it can be used to send and receive data within U-Boot itself, for testing purposes.
Also, since it is testing a command and is in test/cmd it really should be in the 'cmd' test suite, not 'lib'.
Agreed. I've posted a patch for that: https://lore.kernel.org/u-boot/20241105120653.99438-1-jerome.forissier@linar...
Thanks.
Regards, Simon

On 11/5/24 15:12, Simon Glass wrote:
Hi Jerome,
On Tue, 5 Nov 2024 at 05:12, Jerome Forissier jerome.forissier@linaro.org wrote:
Hello Simon,
On 10/27/24 17:16, Simon Glass wrote:
Hi Jerome,
Just something I noticed earlier...when running 'ut lib' I see this failure on sandbox:
test/cmd/wget.c:215, net_test_wget(): 0 == run_command("wget ${loadaddr} 1.1.2.2:/index.html", 0): Expected 0x0 (0), got 0x1 (1)
The reason is:
$ make sandbox_defconfig $ make -j$(nproc) $ ./u-boot -c "ut lib" [...] Net: eth_initialize() No ethernet found.
I don't know how sandbox is supposed to instantiate ethernet devices?
If you try it before your changes you will see what it is supposed to do. There is a sandbox network device and it can be used to send and receive data within U-Boot itself, for testing purposes.
I tried it just before my changes but the result is the same.
$ git log --oneline -1 1ca0ddb643f 1ca0ddb643f Merge commit 'f3f86fd1fe0fb288356bff78f8a6fa2edf89e3fc' as 'lib/lwip/lwip' $ git checkout 1ca0ddb643f^ HEAD is now at d5cab0d6adc Revert "Makefile: Drop SPL_FIT_GENERATOR / SPL_FIT_SOURCE support" changes $ make sandbox_defconfig $ make -j$(nproc) # # configuration written to .config # $ ./u-boot -c "ut lib" [...] Net: eth_initialize() No ethernet found. [...] test/cmd/wget.c:215, net_test_wget(): 0 == run_command("wget ${loadaddr} 1.1.2.2:/index.html", 0): Expected 0x0 (0), got 0x1 (1)
Can you give a commit SHA1 where net_test_wget() passes?
Thanks,

On 05/11/2024 17:50, Jerome Forissier wrote:
On 11/5/24 15:12, Simon Glass wrote:
Hi Jerome,
On Tue, 5 Nov 2024 at 05:12, Jerome Forissier jerome.forissier@linaro.org wrote:
Hello Simon,
On 10/27/24 17:16, Simon Glass wrote:
Hi Jerome,
Just something I noticed earlier...when running 'ut lib' I see this failure on sandbox:
test/cmd/wget.c:215, net_test_wget(): 0 == run_command("wget ${loadaddr} 1.1.2.2:/index.html", 0): Expected 0x0 (0), got 0x1 (1)
The reason is:
$ make sandbox_defconfig $ make -j$(nproc) $ ./u-boot -c "ut lib" [...] Net: eth_initialize() No ethernet found.
I don't know how sandbox is supposed to instantiate ethernet devices?
If you try it before your changes you will see what it is supposed to do. There is a sandbox network device and it can be used to send and receive data within U-Boot itself, for testing purposes.
I tried it just before my changes but the result is the same.
$ git log --oneline -1 1ca0ddb643f 1ca0ddb643f Merge commit 'f3f86fd1fe0fb288356bff78f8a6fa2edf89e3fc' as 'lib/lwip/lwip' $ git checkout 1ca0ddb643f^ HEAD is now at d5cab0d6adc Revert "Makefile: Drop SPL_FIT_GENERATOR / SPL_FIT_SOURCE support" changes $ make sandbox_defconfig $ make -j$(nproc) # # configuration written to .config # $ ./u-boot -c "ut lib" [...] Net: eth_initialize() No ethernet found. [...] test/cmd/wget.c:215, net_test_wget(): 0 == run_command("wget ${loadaddr} 1.1.2.2:/index.html", 0): Expected 0x0 (0), got 0x1 (1)
Can you give a commit SHA1 where net_test_wget() passes?
Thanks,
Have you tried the -T parameter to the sandbox binary to load the test device tree?
$ ./u-boot -T -c "ut lib"
Works for me.
Andrew

On 11/6/24 00:03, Andrew Goodbody wrote:
On 05/11/2024 17:50, Jerome Forissier wrote:
On 11/5/24 15:12, Simon Glass wrote:
Hi Jerome,
On Tue, 5 Nov 2024 at 05:12, Jerome Forissier jerome.forissier@linaro.org wrote:
Hello Simon,
On 10/27/24 17:16, Simon Glass wrote:
Hi Jerome,
Just something I noticed earlier...when running 'ut lib' I see this failure on sandbox:
test/cmd/wget.c:215, net_test_wget(): 0 == run_command("wget ${loadaddr} 1.1.2.2:/index.html", 0): Expected 0x0 (0), got 0x1 (1)
The reason is:
$ make sandbox_defconfig $ make -j$(nproc) $ ./u-boot -c "ut lib" [...] Net: eth_initialize() No ethernet found.
I don't know how sandbox is supposed to instantiate ethernet devices?
If you try it before your changes you will see what it is supposed to do. There is a sandbox network device and it can be used to send and receive data within U-Boot itself, for testing purposes.
I tried it just before my changes but the result is the same.
$ git log --oneline -1 1ca0ddb643f 1ca0ddb643f Merge commit 'f3f86fd1fe0fb288356bff78f8a6fa2edf89e3fc' as 'lib/lwip/lwip' $ git checkout 1ca0ddb643f^ HEAD is now at d5cab0d6adc Revert "Makefile: Drop SPL_FIT_GENERATOR / SPL_FIT_SOURCE support" changes $ make sandbox_defconfig $ make -j$(nproc) # # configuration written to .config # $ ./u-boot -c "ut lib" [...] Net: eth_initialize() No ethernet found. [...] test/cmd/wget.c:215, net_test_wget(): 0 == run_command("wget ${loadaddr} 1.1.2.2:/index.html", 0): Expected 0x0 (0), got 0x1 (1)
Can you give a commit SHA1 where net_test_wget() passes?
Thanks,
Have you tried the -T parameter to the sandbox binary to load the test device tree?
$ ./u-boot -T -c "ut lib"
Works for me.
Works for me too. Simon, does that address your concerns?
Thanks,
participants (3)
-
Andrew Goodbody
-
Jerome Forissier
-
Simon Glass