Repository navigation
Conversation
rpmsgchar exercises the rpmsg char driver: "-t echo" creates an endpoint through the rpmsg device (/dev/rpmsg/<cpu>) and checks 1000 round trips of 12 bytes against an echo service on the peer. The same source builds for Linux, where the endpoint device is /dev/rpmsgX. Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
…troy test Report a failure and return instead of asserting, so the program can be used as a test, close the endpoint device before the next round, and add a "destroy" test that creates 100 endpoints, does one round trip on each and releases them. Signed-off-by: chenzihan1 <chenzihan1@xiaomi.com> Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
examples/rpmsgchar, a test program for the rpmsg char driver addedin apache/nuttx#21981:
-t echo: creates an endpoint through the rpmsg device(
/dev/rpmsg/<cpu>), opens/dev/rpmsg-<name>and checks 1000 roundtrips of 12 bytes against an echo service on the peer.
-t destroy: creates 100 endpoints, does one round trip on each, thenreleases them.
The same source also builds for Linux (
<linux/rpmsg.h>), so it can testa NuttX peer from a Linux host.
Depends on apache/nuttx#21981.
Impact
New example,
CONFIG_EXAMPLES_RPMSGCHAR(depends onRPMSG_CHAR),default n. No other change.
Testing
Host: Ubuntu 22.04.5 LTS x86_64, QEMU version 10.2.1, sim: cc (Ubuntu 13.1.0-8ubuntu1~22.04) 13.1.0, qemu-armv8a: aarch64-none-elf-gcc (Arm GNU Toolchain 12.2.Rel1 (Build arm-12.24)) 12.2.1 20221205
Built with CMake and make on sim:rpserver with
CONFIG_RPMSG_CHARandCONFIG_EXAMPLES_RPMSGCHAR, no warning.Run on qemu-armv8a:rpserver + rpproxy (rptun ivshmem) against a
test-only echo server on the proxy; the full setup and logs are in
apache/nuttx#21981:
rpmsgchar -t echo -c /dev/rpmsg/proxy -n t0Finish the echo testrpmsgchar -t destroy -c /dev/rpmsg/proxy -n dEnd the destroy test