samples: posix: eventfd: Add sample.yaml for CI builds

Also, add prj.conf options to make the sample builds on more
platforms. Finally, update the sample source to print explicit
"Finished" message, to let user know that the processing is done.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
This commit is contained in:
Paul Sokolovsky 2020-06-10 14:23:24 +03:00 committed by Anas Nashif
commit c22f403a97
3 changed files with 16 additions and 1 deletions

View file

@ -3,5 +3,8 @@ CONFIG_NEWLIB_LIBC=y
CONFIG_POSIX_API=y CONFIG_POSIX_API=y
CONFIG_EVENTFD=y CONFIG_EVENTFD=y
# Networking config # eventfd() implementation currently depends on some networking APIs,
# so provide reasonable defaults so it can be built.
CONFIG_NETWORKING=y CONFIG_NETWORKING=y
CONFIG_NET_SLIP_TAP=n
CONFIG_TEST_RANDOM_GENERATOR=y

View file

@ -0,0 +1,10 @@
sample:
description: Extended POSIX (Linux) API eventfd() example
name: eventfd
common:
filter: TOOLCHAIN_HAS_NEWLIB == 1
tags: posix
platform_exclude: m2gl025_miv
tests:
sample.posix.eventfd:
tags: posix

View file

@ -76,5 +76,7 @@ int main(int argc, char *argv[])
writer(); writer();
reader(); reader();
printf("Finished\n");
return 0; return 0;
} }