Compare commits

...

4 commits

Author SHA1 Message Date
ttnie
fe059915b4
Merge 9f7bd849a7 into 39780fdae1 2025-01-12 00:18:08 +08:00
rongyichang
39780fdae1 drivers/vhost-rng: fix compile error in vhost-rng.
vhost/vhost-rng.c:154:9: error: too few arguments to function 'virtio_create_virtqueues'
  154 |   ret = vhost_create_virtqueues(hdev, 0, 1, vqnames, callback);

Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2025-01-12 00:06:12 +08:00
rongyichang
ee2f3df2ff drivers/vhost: fix compile error while get vhost status.
vhost/vhost.c: In function 'vhost_status_driver_ok':
vhost/vhost.c:86:20: error: too few arguments to function 'virtio_get_status'
   86 |   uint8_t status = vhost_get_status(hdev);

Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2025-01-12 00:06:12 +08:00
v-wangshihang
9f7bd849a7 tests:update testcases
Signed-off-by: v-wangshihang <v-wangshihang@xiaomi.com>
2024-12-18 19:24:37 +08:00
8 changed files with 13057 additions and 10972 deletions

View file

@ -30,6 +30,7 @@
#include <stdlib.h>
#include <nuttx/kmalloc.h>
#include <nuttx/spinlock.h>
#include <nuttx/vhost/vhost.h>
#include <nuttx/wqueue.h>
@ -151,7 +152,7 @@ static int vhost_rng_probe(FAR struct vhost_device *hdev)
vqnames[0] = "virtio_rng";
callback[0] = vhost_rng_handler;
ret = vhost_create_virtqueues(hdev, 0, 1, vqnames, callback);
ret = vhost_create_virtqueues(hdev, 0, 1, vqnames, callback, NULL);
if (ret < 0)
{
vhosterr("virtio_device_create_virtqueue failed, ret=%d\n", ret);

View file

@ -83,8 +83,15 @@ static struct vhost_bus_s g_vhost_bus =
static bool vhost_status_driver_ok(FAR struct vhost_device *hdev)
{
uint8_t status = vhost_get_status(hdev);
bool driver_ok = false;
uint8_t status;
int ret;
ret = vhost_get_status(hdev, &status);
if (ret)
{
return driver_ok;
}
/* Busy wait until the remote is ready */

View file

@ -46,6 +46,7 @@ def test_popen(p):
assert ret == 0
@pytest.mark.skip
def test_usrsocktest(p):
ret = p.sendCommand("usrsocktest", "FAILED:0", timeout=60)
assert ret == 0

View file

@ -26,7 +26,7 @@ import os
import pytest
pytestmark = [pytest.mark.common, pytest.mark.rv_virt]
pytestmark = [pytest.mark.common, pytest.mark.rv_virt, pytest.mark.goldfish_armeabi_v7a_ap]
cmocka_list_start = "cmocka_list_start"
cmocka_list_end = "cmocka_list_end"
@ -49,7 +49,7 @@ def test_cmocka(p):
p.sendCommand(f"echo {cmocka_test_start}")
ret = p.sendCommand(
"cmocka --skip test_case_posix_timer|test_case_oneshot|write_default|read_default|burst_test|gpiotest01|"
"test_playback.*|test_interaction.*|test_stress.*|test_capture.*",
"test_playback.*|test_interaction.*|test_stress.*|test_capture.*|test_case_touchpanel",
"Cmocka Test Completed",
timeout=1200,
)

View file

@ -26,7 +26,7 @@ import pytest
class TestLibuv:
pytestmark = [pytest.mark.sim]
pytestmark = [pytest.mark.sim, pytest.mark.goldfish_armeabi_v7a_ap]
def test_test_macros(self, p):
ret = p.sendCommand(
@ -254,13 +254,13 @@ class TestLibuv:
ret = p.sendCommand("uv_run_tests active", ["not ok 1 -", "ok 1 -"], timeout=10)
assert ret == 1
@pytest.mark.skip
def test_embed(self, p):
if p.board in ["sim"]:
pytest.skip("unsupported at %s" % p.board)
ret = p.sendCommand("uv_run_tests embed", ["not ok 1 -", "ok 1 -"], timeout=10)
assert ret == 1
@pytest.mark.skip(reason="VELAPLATFO-6346")
def test_async(self, p):
if p.ci:
pytest.skip("unsupported at %s" % p.board)
@ -299,13 +299,13 @@ class TestLibuv:
)
assert ret == 1
def test_poll_oob(self, p):
if p.board in ["sim"]:
pytest.skip("unsupported at %s" % p.board)
ret = p.sendCommand(
"uv_run_tests poll_oob", ["not ok 1 -", "ok 1 -"], timeout=10
)
assert ret == 1
# def test_poll_oob(self, p):
# if p.board in ["sim"]:
# pytest.skip("unsupported at %s" % p.board)
# ret = p.sendCommand(
# "uv_run_tests poll_oob", ["not ok 1 -", "ok 1 -"], timeout=10
# )
# assert ret == 1
def test_threadpool_queue_work_simple(self, p):
ret = p.sendCommand(

File diff suppressed because it is too large Load diff

View file

@ -52,6 +52,7 @@ def test_cxxtest(p):
assert ret == 0
@pytest.mark.skip
def test_scanftest(p):
if p.board in do_not_support:
pytest.skip("unsupported at {}".format(p.board))
@ -66,6 +67,7 @@ def test_getprime(p):
assert ret == 0
@pytest.mark.skip
def test_stdio(p):
if p.board in do_not_support:
pytest.skip("unsupported at {}".format(p.board))

View file

@ -386,7 +386,44 @@ class start:
% (riscv, options, self.log),
],
)
elif flag1 == "goldfish":
if board == "qemu-miwear":
self.create_process_after_get_lock(board)
elif board in ["qemu-smartspeaker-knsh", "qemu-smartspeaker"]:
self.log_fd = open(self.log, "wb")
self.process = pexpect.spawn(
"bash",
[
"-c",
"./emulator.sh smartspeaker -no-window",
],
logfile=self.log_fd,
maxread=200000,
)
else:
self.log_fd = open(self.log, "wb")
self.process = pexpect.spawn(
"bash",
[
"-c",
"./emulator.sh vela -no-window",
],
logfile=self.log_fd,
maxread=200000,
)
self.process.delayafterread = None
self.clean_buffer()
self.process.sendline('\n')
self.process.sendline('ps\n\n')
self.process.sendline('\n')
try:
self.process.expect(self.PROMPT)
finally:
print("********************* DEBUG START ********************")
print("cmd: ps")
print("before: {}".format(self.process.before.decode(errors="ignore")))
print("buffer: {}".format(self.process.buffer.decode(errors="ignore")))
print("********************** DEBUG END **********************")
def runCmd(cmd):