testsuite/smokey: add virtual CAN testsuite
PATCH v6 1/1 testsuite/smokey: add virtual CAN testsuite
From: Dario Binacchi <[email protected]>
Add a minimal test for the virtual CAN driver, checking that sent messages are received correctly.
The timeout on read operations has been wired to 1 s in order not to fail the test in case the verbose option is enabled.
---
Sending as v6 because the changes are too significant:
- moved binding from can_virt_recv to recv_task, before readiness signal
- split cnt in context into cnt_snd and cnt_rcv to avoid data race between sender updating this and receiver checking it against the incoming frame
- dropped "virt" from the name - test shall be expanded in the future to have client and server and optionally use real can interfaces (analogously to RTnet tests)
configure.ac | 1 + testsuite/smokey/Makefile.am | 2 + testsuite/smokey/can/Makefile.am | 8 + testsuite/smokey/can/can.c | 376 +++++++++++++++++++++++++++++++ 4 files changed, 387 insertions(+) create mode 100644 testsuite/smokey/can/Makefile.am create mode 100644 testsuite/smokey/can/can.c
configure.ac +1 -0
@@ -996,6 +996,7 @@ AC_CONFIG_FILES([ \ testsuite/smokey/cpu-affinity/Makefile \ testsuite/smokey/gdb/Makefile \ testsuite/smokey/y2038/Makefile \ + testsuite/smokey/can/Makefile testsuite/clocktest/Makefile \ testsuite/xeno-test/Makefile \ utils/Makefile \
testsuite/smokey/Makefile.am +2 -0
@@ -12,6 +12,7 @@ smokey_SOURCES = main.c COBALT_SUBDIRS = \ arith \ bufp \ + can \ cpu-affinity \ fpu-stress \ gdb \
@@ -49,6 +50,7 @@ MERCURY_SUBDIRS = \ DIST_SUBDIRS = \ arith \ bufp \ + can \ cpu-affinity \ dlopen \ fpu-stress \
testsuite/smokey/can/Makefile.am new file +8 -0
@@ -0,0 +1,8 @@ +noinst_LIBRARIES = libcan.a + +libcan_a_SOURCES = \ + can.c + +libcan_a_CPPFLAGS = \ + @XENO_USER_CFLAGS@ \ + -I$(top_srcdir)/include
testsuite/smokey/can/can.c new file +376 -0
376 lines not on this page · raw message
Signature · 1 line
2.31.1