LibBSD: why most tests fails

I was running the tests of rtems-libbsd-14 (rtems-7) for arm/xilinx_zynq_a9_qemu bsp like so:

$(RTEM_PATH)/bin/rtems-test --rtems-bsp=xilinx_zynq_a9_qemu build

And I’ve followed similar process described in RTEMS LibBSD Readme to build it.

Why most of the tests fails?

output.txt (12.3 KB)

How was LibBSD configured?

Can you please review each test and if you see a common issue please report it and that test’s output?

I configured it like so:

./waf configure --prefix=$HOME/opt/rtems-build/7 --rtems-bsps=arm/xilinx_zynq_a9_qemu --buildset=buildset/default.ini

What is the qemu network set up?

this is output of ~/opt/rtems-build/7/bin/rtems-test --rtems-bsp=xilinx_zynq_a9_qemu build --trace > output.txt when running with --trace option
output.txt (571.9 KB)

I’ve found the config file it uses to run qemu and these are the options:

[xilinx_zynq_a9_qemu]
bsp           = xilinx_zynq_a9_qemu
arch          = arm
tester        = %{_rtscripts}/qemu.cfg
bsp_qemu_opts = %{qemu_opts_base} %{qemu_opts_no_net} %{qemu_opts_serial} -M xilinx-zynq-a9 -m 256M

Please suggest network options as currently its setup via %{qemu_opts_no_net} by default

I suggest you try rtems-run and a single test, ie provide just it on the command line.

We need to see the control output of the test to know the reason when it fails.

ok let me run the tests and report it if i encounter any common bugs

You need to get the console output from qemu.

at this poiint, it would be better for me to directly use qemu instead of rtems-run

Yes I think it may be. I checked and rtems-test and rtems-run do not provide networking options for qemu by default. I think you need to add a custom RTEMS rc options file to add them.

After running all tests manually I noticed they all throws fails due to this assertion.

assertion "_Chain_Is_node_off_chain( the_node )" failed: file "../../../cpukit/include/rtems/score/chainimpl.h", line 678, function: _Chain_Append_unprotected

I realized that bug was fixed and my rtems source was outdated so I performed git pull.

Now only network related tests does not pass, they are mostly stuck and shows “Network is unreachable” or Timeouts after some time
This is my qemu setup. (let me know if I am doing something wrong with qemu flags that is making the tests fail)

qemu-system-arm -no-reboot -nographic -monitor none \
   -serial null -serial stdio \
   -M xilinx-zynq-a9 -m 256M \
   -netdev user,id=net0,hostfwd=tcp::2222-:23 \
   -net nic,netdev=net0,macaddr=52:54:00:12:34:56 \
   -kernel ./zerocopy01.exe > zerocopy01.output.txt

And these are some output logs of some of the tests
dhcpcd01.log.txt (3.6 KB)
loopback01.log.txt (4.0 KB)
ping01.log.txt (1.9 KB)
zerocopy01.log.txt (2.9 KB)