Hi Kuan-Wei,
On 2026-08-29T19:21:13, Kuan-Wei Chiu <[email protected]> wrote:
> test: 9p: Add test for 9P filesystem
>
> Add automated pytest for the 9P filesystem testing directory listing
> (ls) and file loading (load) over virtio-9p in QEMU ARM64. Also enable
> the relevant configurations in qemu_arm64_defconfig.
>
> Signed-off-by: Kuan-Wei Chiu <[email protected]>
>
> configs/qemu_arm64_defconfig | 3 ++
> test/py/tests/test_9p.py | 82
> ++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 85 insertions(+)
I think I saw a change to the hooks for this, so I assume it passes OK.
> diff --git a/test/py/tests/test_9p.py b/test/py/tests/test_9p.py
> @@ -0,0 +1,82 @@
> + output = ubman.run_command(f"load 9p rootfs {addr:x}
> /non_existent_file_9p.txt")
> + assert "bytes read" not in output
> +
> + output = ubman.run_command("ls 9p invalid_tag /")
> + assert test_file_name not in output
Both negative cases pass for the wrong reason if the command silently
produces no output. Please assert on the expected error string (e.g.
'Failed to load' / 'No such device') rather than the absence of a
success token, so a future regression that swallows errors still fails
the test.
Regards,
Simon