[PATCH v3 4/4] qemu: add sandbox driver and tests
Asherah Connor
ashe at kivikakk.ee
Tue Feb 23 13:26:12 CET 2021
On 21/02/23 10:02:p, Asherah Connor wrote:
> We minimally exercise the sandbox driver.
It looks like the test in QEMU is pretty trivial. I'll include it in
the next series version, but here's what it looks like. New tests have
been tested as passing against qemu_arm, qemu_arm64, qemu-x86, and
qemu-x86_64. :)
Best,
Asherah
--8<--
Subject: [PATCH] test: qemu: add simple test for cmd_qfw
Signed-off-by: Asherah Connor <ashe at kivikakk.ee>
---
test/py/tests/test_qfw.py | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 test/py/tests/test_qfw.py
diff --git a/test/py/tests/test_qfw.py b/test/py/tests/test_qfw.py
new file mode 100644
index 0000000000..a2631a0fa6
--- /dev/null
+++ b/test/py/tests/test_qfw.py
@@ -0,0 +1,21 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (c) 2021, Asherah Connor <ashe at kivikakk.ee>
+
+# Test qfw command implementation
+
+import pytest
+
+ at pytest.mark.buildconfigspec('cmd_qfw')
+def test_qfw_cpus(u_boot_console):
+ "Test QEMU firmware config reports the CPU count correctly."
+
+ output = u_boot_console.run_command('qfw cpus')
+ assert '1 cpu(s) online' in output
+
+ at pytest.mark.buildconfigspec('cmd_qfw')
+def test_qfw_list(u_boot_console):
+ "Test QEMU firmware config lists devices."
+
+ output = u_boot_console.run_command('qfw list')
+ assert 'bootorder' in output
+ assert 'etc/table-loader' in output
--
2.20.1
More information about the U-Boot
mailing list