mirror of
https://github.com/apache/nuttx.git
synced 2025-01-12 20:58:44 +08:00
Compare commits
4 commits
263996ccd5
...
fe059915b4
Author | SHA1 | Date | |
---|---|---|---|
|
fe059915b4 | ||
|
39780fdae1 | ||
|
ee2f3df2ff | ||
|
9f7bd849a7 |
8 changed files with 13057 additions and 10972 deletions
|
@ -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);
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
)
|
||||
|
|
|
@ -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
|
@ -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))
|
||||
|
|
|
@ -386,7 +386,44 @@ class start:
|
|||
% (riscv, options, self.log),
|
||||
],
|
||||
)
|
||||
self.process.expect(self.PROMPT)
|
||||
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):
|
||||
|
|
Loading…
Reference in a new issue