Skip to content

Commit 9e0e04d

Browse files
committed
tests: entropy: api: add overlay for VirtIO Entropy device
Add `boards/qemu_x86_64.overlay` and some config modification for testing `virtio,entropy` device. Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
1 parent b7d70a7 commit 9e0e04d

File tree

4 files changed

+44
-0
lines changed

4 files changed

+44
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2025 TOKITA Hiroshi
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
CONFIG_PCIE=y
5+
CONFIG_HEAP_MEM_POOL_SIZE=1024
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* Copyright (c) 2025 TOKITA Hiroshi
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
chosen {
9+
zephyr,entropy = &virtio_entropy;
10+
};
11+
};
12+
13+
&pcie0 {
14+
virtio_pci: virtio_pci {
15+
compatible = "virtio,pci";
16+
17+
device-id = <0x1005>;
18+
vendor-id = <0x1af4>;
19+
20+
interrupts = <0xb 0x0 0x0>;
21+
interrupt-parent = <&intc>;
22+
23+
virtio_entropy: virtio_entropy {
24+
compatible = "virtio,device4";
25+
};
26+
};
27+
};

tests/drivers/entropy/api/testcase.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,11 @@ tests:
2424
- driver
2525
- entropy
2626
- psa-crypto
27+
drivers.entropy.virtio:
28+
filter: CONFIG_ENTROPY_VIRTIO
29+
extra_args:
30+
- EXTRA_CONF_FILE=./virtio.conf
31+
tags:
32+
- driver
33+
- entropy
34+
- virtio

tests/drivers/entropy/api/virtio.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Copyright (c) 2025 TOKITA Hiroshi
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
CONFIG_VIRTIO=y

0 commit comments

Comments
 (0)