Revive alchemy, pSOS and VxWorks tests
v2 cover Revive alchemy, pSOS and VxWorks tests
This patch series is a first attempt to integrate the currently abandoned alchemy, pSOS and VxWorks tests into Xenomai's test suite. Since each test assumes running as own process a test driver is needed which executes each tests separately.
The driver makes use of the smokey framework.
Test results on a x86 VM (5.15.19, Xenomai master as of today):
- Alchemy:
test2 fails:
[8] at task-2.c:71 [1] at task-2.c:24 [9] at task-2.c:79 [4] at task-2.c:43 [10] at task-2.c:87 [5] at task-2.c:48 [11] at task-2.c:92 [2] at task-2.c:29 [6] at task-2.c:52 0"022.972| BUG in __traceobj_check_abort(): [FGND] wrong return status: task-2.c:55 => EINVAL (want OK)
task5 fails:
[9] at task-5.c:79 [1] at task-5.c:23 [10] at task-5.c:87 [3] at task-5.c:40 [11] at task-5.c:95 [4] at task-5.c:45 [5] at task-5.c:50 [6] at task-5.c:55 [2] at task-5.c:28 [7] at task-5.c:60 0"003.160| BUG in __traceobj_check_abort(): [FGND] wrong return status: task-5.c:63 => EINVAL (want OK)
If Xenomai was configured with --enable-lores-clock, tests mq1, mutex1, pip1 and sem1 fail due to:
undefined symbol: __clockobj_ticks_to_timeout
- pSOS (Xenomai has to be configured with --enable-lores-clock):
rn1 fails:
0"001.017| BUG in __traceobj_assert_failed(): [rn1] trace assertion failed: rn-1.c:46 => "ret == 0" task2 fails: [8] at task-2.c:73 [1] at task-2.c:23 [9] at task-2.c:81 [4] at task-2.c:44 [10] at task-2.c:89 [5] at task-2.c:49 [11] at task-2.c:94 [2] at task-2.c:28 [3] at task-2.c:33 [6] at task-2.c:53 0"004.756| BUG in __traceobj_assert_failed(): [FGND] trace assertion failed: task-2.c:56 => "ret == 0"
task6 fails:
[9] at task-6.c:79 [1] at task-6.c:22 [10] at task-6.c:87 [3] at task-6.c:39 [11] at task-6.c:95 [4] at task-6.c:44 [5] at task-6.c:49 [6] at task-6.c:54 [2] at task-6.c:27 [7] at task-6.c:59 0"002.870| BUG in __traceobj_assert_failed(): [FGND] trace assertion failed: task-6.c:62 => "ret == 0 && oldprio == myprio"
task8 runs forever (100% CPU)
- VxWorks:
task2 fails:
[8] at task-2.c:85 [1] at task-2.c:32 [9] at task-2.c:91 [4] at task-2.c:57 [10] at task-2.c:97 [5] at task-2.c:62 [11] at task-2.c:103 [2] at task-2.c:37 [12] at task-2.c:109 [6] at task-2.c:66 0"005.790| BUG in __traceobj_assert_failed(): [foregroundTask] trace assertion failed: task-2.c:69 => "ret == 0"
Changes since v1:
- Revive pSOS and VxWorks tests too
Richard Weinberger (9):
testsuite: Move alchemy tests into testsuite/
testsuite: Hook up alchemytests
testsuite: Add a simple test driver for alchemytests Remove old alchemy tests Makefile
alchemytests: Fix gcc warning in buffer-1
alchemytests: Fix gcc warning in task-9
testsuite: Move pSOS tests into testsuite/
testsuite: Add a simple test driver for psostests
testsuite: Integrate vwworks tests into testsuite/
configure.ac | 3 +
lib/alchemy/testsuite/Makefile | 70 --------
lib/psos/testsuite/Makefile | 49 ------
lib/vxworks/testsuite/Makefile | 43 -----
testsuite/Makefile.am | 10 +-
testsuite/alchemytests/Makefile.am | 159 +++++++++++++++++
.../alchemytests}/alarm-1.c | 0
testsuite/alchemytests/alchemytest_driver.c | 84 +++++++++
.../alchemytests}/buffer-1.c | 2 +-
.../alchemytests}/event-1.c | 0
.../alchemytests}/heap-1.c | 0
.../alchemytests}/heap-2.c | 0
.../alchemytests}/mq-1.c | 0
.../alchemytests}/mq-2.c | 0
.../alchemytests}/mq-3.c | 0
.../alchemytests}/mutex-1.c | 0
.../alchemytests}/pipe-1.c | 0
.../alchemytests}/sem-1.c | 0
.../alchemytests}/sem-2.c | 0
.../alchemytests}/task-1.c | 0
.../alchemytests}/task-10.c | 0
.../alchemytests}/task-2.c | 0
.../alchemytests}/task-3.c | 0
.../alchemytests}/task-4.c | 0
.../alchemytests}/task-5.c | 0
.../alchemytests}/task-6.c | 0
.../alchemytests}/task-7.c | 0
.../alchemytests}/task-8.c | 0
.../alchemytests}/task-9.c | 2 +-
testsuite/psostests/Makefile.am | 166 ++++++++++++++++++
.../testsuite => testsuite/psostests}/mq-1.c | 0
.../testsuite => testsuite/psostests}/mq-2.c | 0
.../testsuite => testsuite/psostests}/mq-3.c | 0
testsuite/psostests/psostest_driver.c | 85 +++++++++
.../testsuite => testsuite/psostests}/pt-1.c | 0
.../testsuite => testsuite/psostests}/rn-1.c | 0
.../testsuite => testsuite/psostests}/sem-1.c | 0
.../testsuite => testsuite/psostests}/sem-2.c | 0
.../psostests}/task-1.c | 0
.../psostests}/task-2.c | 0
.../psostests}/task-3.c | 0
.../psostests}/task-4.c | 0
.../psostests}/task-5.c | 0
.../psostests}/task-6.c | 0
.../psostests}/task-7.c | 0
.../psostests}/task-8.c | 0
.../psostests}/task-9.c | 0
.../testsuite => testsuite/psostests}/tm-1.c | 0
.../testsuite => testsuite/psostests}/tm-2.c | 0
.../testsuite => testsuite/psostests}/tm-3.c | 0
.../testsuite => testsuite/psostests}/tm-4.c | 0
.../testsuite => testsuite/psostests}/tm-5.c | 0
.../testsuite => testsuite/psostests}/tm-6.c | 0
.../testsuite => testsuite/psostests}/tm-7.c | 0
testsuite/vxworkstests/Makefile.am | 100 +++++++++++
.../vxworkstests}/lst-1.c | 0
.../vxworkstests}/msgQ-1.c | 0
.../vxworkstests}/msgQ-2.c | 0
.../vxworkstests}/msgQ-3.c | 0
.../vxworkstests}/rng-1.c | 0
.../vxworkstests}/sem-1.c | 0
.../vxworkstests}/sem-2.c | 0
.../vxworkstests}/sem-3.c | 0
.../vxworkstests}/sem-4.c | 0
.../vxworkstests}/task-1.c | 0
.../vxworkstests}/task-2.c | 0
testsuite/vxworkstests/vxworkstest_driver.c | 74 ++++++++
.../vxworkstests}/wd-1.c | 0
68 files changed, 681 insertions(+), 166 deletions(-)
delete mode 100644 lib/alchemy/testsuite/Makefile
delete mode 100644 lib/psos/testsuite/Makefile
delete mode 100644 lib/vxworks/testsuite/Makefile
create mode 100644 testsuite/alchemytests/Makefile.am
rename {lib/alchemy/testsuite => testsuite/alchemytests}/alarm-1.c (100%)
create mode 100644 testsuite/alchemytests/alchemytest_driver.c
rename {lib/alchemy/testsuite => testsuite/alchemytests}/buffer-1.c (99%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/event-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/heap-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/heap-2.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/mq-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/mq-2.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/mq-3.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/mutex-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/pipe-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/sem-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/sem-2.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-10.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-2.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-3.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-4.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-5.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-6.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-7.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-8.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-9.c (97%)
create mode 100644 testsuite/psostests/Makefile.am
rename {lib/psos/testsuite => testsuite/psostests}/mq-1.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/mq-2.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/mq-3.c (100%)
create mode 100644 testsuite/psostests/psostest_driver.c
rename {lib/psos/testsuite => testsuite/psostests}/pt-1.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/rn-1.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/sem-1.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/sem-2.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/task-1.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/task-2.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/task-3.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/task-4.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/task-5.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/task-6.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/task-7.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/task-8.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/task-9.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/tm-1.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/tm-2.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/tm-3.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/tm-4.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/tm-5.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/tm-6.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/tm-7.c (100%)
create mode 100644 testsuite/vxworkstests/Makefile.am
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/lst-1.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/msgQ-1.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/msgQ-2.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/msgQ-3.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/rng-1.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/sem-1.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/sem-2.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/sem-3.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/sem-4.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/task-1.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/task-2.c (100%)
create mode 100644 testsuite/vxworkstests/vxworkstest_driver.c
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/wd-1.c (100%)Signature · 1 line
2.34.1
PATCH v2 1/9 testsuite: Move alchemy tests into testsuite/
This is the very first step to have the alchemy tests embedded into our testsuite.
---
{lib/alchemy/testsuite => testsuite/alchemytests}/alarm-1.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/buffer-1.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/event-1.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/heap-1.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/heap-2.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/mq-1.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/mq-2.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/mq-3.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/mutex-1.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/pipe-1.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/sem-1.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/sem-2.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/task-1.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/task-10.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/task-2.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/task-3.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/task-4.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/task-5.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/task-6.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/task-7.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/task-8.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/task-9.c | 0
22 files changed, 0 insertions(+), 0 deletions(-)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/alarm-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/buffer-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/event-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/heap-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/heap-2.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/mq-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/mq-2.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/mq-3.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/mutex-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/pipe-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/sem-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/sem-2.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-10.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-2.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-3.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-4.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-5.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-6.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-7.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-8.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-9.c (100%)testsuite/alchemytests/alarm-1.c renamed from lib/alchemy/testsuite/alarm-1.c +0 -0
testsuite/alchemytests/buffer-1.c renamed from lib/alchemy/testsuite/buffer-1.c +0 -0
testsuite/alchemytests/event-1.c renamed from lib/alchemy/testsuite/event-1.c +0 -0
testsuite/alchemytests/heap-1.c renamed from lib/alchemy/testsuite/heap-1.c +0 -0
testsuite/alchemytests/heap-2.c renamed from lib/alchemy/testsuite/heap-2.c +0 -0
testsuite/alchemytests/mq-1.c renamed from lib/alchemy/testsuite/mq-1.c +0 -0
testsuite/alchemytests/mq-2.c renamed from lib/alchemy/testsuite/mq-2.c +0 -0
testsuite/alchemytests/mq-3.c renamed from lib/alchemy/testsuite/mq-3.c +0 -0
testsuite/alchemytests/mutex-1.c renamed from lib/alchemy/testsuite/mutex-1.c +0 -0
testsuite/alchemytests/pipe-1.c renamed from lib/alchemy/testsuite/pipe-1.c +0 -0
testsuite/alchemytests/sem-1.c renamed from lib/alchemy/testsuite/sem-1.c +0 -0
testsuite/alchemytests/sem-2.c renamed from lib/alchemy/testsuite/sem-2.c +0 -0
testsuite/alchemytests/task-1.c renamed from lib/alchemy/testsuite/task-1.c +0 -0
testsuite/alchemytests/task-10.c renamed from lib/alchemy/testsuite/task-10.c +0 -0
testsuite/alchemytests/task-2.c renamed from lib/alchemy/testsuite/task-2.c +0 -0
testsuite/alchemytests/task-3.c renamed from lib/alchemy/testsuite/task-3.c +0 -0
testsuite/alchemytests/task-4.c renamed from lib/alchemy/testsuite/task-4.c +0 -0
testsuite/alchemytests/task-5.c renamed from lib/alchemy/testsuite/task-5.c +0 -0
testsuite/alchemytests/task-6.c renamed from lib/alchemy/testsuite/task-6.c +0 -0
testsuite/alchemytests/task-7.c renamed from lib/alchemy/testsuite/task-7.c +0 -0
testsuite/alchemytests/task-8.c renamed from lib/alchemy/testsuite/task-8.c +0 -0
testsuite/alchemytests/task-9.c renamed from lib/alchemy/testsuite/task-9.c +0 -0
Signature · 1 line
2.34.1
PATCH v2 2/9 testsuite: Hook up alchemytests
In reply to Richard WeinbergerBuild them using Xenomai's build system.
--- configure.ac | 1 + testsuite/Makefile.am | 6 +- testsuite/alchemytests/Makefile.am | 148 +++++++++++++++++++++++++++++ 3 files changed, 153 insertions(+), 2 deletions(-) create mode 100644 testsuite/alchemytests/Makefile.am
configure.ac +1 -0
@@ -1046,6 +1046,7 @@ AC_CONFIG_FILES([ \ testsuite/smokey/can/Makefile testsuite/clocktest/Makefile \ testsuite/xeno-test/Makefile \ + testsuite/alchemytests/Makefile \ utils/Makefile \ utils/hdb/Makefile \ utils/can/Makefile \
testsuite/Makefile.am +4 -2
@@ -7,7 +7,8 @@ SUBDIRS += \ gpiotest \ spitest \ switchtest \ - xeno-test + xeno-test \ + alchemytests endif DIST_SUBDIRS = \
@@ -18,4 +19,5 @@ DIST_SUBDIRS = \ smokey \ spitest \ switchtest \ - xeno-test + xeno-test \ + alchemytests
testsuite/alchemytests/Makefile.am new file +148 -0
148 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH v2 3/9 testsuite: Add a simple test driver for alchemytests
In reply to Richard WeinbergerIn their current shape, every alchemy test has to be a single program and does not use the smokey test framework.
alchemytest_driver uses smokey and runs each test as new process.
--- testsuite/alchemytests/Makefile.am | 11 +++ testsuite/alchemytests/alchemytest_driver.c | 84 +++++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 testsuite/alchemytests/alchemytest_driver.c
testsuite/alchemytests/Makefile.am +11 -0
@@ -146,3 +146,14 @@ task10_SOURCES = task-10.c task10_CPPFLAGS = $(alchemycppflags) task10_LDADD = $(alchemyldadd) -lpthread -lrt -lm task10_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ + +alchemytest_driver_SOURCES = alchemytest_driver.c +alchemytest_driver_CPPFLAGS = \ + $(XENO_USER_CFLAGS) \ + -I$(top_srcdir)/include +alchemytest_driver_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytest_driver_LDADD = \ + ../../lib/smokey/libsmokey@[email protected] \ + @XENO_CORE_LDADD@ \ + @XENO_USER_LDADD@ \ + -lpthread -lrt
testsuite/alchemytests/alchemytest_driver.c new file +84 -0
84 lines not on this page · raw message
Signature · 1 line
2.34.1
Re: [PATCH 3/9] testsuite: Add a simple test driver for alchemytests
Quoted 4 lines · Richard Weinberger via Xenomai
In their current shape, every alchemy test has to be a single program and does not use the smokey test framework.
alchemytest_driveruses smokey and runs each test as new process.
Maybe rather call this "wrapper" or "loader" - driver reminded my first of a kernel driver.
Jan
Quoted 117 lines
Signed-off-by Richard Weinberger <[email protected]>--- testsuite/alchemytests/Makefile.am | 11 +++ testsuite/alchemytests/alchemytest_driver.c | 84 +++++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 testsuite/alchemytests/alchemytest_driver.ctestsuite/alchemytests/Makefile.am +11
-0@@ -146,3 +146,14 @@ task10_SOURCES = task-10.c task10_CPPFLAGS = $(alchemycppflags) task10_LDADD = $(alchemyldadd) -lpthread -lrt -lm task10_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ + +alchemytest_driver_SOURCES = alchemytest_driver.c +alchemytest_driver_CPPFLAGS = \ + $(XENO_USER_CFLAGS) \ + -I$(top_srcdir)/include +alchemytest_driver_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytest_driver_LDADD = \ + ../../lib/smokey/libsmokey@[email protected] \ + @XENO_CORE_LDADD@ \ + @XENO_USER_LDADD@ \ + -lpthread -lrttestsuite/alchemytests/alchemytest_driver.c new file +84
-0@@ -0,0 +1,84 @@ +#include <error.h> +#include <libgen.h> +#include <smokey/smokey.h> +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> + +static char *mydir; + +#define TEST (name) \ + smokey_test_plugin(name, SMOKEY_NOARGS, "Run external test"); \ + static int run_##name(struct smokey_test *t, int argc, char *const argv[]) \ + { \ + return __run_extprog(t, argc, argv); \ + } + +static int __run_extprog (struct smokey_test *t,int argc,char *const argv[]) +{ +int ret; +char *tst_path; + + ret =asprintf (&tst_path,"%s/%s --cpu-affinity=0" , mydir, t->name); +if (ret ==-1 ) +return -ENOMEM ; + + ret =system (tst_path); +free (tst_path); + +return ret; +} + +TEST (alarm1) +TEST (buffer1 ) +TEST (event1) +TEST (heap1) +TEST (heap2) +TEST (mq1) +TEST (mq2) +TEST (mq3) +TEST (mutex1) +TEST (pipe1) +TEST (sem1) +TEST (sem2) +TEST (task1) +TEST (task2) +TEST (task3) +TEST (task4) +TEST (task5) +TEST (task6) +TEST (task7) +TEST (task8) +TEST (task9) +TEST (task10) + +int main(int argc, char *const argv[]) +{ +struct smokey_test *t; +int ret, fails =0 ; + +if (argc >0 ) + mydir =dirname (argv[0 ]); +else + mydir ="." ; + +if (pvlist_empty (&smokey_test_list)) +return 0 ; + +for_each_smokey_test (t) { + ret = t->run (t, argc, argv); +if (ret) { + fails++; +if (smokey_keep_going) +continue ; +if (smokey_verbose_mode) +error (1 , -ret,"test %s failed" , t->name); +return 1 ; + } +smokey_note ("%s OK" , t->name); + } + +return fails !=0 ; +}
Signature · 2 lines
Siemens AG, Technology Competence Center Embedded Linux
Re: [PATCH 3/9] testsuite: Add a simple test driver for alchemytests
----- Ursprüngliche Mail -----
Quoted 5 lines
Von: "Jan Kiszka" <[email protected]>
Quoted 1 line
alchemytest_driveruses smokey and runs each test as new process.Maybe rather call this "wrapper" or "loader" - driver reminded my first of a kernel driver.
Sure. Or "runner"?
Thanks,
//richard
PATCH v2 4/9 Remove old alchemy tests Makefile
In reply to Richard Weinberger--- lib/alchemy/testsuite/Makefile | 70 ---------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 lib/alchemy/testsuite/Makefile
lib/alchemy/testsuite/Makefile deleted +0 -70
@@ -1,70 +0,0 @@ -ifeq ($(DESTDIR),) -XENO_CONFIG=xeno-config -else -XENO_CONFIG=$(DESTDIR)/bin/xeno-config -endif - -prefix := $(shell DESTDIR=$(DESTDIR) $(XENO_CONFIG) --prefix) -solibs := $(shell DESTDIR=$(DESTDIR) $(XENO_CONFIG) --libdir) -core := $(shell DESTDIR=$(DESTDIR) $(XENO_CONFIG) --core) - -ifeq ($(prefix),) -$(error Please add <xenomai-install-path>/bin to your PATH variable or specify DESTDIR) -endif - -cobalt-only := pipe-1 -mercury-only := -core-specific = $($(core)-only) - -TESTS := \ - task-1 \ - task-2 \ - task-3 \ - task-4 \ - task-5 \ - task-6 \ - task-7 \ - task-8 \ - task-9 \ - task-10 \ - mq-1 \ - mq-2 \ - mq-3 \ - alarm-1 \ - sem-1 \ - sem-2 \ - mutex-1 \ - event-1 \ - heap-1 \ - heap-2 \ - buffer-1 \ - $(core-specific) - -CFLAGS := $(shell DESTDIR=$(DESTDIR) $(XENO_CONFIG) --skin=alchemy --cflags) -g -LDFLAGS := $(shell DESTDIR=$(DESTDIR) $(XENO_CONFIG) --skin=alchemy --ldflags) -CC = $(shell DESTDIR=$(DESTDIR) $(XENO_CONFIG) --cc) - -all: $(TESTS) - -%: %.c - $(CC) -o $@ $< $(CFLAGS) $(LDFLAGS) - -install: all - install -d $(prefix)/testsuite/alchemy - install -t $(prefix)/testsuite/alchemy $(TESTS) - -clean: - $(RM) $(TESTS) *~ - -# Run the test suite. We pin all tests to CPU #0, so that SMP does not -# alter the execution sequence we expect from them. -test: all - @for t in $(TESTS); do \ - echo -n $$t...; \ - sudo LD_LIBRARY_PATH=$(solibs) $(VALGRIND) ./$$t --cpu-affinity=0 --silent && echo ok || echo BAD; \ - done - -test/%: % - sudo LD_LIBRARY_PATH=$(solibs) $(VALGRIND) ./$(@F) --cpu-affinity=0 --silent && echo ok || echo BAD - -.PHONY: clean test
Signature · 1 line
2.34.1
PATCH v2 5/9 alchemytests: Fix gcc warning in buffer-1
In reply to Richard WeinbergerMake n an unsigned integer, such that gcc realizes that "%.2d" cannot become negative and will fit into our 3 bytes buffer.
Fixes:
buffer-1.c:64:15: error: ‘%.2d’ directive writing between 2 and 10 bytes into a region of size 3 [-Werror=format-overflow=]
sprintf(s, "%.2d", 11 * n);
^~~~--- testsuite/alchemytests/buffer-1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
testsuite/alchemytests/buffer-1.c +1 -1
@@ -49,7 +49,7 @@ static void background_task(void *arg) {char c ='A' , s[3 ];ssize_t ret; -int n =0 ; +unsigned int n =0 ;traceobj_enter (&trobj);
Signature · 1 line
2.34.1
PATCH v2 6/9 alchemytests: Fix gcc warning in task-9
In reply to Richard WeinbergerMake it static, no prototype needed anymore.
Fixes:
task-9.c:13:6: error: no previous prototype for ‘sighandler’ [-Werror=missing-prototypes]
void sighandler(int sig)
--- testsuite/alchemytests/task-9.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
testsuite/alchemytests/task-9.c +1 -1
@@ -10,7 +10,7 @@ static RT_TASK t_test;#define ONE_SECOND 1000000000ULL -void sighandler (int sig) +static void sighandler (int sig) {/* nop */ }
Signature · 1 line
2.34.1
PATCH v2 7/9 testsuite: Move pSOS tests into testsuite/
In reply to Richard WeinbergerJust like for alchemy tests, integrate them into our test suite.
---
configure.ac | 1 +
lib/psos/testsuite/Makefile | 49 ------
testsuite/Makefile.am | 6 +-
testsuite/psostests/Makefile.am | 153 ++++++++++++++++++
.../testsuite => testsuite/psostests}/mq-1.c | 0
.../testsuite => testsuite/psostests}/mq-2.c | 0
.../testsuite => testsuite/psostests}/mq-3.c | 0
.../testsuite => testsuite/psostests}/pt-1.c | 0
.../testsuite => testsuite/psostests}/rn-1.c | 0
.../testsuite => testsuite/psostests}/sem-1.c | 0
.../testsuite => testsuite/psostests}/sem-2.c | 0
.../psostests}/task-1.c | 0
.../psostests}/task-2.c | 0
.../psostests}/task-3.c | 0
.../psostests}/task-4.c | 0
.../psostests}/task-5.c | 0
.../psostests}/task-6.c | 0
.../psostests}/task-7.c | 0
.../psostests}/task-8.c | 0
.../psostests}/task-9.c | 0
.../testsuite => testsuite/psostests}/tm-1.c | 0
.../testsuite => testsuite/psostests}/tm-2.c | 0
.../testsuite => testsuite/psostests}/tm-3.c | 0
.../testsuite => testsuite/psostests}/tm-4.c | 0
.../testsuite => testsuite/psostests}/tm-5.c | 0
.../testsuite => testsuite/psostests}/tm-6.c | 0
.../testsuite => testsuite/psostests}/tm-7.c | 0
27 files changed, 158 insertions(+), 51 deletions(-)
delete mode 100644 lib/psos/testsuite/Makefile
create mode 100644 testsuite/psostests/Makefile.am
rename {lib/psos/testsuite => testsuite/psostests}/mq-1.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/mq-2.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/mq-3.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/pt-1.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/rn-1.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/sem-1.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/sem-2.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/task-1.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/task-2.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/task-3.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/task-4.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/task-5.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/task-6.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/task-7.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/task-8.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/task-9.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/tm-1.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/tm-2.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/tm-3.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/tm-4.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/tm-5.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/tm-6.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/tm-7.c (100%)configure.ac +1 -0
@@ -1047,6 +1047,7 @@ AC_CONFIG_FILES([ \ testsuite/clocktest/Makefile \ testsuite/xeno-test/Makefile \ testsuite/alchemytests/Makefile \ + testsuite/psostests/Makefile \ utils/Makefile \ utils/hdb/Makefile \ utils/can/Makefile \
lib/psos/testsuite/Makefile deleted +0 -49
49 lines not on this page · raw message
testsuite/Makefile.am +4 -2
@@ -8,7 +8,8 @@ SUBDIRS += \ spitest \ switchtest \ xeno-test \ - alchemytests + alchemytests \ + psostests endif DIST_SUBDIRS = \
@@ -20,4 +21,5 @@ DIST_SUBDIRS = \ spitest \ switchtest \ xeno-test \ - alchemytests + alchemytests \ + psostests
testsuite/psostests/Makefile.am new file +153 -0
153 lines not on this page · raw message
testsuite/psostests/mq-1.c renamed from lib/psos/testsuite/mq-1.c +0 -0
testsuite/psostests/mq-2.c renamed from lib/psos/testsuite/mq-2.c +0 -0
testsuite/psostests/mq-3.c renamed from lib/psos/testsuite/mq-3.c +0 -0
testsuite/psostests/pt-1.c renamed from lib/psos/testsuite/pt-1.c +0 -0
testsuite/psostests/rn-1.c renamed from lib/psos/testsuite/rn-1.c +0 -0
testsuite/psostests/sem-1.c renamed from lib/psos/testsuite/sem-1.c +0 -0
testsuite/psostests/sem-2.c renamed from lib/psos/testsuite/sem-2.c +0 -0
testsuite/psostests/task-1.c renamed from lib/psos/testsuite/task-1.c +0 -0
testsuite/psostests/task-2.c renamed from lib/psos/testsuite/task-2.c +0 -0
testsuite/psostests/task-3.c renamed from lib/psos/testsuite/task-3.c +0 -0
testsuite/psostests/task-4.c renamed from lib/psos/testsuite/task-4.c +0 -0
testsuite/psostests/task-5.c renamed from lib/psos/testsuite/task-5.c +0 -0
testsuite/psostests/task-6.c renamed from lib/psos/testsuite/task-6.c +0 -0
testsuite/psostests/task-7.c renamed from lib/psos/testsuite/task-7.c +0 -0
testsuite/psostests/task-8.c renamed from lib/psos/testsuite/task-8.c +0 -0
testsuite/psostests/task-9.c renamed from lib/psos/testsuite/task-9.c +0 -0
testsuite/psostests/tm-1.c renamed from lib/psos/testsuite/tm-1.c +0 -0
testsuite/psostests/tm-2.c renamed from lib/psos/testsuite/tm-2.c +0 -0
testsuite/psostests/tm-3.c renamed from lib/psos/testsuite/tm-3.c +0 -0
testsuite/psostests/tm-4.c renamed from lib/psos/testsuite/tm-4.c +0 -0
testsuite/psostests/tm-5.c renamed from lib/psos/testsuite/tm-5.c +0 -0
testsuite/psostests/tm-6.c renamed from lib/psos/testsuite/tm-6.c +0 -0
testsuite/psostests/tm-7.c renamed from lib/psos/testsuite/tm-7.c +0 -0
Signature · 1 line
2.34.1
PATCH v2 8/9 testsuite: Add a simple test driver for psostests
In reply to Richard WeinbergerJust like for alchemytests.
--- testsuite/psostests/Makefile.am | 15 ++++- testsuite/psostests/psostest_driver.c | 85 +++++++++++++++++++++++++++ 2 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 testsuite/psostests/psostest_driver.c
testsuite/psostests/Makefile.am +14 -1
@@ -2,7 +2,8 @@ testdir = @XENO_TEST_DIR@ CCLD = $(top_srcdir)/scripts/wrap-link.sh $(CC) -test_PROGRAMS = mq1 \ +test_PROGRAMS = psostest_driver \ + mq1 \ mq2 \ mq3 \ pt1 \
@@ -151,3 +152,15 @@ task9_SOURCES = task-9.c task9_CPPFLAGS = $(psoscppflags) task9_LDADD = $(psosldadd) -lpthread -lrt -lm task9_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ + +psostest_driver_SOURCES = psostest_driver.c +psostest_driver_CPPFLAGS = \ + $(XENO_USER_CFLAGS) \ + -I$(top_srcdir)/include +psostest_driver_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +psostest_driver_LDADD = \ + ../../lib/psos/libpsos@[email protected] \ + ../../lib/smokey/libsmokey@[email protected] \ + @XENO_CORE_LDADD@ \ + @XENO_USER_LDADD@ \ + -lpthread -lrt
testsuite/psostests/psostest_driver.c new file +85 -0
85 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH v2 9/9 testsuite: Integrate vwworks tests into testsuite/
In reply to Richard WeinbergerSame as for alchemy and pSOS.
---
configure.ac | 1 +
lib/vxworks/testsuite/Makefile | 43 --------
testsuite/Makefile.am | 6 +-
testsuite/vxworkstests/Makefile.am | 100 ++++++++++++++++++
.../vxworkstests}/lst-1.c | 0
.../vxworkstests}/msgQ-1.c | 0
.../vxworkstests}/msgQ-2.c | 0
.../vxworkstests}/msgQ-3.c | 0
.../vxworkstests}/rng-1.c | 0
.../vxworkstests}/sem-1.c | 0
.../vxworkstests}/sem-2.c | 0
.../vxworkstests}/sem-3.c | 0
.../vxworkstests}/sem-4.c | 0
.../vxworkstests}/task-1.c | 0
.../vxworkstests}/task-2.c | 0
testsuite/vxworkstests/vxworkstest_driver.c | 74 +++++++++++++
.../vxworkstests}/wd-1.c | 0
17 files changed, 179 insertions(+), 45 deletions(-)
delete mode 100644 lib/vxworks/testsuite/Makefile
create mode 100644 testsuite/vxworkstests/Makefile.am
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/lst-1.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/msgQ-1.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/msgQ-2.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/msgQ-3.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/rng-1.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/sem-1.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/sem-2.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/sem-3.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/sem-4.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/task-1.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/task-2.c (100%)
create mode 100644 testsuite/vxworkstests/vxworkstest_driver.c
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/wd-1.c (100%)configure.ac +1 -0
@@ -1048,6 +1048,7 @@ AC_CONFIG_FILES([ \ testsuite/xeno-test/Makefile \ testsuite/alchemytests/Makefile \ testsuite/psostests/Makefile \ + testsuite/vxworkstests/Makefile \ utils/Makefile \ utils/hdb/Makefile \ utils/can/Makefile \
lib/vxworks/testsuite/Makefile deleted +0 -43
43 lines not on this page · raw message
testsuite/Makefile.am +4 -2
@@ -9,7 +9,8 @@ SUBDIRS += \ switchtest \ xeno-test \ alchemytests \ - psostests + psostests \ + vxworkstests endif DIST_SUBDIRS = \
@@ -22,4 +23,5 @@ DIST_SUBDIRS = \ switchtest \ xeno-test \ alchemytests \ - psostests + psostests \ + vxworkstests
testsuite/vxworkstests/Makefile.am new file +100 -0
100 lines not on this page · raw message
testsuite/vxworkstests/lst-1.c renamed from lib/vxworks/testsuite/lst-1.c +0 -0
testsuite/vxworkstests/msgQ-1.c renamed from lib/vxworks/testsuite/msgQ-1.c +0 -0
testsuite/vxworkstests/msgQ-2.c renamed from lib/vxworks/testsuite/msgQ-2.c +0 -0
testsuite/vxworkstests/msgQ-3.c renamed from lib/vxworks/testsuite/msgQ-3.c +0 -0
testsuite/vxworkstests/rng-1.c renamed from lib/vxworks/testsuite/rng-1.c +0 -0
testsuite/vxworkstests/sem-1.c renamed from lib/vxworks/testsuite/sem-1.c +0 -0
testsuite/vxworkstests/sem-2.c renamed from lib/vxworks/testsuite/sem-2.c +0 -0
testsuite/vxworkstests/sem-3.c renamed from lib/vxworks/testsuite/sem-3.c +0 -0
testsuite/vxworkstests/sem-4.c renamed from lib/vxworks/testsuite/sem-4.c +0 -0
testsuite/vxworkstests/task-1.c renamed from lib/vxworks/testsuite/task-1.c +0 -0
testsuite/vxworkstests/task-2.c renamed from lib/vxworks/testsuite/task-2.c +0 -0
testsuite/vxworkstests/vxworkstest_driver.c new file +74 -0
74 lines not on this page · raw message
testsuite/vxworkstests/wd-1.c renamed from lib/vxworks/testsuite/wd-1.c +0 -0
Signature · 1 line
2.34.1
Quoted 22 lines · Richard Weinberger via Xenomai
This patch series is a first attempt to integrate the currently abandoned alchemy, pSOS and VxWorks tests into Xenomai's test suite. Since each test assumes running as own process a test driver is needed which executes each tests separately.
The driver makes use of the smokey framework.Test results on a x86 VM (5.15.19, Xenomai master as of today):
- Alchemy:
test2 fails:[8] at task-2.c:71 [1] at task-2.c:24 [9] at task-2.c:79 [4] at task-2.c:43 [10] at task-2.c:87 [5] at task-2.c:48 [11] at task-2.c:92 [2] at task-2.c:29 [6] at task-2.c:52 0"022.972| BUG in __traceobj_check_abort(): [FGND] wrong return status: task-2.c:55 => EINVAL (want OK)task5 fails:
Quoted 12 lines
[9] at task-5.c:79 [1] at task-5.c:23 [10] at task-5.c:87 [3] at task-5.c:40 [11] at task-5.c:95 [4] at task-5.c:45 [5] at task-5.c:50 [6] at task-5.c:55 [2] at task-5.c:28 [7] at task-5.c:60 0"003.160| BUG in __traceobj_check_abort(): [FGND] wrong return status: task-5.c:63 => EINVAL (want OK)
Seems we need to fix those at least.
Quoted 3 lines
If Xenomai was configured with --enable-lores-clock, tests mq1, mutex1, pip1 and sem1 fail due to:
undefined symbol:__clockobj_ticks_to_timeout
Missing lib dependency, likely. Cannot try out myself yet as patch 2 does not build.
Quoted 2 lines
- pSOS (Xenomai has to be configured with --enable-lores-clock):
If we add this test to smokey, and it requires lores-clock, we either need to enable that in debian/rules or the Debian package built in xenomai-images so that CI/CT will not fail. Well, it will fail so far due to the test case problems. But that would be next.
Quoted 35 lines
rn1 fails:
0"001.017| BUG in __traceobj_assert_failed(): [rn1] trace assertion failed: rn-1.c:46 => "ret == 0" task2 fails: [8] at task-2.c:73 [1] at task-2.c:23 [9] at task-2.c:81 [4] at task-2.c:44 [10] at task-2.c:89 [5] at task-2.c:49 [11] at task-2.c:94 [2] at task-2.c:28 [3] at task-2.c:33 [6] at task-2.c:53 0"004.756| BUG in __traceobj_assert_failed(): [FGND] trace assertion failed: task-2.c:56 => "ret == 0"task6 fails:
[9] at task-6.c:79 [1] at task-6.c:22 [10] at task-6.c:87 [3] at task-6.c:39 [11] at task-6.c:95 [4] at task-6.c:44 [5] at task-6.c:49 [6] at task-6.c:54 [2] at task-6.c:27 [7] at task-6.c:59 0"002.870| BUG in __traceobj_assert_failed(): [FGND] trace assertion failed: task-6.c:62 => "ret == 0 && oldprio == myprio"task8 runs forever (100% CPU)
- VxWorks:
task2 fails:
Quoted 13 lines
[8] at task-2.c:85 [1] at task-2.c:32 [9] at task-2.c:91 [4] at task-2.c:57 [10] at task-2.c:97 [5] at task-2.c:62 [11] at task-2.c:103 [2] at task-2.c:37 [12] at task-2.c:109 [6] at task-2.c:66 0"005.790| BUG in __traceobj_assert_failed(): [foregroundTask] trace assertion failed: task-2.c:69 => "ret == 0"
So... reviving means fixing first, unfortunately. Then enable CI/CT, and then we can merge. The pattern looks scalable, but then we could also apply it stepwise: first alchemy, then vxworks and finally psos with that lores-clock topic.
Jan
Signature · 2 lines
Siemens AG, Technology Competence Center Embedded Linux
----- Ursprüngliche Mail -----
Quoted 2 lines
Von: "Jan Kiszka" <[email protected]>
Seems we need to fix those at least.
Agreed.
Quoted 7 lines
Quoted 4 lines
If Xenomai was configured with --enable-lores-clock, tests mq1, mutex1, pip1 and sem1 fail due to:
undefined symbol:__clockobj_ticks_to_timeoutMissing lib dependency, likely. Cannot try out myself yet as patch 2 does not build.
Maybe, I found it quite interesting that building the tests works fine but at runtime I get the undefined symbol error.
Quoted 1 line
So... reviving means fixing first, unfortunately. Then enable CI/CT, and
This was expected, no worries.
Quoted 3 lines
then we can merge. The pattern looks scalable, but then we could also apply it stepwise: first alchemy, then vxworks and finally psos with that lores-clock topic.
Sounds like a plan.
Thanks,
//richard
----- Ursprüngliche Mail -----
Quoted 5 lines
Von: "Jan Kiszka" <[email protected]>
An: "richard" <[email protected]>, "xenomai" <[email protected]>
Gesendet: Donnerstag, 14. April 2022 13:18:59
Betreff: Re: [PATCH v2 0/9] Revive alchemy, pSOS and VxWorks tests
Quoted 21 lines
Quoted 20 lines · Richard Weinberger via Xenomai
This patch series is a first attempt to integrate the currently abandoned alchemy, pSOS and VxWorks tests into Xenomai's test suite. Since each test assumes running as own process a test driver is needed which executes each tests separately.
The driver makes use of the smokey framework.Test results on a x86 VM (5.15.19, Xenomai master as of today):
- Alchemy:
test2 fails:[8] at task-2.c:71 [1] at task-2.c:24 [9] at task-2.c:79 [4] at task-2.c:43 [10] at task-2.c:87 [5] at task-2.c:48 [11] at task-2.c:92 [2] at task-2.c:29 [6] at task-2.c:52 0"022.972| BUG in __traceobj_check_abort(): [FGND] wrong return status: task-2.c:55 => EINVAL (want OK)
task-2 seems suffers from modern gcc, changes to safety and count are dead stores.
This makes the test pass here:
testsuite/alchemytests/task-2.c +3 -1
@@ -28,8 +28,10 @@ static void background_task(void *arg)traceobj_mark (&trobj,2 ); -while (--safety >0 ) +while (--safety >0 ) { +compiler_barrier (); count++; + }traceobj_exit (&trobj); }
...same does marking both variables as volatile.
Thanks,
//richard
Quoted 49 lines · Richard Weinberger via Xenomai
----- Ursprüngliche Mail -----
Quoted 5 lines
Von: "Jan Kiszka" <[email protected]>
An: "richard" <[email protected]>, "xenomai" <[email protected]>
Gesendet: Donnerstag, 14. April 2022 13:18:59
Betreff: Re: [PATCH v2 0/9] Revive alchemy, pSOS and VxWorks testsQuoted 21 lines
Quoted 20 lines · Richard Weinberger via Xenomai
This patch series is a first attempt to integrate the currently abandoned alchemy, pSOS and VxWorks tests into Xenomai's test suite. Since each test assumes running as own process a test driver is needed which executes each tests separately.
The driver makes use of the smokey framework.Test results on a x86 VM (5.15.19, Xenomai master as of today):
- Alchemy:
test2 fails:[8] at task-2.c:71 [1] at task-2.c:24 [9] at task-2.c:79 [4] at task-2.c:43 [10] at task-2.c:87 [5] at task-2.c:48 [11] at task-2.c:92 [2] at task-2.c:29 [6] at task-2.c:52 0"022.972| BUG in __traceobj_check_abort(): [FGND] wrong return status: task-2.c:55 => EINVAL (want OK)task-2 seems suffers from modern gcc, changes to safety and count are dead stores.
This makes the test pass here:
testsuite/alchemytests/task-2.c +3
-1@@ -28,8 +28,10 @@ static void background_task(void *arg)traceobj_mark (&trobj,2 ); -while (--safety >0 ) +while (--safety >0 ) { +compiler_barrier (); count++; + }traceobj_exit (&trobj); }
Quoted 1 line
...same does marking both variables as volatile.
I don't have much context here, but volatile sounds like a valid solution (assuming that safety is written by a different thread)
Quoted 4 lines
Thanks,
//richard
----- Ursprüngliche Mail -----
Quoted 5 lines
Von: "Florian Bezdeka" <[email protected]>
Quoted 1 line
...same does marking both variables as volatile.
I don't have much context here, but volatile sounds like a valid solution (assuming that safety is written by a different thread)
Both variables are written by the very same thread.
The problem is that the don't get used later, so the compiler is free to remove the loop. That's why the barrier fixes the problem. It forces the compiler to keep the loop.
Thanks,
//richard
----- Ursprüngliche Mail -----
Quoted 14 lines
Von: "Jan Kiszka" <[email protected]>
Quoted 13 lines
task5 fails:
[9] at task-5.c:79 [1] at task-5.c:23 [10] at task-5.c:87 [3] at task-5.c:40 [11] at task-5.c:95 [4] at task-5.c:45 [5] at task-5.c:50 [6] at task-5.c:55 [2] at task-5.c:28 [7] at task-5.c:60 0"003.160| BUG in __traceobj_check_abort(): [FGND] wrong return status: task-5.c:63 => EINVAL (want OK)
This failure is a little trickier.
Line 62 is:
ret = rt_task_set_priority(&t_bgnd, info.prio + 1); ret is EINVAL, that's why the assert in line 63 fails. It fails because t_bgnd has already terminated.
This concurs also with the above marker [2].
[2] is reached when t_bgnd is done.
The foreground task does:
ret = rt_task_inquire(NULL, &info);
traceobj_assert(&trobj, ret == 0 && info.prio == 21);
traceobj_mark(&trobj, 6);
ret = rt_task_set_priority(&t_bgnd, info.prio);
traceobj_check(&trobj, ret, 0);
traceobj_mark(&trobj, 7);
ret = rt_task_set_priority(&t_bgnd, info.prio + 1);
traceobj_check(&trobj, ret, 0);
traceobj_mark(&trobj, 8);So it asks for it's own priority, it must be 21, that's okay. Then it raises the priority of t_bgnd from 20 to 21 and assumes that no scheduling happens. But this seems to fail.
Did the nucleus CPU scheduler guarantee that giving another task the same priority of the calling task will favour the caller? Now the gifted task seems to win.
Thanks,
//richard
Quoted 43 lines · Richard Weinberger
----- Ursprüngliche Mail -----
Quoted 14 lines
Von: "Jan Kiszka" <[email protected]>
Quoted 13 lines
task5 fails:
[9] at task-5.c:79 [1] at task-5.c:23 [10] at task-5.c:87 [3] at task-5.c:40 [11] at task-5.c:95 [4] at task-5.c:45 [5] at task-5.c:50 [6] at task-5.c:55 [2] at task-5.c:28 [7] at task-5.c:60 0"003.160| BUG in __traceobj_check_abort(): [FGND] wrong return status: task-5.c:63 => EINVAL (want OK)This failure is a little trickier.
Line 62 is:
ret =rt_task_set_priority(&t_bgnd, info.prio + 1); ret is EINVAL, that's why the assert in line 63 fails. It fails becauset_bgndhas already terminated.This concurs also with the above marker [2].
[2] is reached whent_bgndis done.The foreground task does:
ret = rt_task_inquire(NULL, &info); traceobj_assert(&trobj, ret == 0 && info.prio == 21); traceobj_mark(&trobj, 6); ret = rt_task_set_priority(&t_bgnd, info.prio); traceobj_check(&trobj, ret, 0); traceobj_mark(&trobj, 7); ret = rt_task_set_priority(&t_bgnd, info.prio + 1); traceobj_check(&trobj, ret, 0); traceobj_mark(&trobj, 8);
Quoted 7 lines
So it asks for it's own priority, it must be 21, that's okay. Then it raises the priority of
t_bgndfrom 20 to 21 and assumes that no scheduling happens. But this seems to fail.Did the nucleus CPU scheduler guarantee that giving another task the same priority of the calling task will favour the caller? Now the gifted task seems to win.
Did you configure with --enable-lazy-setsched? If not, set_prio should send the caller to Linux, and that will definitely cause some scheduling change.
Jan
Signature · 2 lines
Siemens AG, Technology Competence Center Embedded Linux
----- Ursprüngliche Mail -----
Quoted 7 lines
Quoted 3 lines
Did the nucleus CPU scheduler guarantee that giving another task the same priority of the calling task will favour the caller? Now the gifted task seems to win.
Did you configure with --enable-lazy-setsched? If not,
set_prioshould send the caller to Linux, and that will definitely cause some scheduling change.
Yes. -enable-lazy-setsched is set.
Thanks,
//richard
Quoted 11 lines · Richard Weinberger
----- Ursprüngliche Mail -----
Quoted 7 lines
Quoted 3 lines
Did the nucleus CPU scheduler guarantee that giving another task the same priority of the calling task will favour the caller? Now the gifted task seems to win.
Did you configure with --enable-lazy-setsched? If not,
set_prioshould send the caller to Linux, and that will definitely cause some scheduling change.Yes. -enable-lazy-setsched is set.
Then it's better to trace than to speculate.
Jan
Signature · 2 lines
Siemens AG, Technology Competence Center Embedded Linux
v3 cover Revive alchemy, pSOS and VxWorks tests
In reply to Richard WeinbergerThis patch series is an attempt to integrate the currently abandoned alchemy, pSOS and VxWorks tests into Xenomai's test suite. Since each test assumes running as own process a test driver is needed which executes each tests separately.
The driver makes use of the smokey framework.
New test results on a x86 VM (5.15.94, Xenomai master as of today):
- vxworkstests/task-2 fails:
[8] at
testsuite/vxworkstests/task-2.c:85
[1] at
testsuite/vxworkstests/task-2.c:32
[9] at
testsuite/vxworkstests/task-2.c:91
[4] at
testsuite/vxworkstests/task-2.c:57
[10] at
testsuite/vxworkstests/task-2.c:97
[5] at
testsuite/vxworkstests/task-2.c:62
[11] at
testsuite/vxworkstests/task-2.c:103
[2] at
testsuite/vxworkstests/task-2.c:37
[12] at
testsuite/vxworkstests/task-2.c:109
[6] at
testsuite/vxworkstests/task-2.c:66
0"014.637| BUG in __traceobj_assert_failed(): [foregroundTask] trace
assertion failed:
testsuite/vxworkstests/task-2.c:69
=> "ret == 0"- psostests/task-6 fails:
[9] at
testsuite/psostests/task-6.c:79
[1] at
testsuite/psostests/task-6.c:22
[10] at
testsuite/psostests/task-6.c:87
[3] at
testsuite/psostests/task-6.c:39
[11] at
testsuite/psostests/task-6.c:95
[4] at
testsuite/psostests/task-6.c:44
[5] at
testsuite/psostests/task-6.c:49
[6] at
testsuite/psostests/task-6.c:54
[2] at
testsuite/psostests/task-6.c:27
[7] at
testsuite/psostests/task-6.c:59
0"011.370| BUG in __traceobj_assert_failed(): [FGND] trace assertion failed:
testsuite/psostests/task-6.c:62
=> "ret == 0 && oldprio == myprio"- psostests/rn-1 fails:
0"000.679| BUG in __traceobj_assert_failed(): [rn1] trace assertion failed:
testsuite/psostests/rn-1.c:46
=> "ret == 0"- task-8 runs forever (100% CPU)
Changes since v2:
- Rebase to latest master
- Fix build failures
- Fix some failing tests
Aaron Marcher (2):
alchemytests: check pipe-1 asprintf ret value
vxworkstests: fix Makefile.am reference
Richard Weinberger (9):
testsuite: Move alchemy tests into testsuite/
testsuite: Hook up alchemytests
testsuite: Add a simple test driver for alchemytests Remove old alchemy tests Makefile
alchemytests: Fix gcc warning in buffer-1
alchemytests: Fix gcc warning in task-9
testsuite: Move pSOS tests into testsuite/
testsuite: Add a simple test driver for psostests
testsuite: Integrate vwworks tests into testsuite/
configure.ac | 3 +
lib/alchemy/testsuite/Makefile | 70 --------
lib/psos/testsuite/Makefile | 49 ------
lib/vxworks/testsuite/Makefile | 43 -----
testsuite/Makefile.am | 10 +-
testsuite/alchemytests/Makefile.am | 159 +++++++++++++++++
.../alchemytests}/alarm-1.c | 0
testsuite/alchemytests/alchemytest_driver.c | 84 +++++++++
.../alchemytests}/buffer-1.c | 2 +-
.../alchemytests}/event-1.c | 0
.../alchemytests}/heap-1.c | 0
.../alchemytests}/heap-2.c | 0
.../alchemytests}/mq-1.c | 0
.../alchemytests}/mq-2.c | 0
.../alchemytests}/mq-3.c | 0
.../alchemytests}/mutex-1.c | 0
.../alchemytests}/pipe-1.c | 6 +-
.../alchemytests}/sem-1.c | 0
.../alchemytests}/sem-2.c | 0
.../alchemytests}/task-1.c | 0
.../alchemytests}/task-10.c | 0
.../alchemytests}/task-2.c | 0
.../alchemytests}/task-3.c | 0
.../alchemytests}/task-4.c | 0
.../alchemytests}/task-5.c | 0
.../alchemytests}/task-6.c | 0
.../alchemytests}/task-7.c | 0
.../alchemytests}/task-8.c | 0
.../alchemytests}/task-9.c | 2 +-
testsuite/psostests/Makefile.am | 166 ++++++++++++++++++
.../testsuite => testsuite/psostests}/mq-1.c | 0
.../testsuite => testsuite/psostests}/mq-2.c | 0
.../testsuite => testsuite/psostests}/mq-3.c | 0
testsuite/psostests/psostest_driver.c | 85 +++++++++
.../testsuite => testsuite/psostests}/pt-1.c | 0
.../testsuite => testsuite/psostests}/rn-1.c | 0
.../testsuite => testsuite/psostests}/sem-1.c | 0
.../testsuite => testsuite/psostests}/sem-2.c | 0
.../psostests}/task-1.c | 0
.../psostests}/task-2.c | 0
.../psostests}/task-3.c | 0
.../psostests}/task-4.c | 0
.../psostests}/task-5.c | 0
.../psostests}/task-6.c | 0
.../psostests}/task-7.c | 0
.../psostests}/task-8.c | 0
.../psostests}/task-9.c | 0
.../testsuite => testsuite/psostests}/tm-1.c | 0
.../testsuite => testsuite/psostests}/tm-2.c | 0
.../testsuite => testsuite/psostests}/tm-3.c | 0
.../testsuite => testsuite/psostests}/tm-4.c | 0
.../testsuite => testsuite/psostests}/tm-5.c | 0
.../testsuite => testsuite/psostests}/tm-6.c | 0
.../testsuite => testsuite/psostests}/tm-7.c | 0
testsuite/vxworkstests/Makefile.am | 100 +++++++++++
.../vxworkstests}/lst-1.c | 0
.../vxworkstests}/msgQ-1.c | 0
.../vxworkstests}/msgQ-2.c | 0
.../vxworkstests}/msgQ-3.c | 0
.../vxworkstests}/rng-1.c | 0
.../vxworkstests}/sem-1.c | 0
.../vxworkstests}/sem-2.c | 0
.../vxworkstests}/sem-3.c | 0
.../vxworkstests}/sem-4.c | 0
.../vxworkstests}/task-1.c | 0
.../vxworkstests}/task-2.c | 0
testsuite/vxworkstests/vxworkstest_driver.c | 74 ++++++++
.../vxworkstests}/wd-1.c | 0
68 files changed, 685 insertions(+), 168 deletions(-)
delete mode 100644 lib/alchemy/testsuite/Makefile
delete mode 100644 lib/psos/testsuite/Makefile
delete mode 100644 lib/vxworks/testsuite/Makefile
create mode 100644 testsuite/alchemytests/Makefile.am
rename {lib/alchemy/testsuite => testsuite/alchemytests}/alarm-1.c (100%)
create mode 100644 testsuite/alchemytests/alchemytest_driver.c
rename {lib/alchemy/testsuite => testsuite/alchemytests}/buffer-1.c (99%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/event-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/heap-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/heap-2.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/mq-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/mq-2.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/mq-3.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/mutex-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/pipe-1.c (97%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/sem-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/sem-2.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-10.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-2.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-3.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-4.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-5.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-6.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-7.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-8.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-9.c (97%)
create mode 100644 testsuite/psostests/Makefile.am
rename {lib/psos/testsuite => testsuite/psostests}/mq-1.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/mq-2.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/mq-3.c (100%)
create mode 100644 testsuite/psostests/psostest_driver.c
rename {lib/psos/testsuite => testsuite/psostests}/pt-1.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/rn-1.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/sem-1.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/sem-2.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/task-1.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/task-2.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/task-3.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/task-4.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/task-5.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/task-6.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/task-7.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/task-8.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/task-9.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/tm-1.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/tm-2.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/tm-3.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/tm-4.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/tm-5.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/tm-6.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/tm-7.c (100%)
create mode 100644 testsuite/vxworkstests/Makefile.am
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/lst-1.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/msgQ-1.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/msgQ-2.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/msgQ-3.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/rng-1.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/sem-1.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/sem-2.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/sem-3.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/sem-4.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/task-1.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/task-2.c (100%)
create mode 100644 testsuite/vxworkstests/vxworkstest_driver.c
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/wd-1.c (100%)Signature · 1 line
2.35.3
PATCH v3 1/11 testsuite: Move alchemy tests into testsuite/
From: Richard Weinberger <[email protected]>
This is the very first step to have the alchemy tests embedded into our testsuite.
---
{lib/alchemy/testsuite => testsuite/alchemytests}/alarm-1.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/buffer-1.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/event-1.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/heap-1.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/heap-2.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/mq-1.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/mq-2.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/mq-3.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/mutex-1.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/pipe-1.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/sem-1.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/sem-2.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/task-1.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/task-10.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/task-2.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/task-3.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/task-4.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/task-5.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/task-6.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/task-7.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/task-8.c | 0
{lib/alchemy/testsuite => testsuite/alchemytests}/task-9.c | 0
22 files changed, 0 insertions(+), 0 deletions(-)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/alarm-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/buffer-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/event-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/heap-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/heap-2.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/mq-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/mq-2.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/mq-3.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/mutex-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/pipe-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/sem-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/sem-2.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-10.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-2.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-3.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-4.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-5.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-6.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-7.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-8.c (100%)
rename {lib/alchemy/testsuite => testsuite/alchemytests}/task-9.c (100%)testsuite/alchemytests/alarm-1.c renamed from lib/alchemy/testsuite/alarm-1.c +0 -0
testsuite/alchemytests/buffer-1.c renamed from lib/alchemy/testsuite/buffer-1.c +0 -0
testsuite/alchemytests/event-1.c renamed from lib/alchemy/testsuite/event-1.c +0 -0
testsuite/alchemytests/heap-1.c renamed from lib/alchemy/testsuite/heap-1.c +0 -0
testsuite/alchemytests/heap-2.c renamed from lib/alchemy/testsuite/heap-2.c +0 -0
testsuite/alchemytests/mq-1.c renamed from lib/alchemy/testsuite/mq-1.c +0 -0
testsuite/alchemytests/mq-2.c renamed from lib/alchemy/testsuite/mq-2.c +0 -0
testsuite/alchemytests/mq-3.c renamed from lib/alchemy/testsuite/mq-3.c +0 -0
testsuite/alchemytests/mutex-1.c renamed from lib/alchemy/testsuite/mutex-1.c +0 -0
testsuite/alchemytests/pipe-1.c renamed from lib/alchemy/testsuite/pipe-1.c +0 -0
testsuite/alchemytests/sem-1.c renamed from lib/alchemy/testsuite/sem-1.c +0 -0
testsuite/alchemytests/sem-2.c renamed from lib/alchemy/testsuite/sem-2.c +0 -0
testsuite/alchemytests/task-1.c renamed from lib/alchemy/testsuite/task-1.c +0 -0
testsuite/alchemytests/task-10.c renamed from lib/alchemy/testsuite/task-10.c +0 -0
testsuite/alchemytests/task-2.c renamed from lib/alchemy/testsuite/task-2.c +0 -0
testsuite/alchemytests/task-3.c renamed from lib/alchemy/testsuite/task-3.c +0 -0
testsuite/alchemytests/task-4.c renamed from lib/alchemy/testsuite/task-4.c +0 -0
testsuite/alchemytests/task-5.c renamed from lib/alchemy/testsuite/task-5.c +0 -0
testsuite/alchemytests/task-6.c renamed from lib/alchemy/testsuite/task-6.c +0 -0
testsuite/alchemytests/task-7.c renamed from lib/alchemy/testsuite/task-7.c +0 -0
testsuite/alchemytests/task-8.c renamed from lib/alchemy/testsuite/task-8.c +0 -0
testsuite/alchemytests/task-9.c renamed from lib/alchemy/testsuite/task-9.c +0 -0
Signature · 1 line
2.35.3
PATCH v3 2/11 testsuite: Hook up alchemytests
In reply to Aaron MarcherFrom: Richard Weinberger <[email protected]>
Build them using Xenomai's build system.
--- configure.ac | 1 + testsuite/Makefile.am | 6 +- testsuite/alchemytests/Makefile.am | 148 +++++++++++++++++++++++++++++ 3 files changed, 153 insertions(+), 2 deletions(-) create mode 100644 testsuite/alchemytests/Makefile.am
configure.ac +1 -0
@@ -1045,6 +1045,7 @@ AC_CONFIG_FILES([ \ testsuite/smokey/x86io/Makefile testsuite/clocktest/Makefile \ testsuite/xeno-test/Makefile \ + testsuite/alchemytests/Makefile \ utils/Makefile \ utils/hdb/Makefile \ utils/can/Makefile \
testsuite/Makefile.am +4 -2
@@ -7,7 +7,8 @@ SUBDIRS += \ gpiotest \ spitest \ switchtest \ - xeno-test + xeno-test \ + alchemytests endif DIST_SUBDIRS = \
@@ -18,4 +19,5 @@ DIST_SUBDIRS = \ smokey \ spitest \ switchtest \ - xeno-test + xeno-test \ + alchemytests
testsuite/alchemytests/Makefile.am new file +148 -0
148 lines not on this page · raw message
Signature · 1 line
2.35.3
PATCH v3 3/11 testsuite: Add a simple test driver for alchemytests
In reply to Aaron MarcherFrom: Richard Weinberger <[email protected]>
In their current shape, every alchemy test has to be a single program and does not use the smokey test framework.
alchemytest_driver uses smokey and runs each test as new process.
--- testsuite/alchemytests/Makefile.am | 11 +++ testsuite/alchemytests/alchemytest_driver.c | 84 +++++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 testsuite/alchemytests/alchemytest_driver.c
testsuite/alchemytests/Makefile.am +11 -0
@@ -146,3 +146,14 @@ task10_SOURCES = task-10.c task10_CPPFLAGS = $(alchemycppflags) task10_LDADD = $(alchemyldadd) -lpthread -lrt -lm task10_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ + +alchemytest_driver_SOURCES = alchemytest_driver.c +alchemytest_driver_CPPFLAGS = \ + $(XENO_USER_CFLAGS) \ + -I$(top_srcdir)/include +alchemytest_driver_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytest_driver_LDADD = \ + ../../lib/smokey/libsmokey@[email protected] \ + @XENO_CORE_LDADD@ \ + @XENO_USER_LDADD@ \ + -lpthread -lrt
testsuite/alchemytests/alchemytest_driver.c new file +84 -0
84 lines not on this page · raw message
Signature · 1 line
2.35.3
PATCH v3 4/11 Remove old alchemy tests Makefile
In reply to Aaron MarcherFrom: Richard Weinberger <[email protected]>
--- lib/alchemy/testsuite/Makefile | 70 ---------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 lib/alchemy/testsuite/Makefile
lib/alchemy/testsuite/Makefile deleted +0 -70
@@ -1,70 +0,0 @@ -ifeq ($(DESTDIR),) -XENO_CONFIG=xeno-config -else -XENO_CONFIG=$(DESTDIR)/bin/xeno-config -endif - -prefix := $(shell DESTDIR=$(DESTDIR) $(XENO_CONFIG) --prefix) -solibs := $(shell DESTDIR=$(DESTDIR) $(XENO_CONFIG) --libdir) -core := $(shell DESTDIR=$(DESTDIR) $(XENO_CONFIG) --core) - -ifeq ($(prefix),) -$(error Please add <xenomai-install-path>/bin to your PATH variable or specify DESTDIR) -endif - -cobalt-only := pipe-1 -mercury-only := -core-specific = $($(core)-only) - -TESTS := \ - task-1 \ - task-2 \ - task-3 \ - task-4 \ - task-5 \ - task-6 \ - task-7 \ - task-8 \ - task-9 \ - task-10 \ - mq-1 \ - mq-2 \ - mq-3 \ - alarm-1 \ - sem-1 \ - sem-2 \ - mutex-1 \ - event-1 \ - heap-1 \ - heap-2 \ - buffer-1 \ - $(core-specific) - -CFLAGS := $(shell DESTDIR=$(DESTDIR) $(XENO_CONFIG) --skin=alchemy --cflags) -g -LDFLAGS := $(shell DESTDIR=$(DESTDIR) $(XENO_CONFIG) --skin=alchemy --ldflags) -CC = $(shell DESTDIR=$(DESTDIR) $(XENO_CONFIG) --cc) - -all: $(TESTS) - -%: %.c - $(CC) -o $@ $< $(CFLAGS) $(LDFLAGS) - -install: all - install -d $(prefix)/testsuite/alchemy - install -t $(prefix)/testsuite/alchemy $(TESTS) - -clean: - $(RM) $(TESTS) *~ - -# Run the test suite. We pin all tests to CPU #0, so that SMP does not -# alter the execution sequence we expect from them. -test: all - @for t in $(TESTS); do \ - echo -n $$t...; \ - sudo LD_LIBRARY_PATH=$(solibs) $(VALGRIND) ./$$t --cpu-affinity=0 --silent && echo ok || echo BAD; \ - done - -test/%: % - sudo LD_LIBRARY_PATH=$(solibs) $(VALGRIND) ./$(@F) --cpu-affinity=0 --silent && echo ok || echo BAD - -.PHONY: clean test
Signature · 1 line
2.35.3
PATCH v3 5/11 alchemytests: Fix gcc warning in buffer-1
In reply to Aaron MarcherFrom: Richard Weinberger <[email protected]>
Make n an unsigned integer, such that gcc realizes that "%.2d" cannot become negative and will fit into our 3 bytes buffer.
Fixes:
buffer-1.c:64:15: error: ‘%.2d’ directive writing between 2 and 10 bytes into a region of size 3 [-Werror=format-overflow=]
sprintf(s, "%.2d", 11 * n);
^~~~--- testsuite/alchemytests/buffer-1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
testsuite/alchemytests/buffer-1.c +1 -1
@@ -49,7 +49,7 @@ static void background_task(void *arg) {char c ='A' , s[3 ];ssize_t ret; -int n =0 ; +unsigned int n =0 ;traceobj_enter (&trobj);
Signature · 1 line
2.35.3
PATCH v3 6/11 alchemytests: Fix gcc warning in task-9
In reply to Aaron MarcherFrom: Richard Weinberger <[email protected]>
Make it static, no prototype needed anymore.
Fixes:
task-9.c:13:6: error: no previous prototype for ‘sighandler’ [-Werror=missing-prototypes]
void sighandler(int sig)
--- testsuite/alchemytests/task-9.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
testsuite/alchemytests/task-9.c +1 -1
@@ -10,7 +10,7 @@ static RT_TASK t_test;#define ONE_SECOND 1000000000ULL -void sighandler (int sig) +static void sighandler (int sig) {/* nop */ }
Signature · 1 line
2.35.3
PATCH v3 7/11 testsuite: Move pSOS tests into testsuite/
In reply to Aaron MarcherFrom: Richard Weinberger <[email protected]>
Just like for alchemy tests, integrate them into our test suite.
---
configure.ac | 1 +
lib/psos/testsuite/Makefile | 49 ------
testsuite/Makefile.am | 6 +-
testsuite/psostests/Makefile.am | 153 ++++++++++++++++++
.../testsuite => testsuite/psostests}/mq-1.c | 0
.../testsuite => testsuite/psostests}/mq-2.c | 0
.../testsuite => testsuite/psostests}/mq-3.c | 0
.../testsuite => testsuite/psostests}/pt-1.c | 0
.../testsuite => testsuite/psostests}/rn-1.c | 0
.../testsuite => testsuite/psostests}/sem-1.c | 0
.../testsuite => testsuite/psostests}/sem-2.c | 0
.../psostests}/task-1.c | 0
.../psostests}/task-2.c | 0
.../psostests}/task-3.c | 0
.../psostests}/task-4.c | 0
.../psostests}/task-5.c | 0
.../psostests}/task-6.c | 0
.../psostests}/task-7.c | 0
.../psostests}/task-8.c | 0
.../psostests}/task-9.c | 0
.../testsuite => testsuite/psostests}/tm-1.c | 0
.../testsuite => testsuite/psostests}/tm-2.c | 0
.../testsuite => testsuite/psostests}/tm-3.c | 0
.../testsuite => testsuite/psostests}/tm-4.c | 0
.../testsuite => testsuite/psostests}/tm-5.c | 0
.../testsuite => testsuite/psostests}/tm-6.c | 0
.../testsuite => testsuite/psostests}/tm-7.c | 0
27 files changed, 158 insertions(+), 51 deletions(-)
delete mode 100644 lib/psos/testsuite/Makefile
create mode 100644 testsuite/psostests/Makefile.am
rename {lib/psos/testsuite => testsuite/psostests}/mq-1.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/mq-2.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/mq-3.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/pt-1.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/rn-1.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/sem-1.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/sem-2.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/task-1.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/task-2.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/task-3.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/task-4.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/task-5.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/task-6.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/task-7.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/task-8.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/task-9.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/tm-1.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/tm-2.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/tm-3.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/tm-4.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/tm-5.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/tm-6.c (100%)
rename {lib/psos/testsuite => testsuite/psostests}/tm-7.c (100%)configure.ac +1 -0
@@ -1046,6 +1046,7 @@ AC_CONFIG_FILES([ \ testsuite/clocktest/Makefile \ testsuite/xeno-test/Makefile \ testsuite/alchemytests/Makefile \ + testsuite/psostests/Makefile \ utils/Makefile \ utils/hdb/Makefile \ utils/can/Makefile \
lib/psos/testsuite/Makefile deleted +0 -49
49 lines not on this page · raw message
testsuite/Makefile.am +4 -2
@@ -8,7 +8,8 @@ SUBDIRS += \ spitest \ switchtest \ xeno-test \ - alchemytests + alchemytests \ + psostests endif DIST_SUBDIRS = \
@@ -20,4 +21,5 @@ DIST_SUBDIRS = \ spitest \ switchtest \ xeno-test \ - alchemytests + alchemytests \ + psostests
testsuite/psostests/Makefile.am new file +153 -0
153 lines not on this page · raw message
testsuite/psostests/mq-1.c renamed from lib/psos/testsuite/mq-1.c +0 -0
testsuite/psostests/mq-2.c renamed from lib/psos/testsuite/mq-2.c +0 -0
testsuite/psostests/mq-3.c renamed from lib/psos/testsuite/mq-3.c +0 -0
testsuite/psostests/pt-1.c renamed from lib/psos/testsuite/pt-1.c +0 -0
testsuite/psostests/rn-1.c renamed from lib/psos/testsuite/rn-1.c +0 -0
testsuite/psostests/sem-1.c renamed from lib/psos/testsuite/sem-1.c +0 -0
testsuite/psostests/sem-2.c renamed from lib/psos/testsuite/sem-2.c +0 -0
testsuite/psostests/task-1.c renamed from lib/psos/testsuite/task-1.c +0 -0
testsuite/psostests/task-2.c renamed from lib/psos/testsuite/task-2.c +0 -0
testsuite/psostests/task-3.c renamed from lib/psos/testsuite/task-3.c +0 -0
testsuite/psostests/task-4.c renamed from lib/psos/testsuite/task-4.c +0 -0
testsuite/psostests/task-5.c renamed from lib/psos/testsuite/task-5.c +0 -0
testsuite/psostests/task-6.c renamed from lib/psos/testsuite/task-6.c +0 -0
testsuite/psostests/task-7.c renamed from lib/psos/testsuite/task-7.c +0 -0
testsuite/psostests/task-8.c renamed from lib/psos/testsuite/task-8.c +0 -0
testsuite/psostests/task-9.c renamed from lib/psos/testsuite/task-9.c +0 -0
testsuite/psostests/tm-1.c renamed from lib/psos/testsuite/tm-1.c +0 -0
testsuite/psostests/tm-2.c renamed from lib/psos/testsuite/tm-2.c +0 -0
testsuite/psostests/tm-3.c renamed from lib/psos/testsuite/tm-3.c +0 -0
testsuite/psostests/tm-4.c renamed from lib/psos/testsuite/tm-4.c +0 -0
testsuite/psostests/tm-5.c renamed from lib/psos/testsuite/tm-5.c +0 -0
testsuite/psostests/tm-6.c renamed from lib/psos/testsuite/tm-6.c +0 -0
testsuite/psostests/tm-7.c renamed from lib/psos/testsuite/tm-7.c +0 -0
Signature · 1 line
2.35.3
PATCH v3 8/11 testsuite: Add a simple test driver for psostests
In reply to Aaron MarcherFrom: Richard Weinberger <[email protected]>
Just like for alchemytests.
--- testsuite/psostests/Makefile.am | 15 ++++- testsuite/psostests/psostest_driver.c | 85 +++++++++++++++++++++++++++ 2 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 testsuite/psostests/psostest_driver.c
testsuite/psostests/Makefile.am +14 -1
@@ -2,7 +2,8 @@ testdir = @XENO_TEST_DIR@ CCLD = $(top_srcdir)/scripts/wrap-link.sh $(CC) -test_PROGRAMS = mq1 \ +test_PROGRAMS = psostest_driver \ + mq1 \ mq2 \ mq3 \ pt1 \
@@ -151,3 +152,15 @@ task9_SOURCES = task-9.c task9_CPPFLAGS = $(psoscppflags) task9_LDADD = $(psosldadd) -lpthread -lrt -lm task9_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ + +psostest_driver_SOURCES = psostest_driver.c +psostest_driver_CPPFLAGS = \ + $(XENO_USER_CFLAGS) \ + -I$(top_srcdir)/include +psostest_driver_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +psostest_driver_LDADD = \ + ../../lib/psos/libpsos@[email protected] \ + ../../lib/smokey/libsmokey@[email protected] \ + @XENO_CORE_LDADD@ \ + @XENO_USER_LDADD@ \ + -lpthread -lrt
testsuite/psostests/psostest_driver.c new file +85 -0
85 lines not on this page · raw message
Signature · 1 line
2.35.3
PATCH v3 9/11 testsuite: Integrate vwworks tests into testsuite/
In reply to Aaron MarcherFrom: Richard Weinberger <[email protected]>
Same as for alchemy and pSOS.
---
configure.ac | 1 +
lib/vxworks/testsuite/Makefile | 43 --------
testsuite/Makefile.am | 6 +-
testsuite/vxworkstests/Makefile.am | 100 ++++++++++++++++++
.../vxworkstests}/lst-1.c | 0
.../vxworkstests}/msgQ-1.c | 0
.../vxworkstests}/msgQ-2.c | 0
.../vxworkstests}/msgQ-3.c | 0
.../vxworkstests}/rng-1.c | 0
.../vxworkstests}/sem-1.c | 0
.../vxworkstests}/sem-2.c | 0
.../vxworkstests}/sem-3.c | 0
.../vxworkstests}/sem-4.c | 0
.../vxworkstests}/task-1.c | 0
.../vxworkstests}/task-2.c | 0
testsuite/vxworkstests/vxworkstest_driver.c | 74 +++++++++++++
.../vxworkstests}/wd-1.c | 0
17 files changed, 179 insertions(+), 45 deletions(-)
delete mode 100644 lib/vxworks/testsuite/Makefile
create mode 100644 testsuite/vxworkstests/Makefile.am
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/lst-1.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/msgQ-1.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/msgQ-2.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/msgQ-3.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/rng-1.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/sem-1.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/sem-2.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/sem-3.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/sem-4.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/task-1.c (100%)
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/task-2.c (100%)
create mode 100644 testsuite/vxworkstests/vxworkstest_driver.c
rename {lib/vxworks/testsuite => testsuite/vxworkstests}/wd-1.c (100%)configure.ac +1 -0
@@ -1047,6 +1047,7 @@ AC_CONFIG_FILES([ \ testsuite/xeno-test/Makefile \ testsuite/alchemytests/Makefile \ testsuite/psostests/Makefile \ + testsuite/vxworkstests/Makefile \ utils/Makefile \ utils/hdb/Makefile \ utils/can/Makefile \
lib/vxworks/testsuite/Makefile deleted +0 -43
43 lines not on this page · raw message
testsuite/Makefile.am +4 -2
@@ -9,7 +9,8 @@ SUBDIRS += \ switchtest \ xeno-test \ alchemytests \ - psostests + psostests \ + vxworkstests endif DIST_SUBDIRS = \
@@ -22,4 +23,5 @@ DIST_SUBDIRS = \ switchtest \ xeno-test \ alchemytests \ - psostests + psostests \ + vxworkstests
testsuite/vxworkstests/Makefile.am new file +100 -0
100 lines not on this page · raw message
testsuite/vxworkstests/lst-1.c renamed from lib/vxworks/testsuite/lst-1.c +0 -0
testsuite/vxworkstests/msgQ-1.c renamed from lib/vxworks/testsuite/msgQ-1.c +0 -0
testsuite/vxworkstests/msgQ-2.c renamed from lib/vxworks/testsuite/msgQ-2.c +0 -0
testsuite/vxworkstests/msgQ-3.c renamed from lib/vxworks/testsuite/msgQ-3.c +0 -0
testsuite/vxworkstests/rng-1.c renamed from lib/vxworks/testsuite/rng-1.c +0 -0
testsuite/vxworkstests/sem-1.c renamed from lib/vxworks/testsuite/sem-1.c +0 -0
testsuite/vxworkstests/sem-2.c renamed from lib/vxworks/testsuite/sem-2.c +0 -0
testsuite/vxworkstests/sem-3.c renamed from lib/vxworks/testsuite/sem-3.c +0 -0
testsuite/vxworkstests/sem-4.c renamed from lib/vxworks/testsuite/sem-4.c +0 -0
testsuite/vxworkstests/task-1.c renamed from lib/vxworks/testsuite/task-1.c +0 -0
testsuite/vxworkstests/task-2.c renamed from lib/vxworks/testsuite/task-2.c +0 -0
testsuite/vxworkstests/vxworkstest_driver.c new file +74 -0
74 lines not on this page · raw message
testsuite/vxworkstests/wd-1.c renamed from lib/vxworks/testsuite/wd-1.c +0 -0
Signature · 1 line
2.35.3
PATCH v3 10/11 alchemytests: check pipe-1 asprintf ret value
In reply to Aaron Marcher--- testsuite/alchemytests/pipe-1.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
testsuite/alchemytests/pipe-1.c +4 -2
@@ -48,11 +48,13 @@ static void realtime_task(void *arg)static void *regular_thread (void *arg) {struct pipe_message m; -int fd, seq =0 ; +int fd, res, seq =0 ;ssize_t ret;char *rtp; -asprintf (&rtp,"/dev/rtp%d" , minor); + res =asprintf (&rtp,"/dev/rtp%d" , minor); +if (res <0 ) +return NULL ; fd =open (rtp,O_RDWR );free (rtp);
Signature · 1 line
2.35.3
PATCH v3 11/11 vxworkstests: fix Makefile.am reference
In reply to Aaron Marcher--- testsuite/vxworkstests/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
testsuite/vxworkstests/Makefile.am +1 -1
@@ -28,7 +28,7 @@ vxworksldadd = \ -lpthread -lrt -lm lst1_SOURCES = lst-1.c -lst_CPPFLAGS = $(vxworkscppflags) +lst1_CPPFLAGS = $(vxworkscppflags) lst1_LDADD = $(vxworksldadd) -lpthread -lrt -lm lst1_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@
Signature · 1 line
2.35.3
Re: [PATCH 11/11] vxworkstests: fix Makefile.am reference
Quoted 10 lines · Aaron Marcher
Signed-off-by Aaron Marcher <[email protected]>--- testsuite/vxworkstests/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)testsuite/vxworkstests/Makefile.am +0
-0
testsuite/vxworkstests/Makefile.am vxworksldadd = \ · line 34
Quoted 8 lines
testsuite/vxworkstests/Makefile.am +1
-1@@ -28,7 +28,7 @@ vxworksldadd = \ -lpthread -lrt -lm lst1_SOURCES = lst-1.c -lst_CPPFLAGS = $(vxworkscppflags) +lst1_CPPFLAGS = $(vxworkscppflags) lst1_LDADD = $(vxworksldadd) -lpthread -lrt -lm lst1_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@
This should be folded into into patch 9.
Jan
Signature · 2 lines
Siemens AG, Technology Competence Center Embedded Linux
Quoted 5 lines · Aaron Marcher
This patch series is an attempt to integrate the currently abandoned alchemy, pSOS and VxWorks tests into Xenomai's test suite. Since each test assumes running as own process a test driver is needed which executes each tests separately.
The driver makes use of the smokey framework.
...but it does hook up with smokey, thus will not run as part of xeno-test and our CI. Please fix that - after either resolving the remaining broken tests or disabling them for now. It should be easy to spawn the new tests as separate processes from a smokey instance and visualize their results as part of smokey.
Thanks,
Jan
Signature · 2 lines
Siemens AG, Technology Competence Center Embedded Linux
Quoted 7 lines · Jan Kiszka
Quoted 5 lines · Aaron Marcher
This patch series is an attempt to integrate the currently abandoned alchemy, pSOS and VxWorks tests into Xenomai's test suite. Since each test assumes running as own process a test driver is needed which executes each tests separately.
The driver makes use of the smokey framework.
Quoted 6 lines
...but it does hook up with smokey, thus will not run as part of xeno-test and our CI. Please fix that - after either resolving the remaining broken tests or disabling them for now. It should be easy to spawn the new tests as separate processes from a smokey instance and visualize their results as part of smokey.
BTW, mutex1 from alchemytest fails for me, all other alchemy tests are fine.
------------------------------------------------------------------------------
[ ERROR BACKTRACE: thread taskB ]
#0 EEXIST in rt_mutex_create(), ../../../lib/alchemy/mutex.c:148 #1 EEXIST in registry_add_file(),../../../lib/copperplate/registry.c:239
=> #2 ESRCH in pvhash_remove(), ../../../lib/boilerplate/hash.c:436
------------------------------------------------------------------------------
I can confirm that task8 of the psos suite does not complete. And the vxworks suite succeeds here completely.
Jan
Signature · 2 lines
Siemens AG, Technology Competence Center Embedded Linux
----- Ursprüngliche Mail -----
Quoted 9 lines
Von: "Jan Kiszka" <[email protected]>
Quoted 6 lines
...but it does hook up with smokey, thus will not run as part of xeno-test and our CI. Please fix that - after either resolving the remaining broken tests or disabling them for now. It should be easy to spawn the new tests as separate processes from a smokey instance and visualize their results as part of smokey.
BTW, mutex1 from alchemytest fails for me, all other alchemy tests are fine.
Not sure whether this is related, but on Thursday I ran into a bug in rt_mutex_create(), it returns also positive error numbers.
This seems to be the fix:
lib/alchemy/mutex.c +1 -1
@@ -133,7 +133,7 @@ int rt_mutex_create(RT_MUTEX *mutex, const char *name)pthread_mutexattr_settype (&mattr,PTHREAD_MUTEX_RECURSIVE );/* pthread_mutexattr_setrobust() might not be implemented. */ pthread_mutexattr_setrobust (&mattr,PTHREAD_MUTEX_ROBUST_NP ); - ret =__RT (pthread_mutex_init (&mcb->lock, &mattr)); + ret = -__RT (pthread_mutex_init (&mcb->lock, &mattr));if (ret) {xnfree (mcb); goto out;
Thanks,
//richard
Hi Jan,
I tried integrating the tests into the smokey framework like other ones in the repository. However, the linked tests never show up when listing using smokey -l.
I made sure to place them in the testsuite/smokey directory, correctly link them into the testsuite like the other tests and call smokey_test_plugin() along with a run function spawning the tests.
Do you have any hints for me what to watch out for when integrating the tests so that they correctly show up?
Thanks,
Aaron
Signature · 2 lines
sigma star gmbh | Eduard-Bodem-Gasse 6, 6020 Innsbruck, AUT UID/VAT Nr: ATU 66964118 | FN: 374287y
Quoted 19 lines · Jan Kiszka
Quoted 5 lines · Aaron Marcher
This patch series is an attempt to integrate the currently abandoned alchemy, pSOS and VxWorks tests into Xenomai's test suite. Since each test assumes running as own process a test driver is needed which executes each tests separately.
The driver makes use of the smokey framework....but it does hook up with smokey, thus will not run as part of xeno-test and our CI. Please fix that - after either resolving the remaining broken tests or disabling them for now. It should be easy to spawn the new tests as separate processes from a smokey instance and visualize their results as part of smokey.
Thanks,
JanSignature · 2 lines
Siemens AG, Technology Competence Center Embedded Linux
Quoted 6 lines · Aaron Marcher
Hi Jan,
I tried integrating the tests into the smokey framework like other ones in the repository. However, the linked tests never show up when listing using
smokey -l.
Quoted 7 lines
I made sure to place them in the
testsuite/smokeydirectory, correctly link them into the testsuite like the other tests and callsmokey_test_plugin()along with a run function spawning the tests.Do you have any hints for me what to watch out for when integrating the tests so that they correctly show up?
Hard to say without seeing the changes. When looking for past patterns, check e.g.
https://source.denx.de/Xenomai/xenomai/-/commit/78e4d58be37f8a498a03993f74251af57f11c1b7
Jan
Signature · 2 lines
Siemens AG, Technology Competence Center Embedded Linux
Hi Aaron,
Quoted 11 lines · Jan Kiszka
Quoted 10 lines · Aaron Marcher
Hi Jan,
I tried integrating the tests into the smokey framework like other ones in the repository. However, the linked tests never show up when listing using
smokey -l.I made sure to place them in the
testsuite/smokeydirectory, correctly link them into the testsuite like the other tests and callsmokey_test_plugin()along with a run function spawning the tests.
Quoted 7 lines
Quoted 3 lines
Do you have any hints for me what to watch out for when integrating the tests so that they correctly show up?
Hard to say without seeing the changes. When looking for past patterns, check e.g.
https://source.denx.de/Xenomai/xenomai/-/commit/78e4d58be37f8a498a03993f74251af57f11c1b7
My best guess would be that the Makefile is missing in AC_CONFIG_FILES (2nd hunk within the referenced changes) or that testsuite/smoke/Makefile.am was not updated to include your new test directory.
If futher help is needed it might be a good idea to post a patch tagged as RFC.
Florian
Quoted 3 lines
Jan
v4 cover Revive alchemy, pSOS and VxWorks tests
In reply to Aaron MarcherThis patch series fully integrates the currently abandoned alchemy, pSOS and VxWorks tests into Xenomai's testsuite.
For each test, a Smokey testcase is hooked up.
Aaron Marcher (7):
testsuite: Fully integrate alchemytests into smokey
testsuite: Fully integrate psostests into smokey
testsuite: Fully integrate vwworkstests into smokey
alchemytests: Check pipe-1 asprintf ret value
alchemytests: Fix task-2
alchemytests: Fix task-5 logic
testsuite: disable broken tests
Richard Weinberger (3):
testsuite: Remove old alchemytests Makefile
alchemytests: Fix gcc warning in buffer-1
alchemytests: Fix gcc warning in task-9
configure.ac | 7 +-
lib/alchemy/testsuite/Makefile | 70 ---------
lib/psos/testsuite/Makefile | 49 ------
lib/vxworks/testsuite/Makefile | 43 -----
testsuite/smokey/Makefile.am | 15 +-
testsuite/smokey/alchemytests/Makefile.am | 148 ++++++++++++++++++
.../smokey/alchemytests}/alarm-1.c | 0
testsuite/smokey/alchemytests/alchemytests.c | 55 +++++++
.../smokey/alchemytests/alchemytests_driver.c | 32 ++++
.../smokey/alchemytests}/buffer-1.c | 2 +-
.../smokey/alchemytests}/event-1.c | 0
.../smokey/alchemytests}/heap-1.c | 0
.../smokey/alchemytests}/heap-2.c | 0
.../smokey/alchemytests}/mq-1.c | 0
.../smokey/alchemytests}/mq-2.c | 0
.../smokey/alchemytests}/mq-3.c | 0
.../smokey/alchemytests}/mutex-1.c | 0
.../smokey/alchemytests}/pipe-1.c | 6 +-
.../smokey/alchemytests}/sem-1.c | 0
.../smokey/alchemytests}/sem-2.c | 0
.../smokey/alchemytests}/task-1.c | 0
.../smokey/alchemytests}/task-10.c | 0
.../smokey/alchemytests}/task-2.c | 4 +-
.../smokey/alchemytests}/task-3.c | 0
.../smokey/alchemytests}/task-4.c | 0
.../smokey/alchemytests}/task-5.c | 10 +-
.../smokey/alchemytests}/task-6.c | 0
.../smokey/alchemytests}/task-7.c | 0
.../smokey/alchemytests}/task-8.c | 0
.../smokey/alchemytests}/task-9.c | 2 +-
testsuite/smokey/psostests/Makefile.am | 148 ++++++++++++++++++
.../smokey/psostests}/mq-1.c | 0
.../smokey/psostests}/mq-2.c | 0
.../smokey/psostests}/mq-3.c | 0
testsuite/smokey/psostests/psostests.c | 68 ++++++++
testsuite/smokey/psostests/psostests_driver.c | 33 ++++
.../smokey/psostests}/pt-1.c | 0
.../smokey/psostests}/rn-1.c | 0
.../smokey/psostests}/sem-1.c | 0
.../smokey/psostests}/sem-2.c | 0
.../smokey/psostests}/task-1.c | 0
.../smokey/psostests}/task-2.c | 0
.../smokey/psostests}/task-3.c | 0
.../smokey/psostests}/task-4.c | 0
.../smokey/psostests}/task-5.c | 0
.../smokey/psostests}/task-6.c | 0
.../smokey/psostests}/task-7.c | 0
.../smokey/psostests}/task-8.c | 0
.../smokey/psostests}/task-9.c | 0
.../smokey/psostests}/tm-1.c | 0
.../smokey/psostests}/tm-2.c | 0
.../smokey/psostests}/tm-3.c | 0
.../smokey/psostests}/tm-4.c | 0
.../smokey/psostests}/tm-5.c | 0
.../smokey/psostests}/tm-6.c | 0
.../smokey/psostests}/tm-7.c | 0
testsuite/smokey/vxworkstests/Makefile.am | 94 +++++++++++
.../smokey/vxworkstests}/lst-1.c | 0
.../smokey/vxworkstests}/msgQ-1.c | 0
.../smokey/vxworkstests}/msgQ-2.c | 0
.../smokey/vxworkstests}/msgQ-3.c | 0
.../smokey/vxworkstests}/rng-1.c | 0
.../smokey/vxworkstests}/sem-1.c | 0
.../smokey/vxworkstests}/sem-2.c | 0
.../smokey/vxworkstests}/sem-3.c | 0
.../smokey/vxworkstests}/sem-4.c | 0
.../smokey/vxworkstests}/task-1.c | 0
.../smokey/vxworkstests}/task-2.c | 0
testsuite/smokey/vxworkstests/vxworkstests.c | 45 ++++++
.../smokey/vxworkstests/vxworkstests_driver.c | 32 ++++
.../smokey/vxworkstests}/wd-1.c | 0
71 files changed, 686 insertions(+), 177 deletions(-)
delete mode 100644 lib/alchemy/testsuite/Makefile
delete mode 100644 lib/psos/testsuite/Makefile
delete mode 100644 lib/vxworks/testsuite/Makefile
create mode 100644 testsuite/smokey/alchemytests/Makefile.am
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/alarm-1.c (100%)
create mode 100644 testsuite/smokey/alchemytests/alchemytests.c
create mode 100644 testsuite/smokey/alchemytests/alchemytests_driver.c
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/buffer-1.c (99%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/event-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/heap-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/heap-2.c (100%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mq-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mq-2.c (100%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mq-3.c (100%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mutex-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/pipe-1.c (97%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/sem-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/sem-2.c (100%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-10.c (100%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-2.c (97%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-3.c (100%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-4.c (100%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-5.c (100%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-6.c (100%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-7.c (100%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-8.c (100%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-9.c (97%)
create mode 100644 testsuite/smokey/psostests/Makefile.am
rename {lib/psos/testsuite => testsuite/smokey/psostests}/mq-1.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/mq-2.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/mq-3.c (100%)
create mode 100644 testsuite/smokey/psostests/psostests.c
create mode 100644 testsuite/smokey/psostests/psostests_driver.c
rename {lib/psos/testsuite => testsuite/smokey/psostests}/pt-1.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/rn-1.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/sem-1.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/sem-2.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-1.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-2.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-3.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-4.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-5.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-6.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-7.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-8.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-9.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-1.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-2.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-3.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-4.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-5.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-6.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-7.c (100%)
create mode 100644 testsuite/smokey/vxworkstests/Makefile.am
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/lst-1.c (100%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/msgQ-1.c (100%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/msgQ-2.c (100%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/msgQ-3.c (100%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/rng-1.c (100%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-1.c (100%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-2.c (100%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-3.c (100%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-4.c (100%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/task-1.c (100%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/task-2.c (100%)
create mode 100644 testsuite/smokey/vxworkstests/vxworkstests.c
create mode 100644 testsuite/smokey/vxworkstests/vxworkstests_driver.c
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/wd-1.c (100%)Signature · 1 line
2.35.3
PATCH v4 1/10 testsuite: Fully integrate alchemytests into smokey
This is the very first step to have the alchemy tests embedded into our testsuite.
Build them using Xenomai's build system and hook them up using Smokey. Every test binary has it's own respective testcase in the testsuite.
---
configure.ac | 7 +-
testsuite/Makefile.am | 8 +-
testsuite/smokey/Makefile.am | 9 +-
testsuite/smokey/alchemytests/Makefile.am | 148 ++++++++++++++++++
.../smokey/alchemytests}/alarm-1.c | 0
testsuite/smokey/alchemytests/alchemytests.c | 55 +++++++
.../smokey/alchemytests/alchemytests_driver.c | 32 ++++
.../smokey/alchemytests}/buffer-1.c | 0
.../smokey/alchemytests}/event-1.c | 0
.../smokey/alchemytests}/heap-1.c | 0
.../smokey/alchemytests}/heap-2.c | 0
.../smokey/alchemytests}/mq-1.c | 0
.../smokey/alchemytests}/mq-2.c | 0
.../smokey/alchemytests}/mq-3.c | 0
.../smokey/alchemytests}/mutex-1.c | 0
.../smokey/alchemytests}/pipe-1.c | 0
.../smokey/alchemytests}/sem-1.c | 0
.../smokey/alchemytests}/sem-2.c | 0
.../smokey/alchemytests}/task-1.c | 0
.../smokey/alchemytests}/task-10.c | 0
.../smokey/alchemytests}/task-2.c | 0
.../smokey/alchemytests}/task-3.c | 0
.../smokey/alchemytests}/task-4.c | 0
.../smokey/alchemytests}/task-5.c | 0
.../smokey/alchemytests}/task-6.c | 0
.../smokey/alchemytests}/task-7.c | 0
.../smokey/alchemytests}/task-8.c | 0
.../smokey/alchemytests}/task-9.c | 0
28 files changed, 252 insertions(+), 7 deletions(-)
create mode 100644 testsuite/smokey/alchemytests/Makefile.am
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/alarm-1.c (100%)
create mode 100644 testsuite/smokey/alchemytests/alchemytests.c
create mode 100644 testsuite/smokey/alchemytests/alchemytests_driver.c
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/buffer-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/event-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/heap-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/heap-2.c (100%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mq-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mq-2.c (100%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mq-3.c (100%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mutex-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/pipe-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/sem-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/sem-2.c (100%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-1.c (100%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-10.c (100%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-2.c (100%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-3.c (100%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-4.c (100%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-5.c (100%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-6.c (100%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-7.c (100%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-8.c (100%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-9.c (100%)configure.ac +5 -2
@@ -1041,10 +1041,13 @@ AC_CONFIG_FILES([ \ testsuite/smokey/cpu-affinity/Makefile \ testsuite/smokey/gdb/Makefile \ testsuite/smokey/y2038/Makefile \ - testsuite/smokey/can/Makefile - testsuite/smokey/x86io/Makefile + testsuite/smokey/can/Makefile \ + testsuite/smokey/x86io/Makefile \ + testsuite/smokey/alchemytests/Makefile \ testsuite/clocktest/Makefile \ testsuite/xeno-test/Makefile \ + testsuite/psostests/Makefile \ + testsuite/vxworkstests/Makefile \ utils/Makefile \ utils/hdb/Makefile \ utils/can/Makefile \
testsuite/Makefile.am +6 -2
@@ -7,7 +7,9 @@ SUBDIRS += \ gpiotest \ spitest \ switchtest \ - xeno-test + xeno-test \ + psostests \ + vxworkstests endif DIST_SUBDIRS = \
@@ -18,4 +20,6 @@ DIST_SUBDIRS = \ smokey \ spitest \ switchtest \ - xeno-test + xeno-test \ + psostests \ + vxworkstests
testsuite/smokey/Makefile.am +6 -3
@@ -40,12 +40,14 @@ COBALT_SUBDIRS = \ tsc \ vdso-access \ xddp \ - y2038 + y2038 \ + alchemytests MERCURY_SUBDIRS = \ memory-heapmem \ memory-tlsf \ - memcheck + memcheck \ + alchemytests DIST_SUBDIRS = \ arith \
@@ -80,7 +82,8 @@ DIST_SUBDIRS = \ tsc \ vdso-access \ xddp \ - y2038 + y2038 \ + alchemytests if XENO_X86 DIST_SUBDIRS += x86io
testsuite/smokey/alchemytests/Makefile.am new file +148 -0
148 lines not on this page · raw message
testsuite/smokey/alchemytests/alarm-1.c renamed from lib/alchemy/testsuite/alarm-1.c +0 -0
testsuite/smokey/alchemytests/alchemytests.c new file +55 -0
55 lines not on this page · raw message
testsuite/smokey/alchemytests/alchemytests_driver.c new file +32 -0
@@ -0,0 +1,32 @@ +#include <error.h> +#include <libgen.h> +#include <smokey/smokey.h> +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> + +int main (int argc,char *const argv[]) +{ +struct smokey_test *t; +int ret, fails =0 ; + +if (pvlist_empty (&smokey_test_list)) +return 0 ; + +for_each_smokey_test (t) { + ret = t->run (t, argc, argv); +if (ret) { + fails++; +if (smokey_keep_going) +continue ; +if (smokey_verbose_mode) +error (1 , -ret,"test %s failed" , t->name); +return 1 ; + } +smokey_note ("%s OK" , t->name); + } + +return fails !=0 ; +}
testsuite/smokey/alchemytests/buffer-1.c renamed from lib/alchemy/testsuite/buffer-1.c +0 -0
testsuite/smokey/alchemytests/event-1.c renamed from lib/alchemy/testsuite/event-1.c +0 -0
testsuite/smokey/alchemytests/heap-1.c renamed from lib/alchemy/testsuite/heap-1.c +0 -0
testsuite/smokey/alchemytests/heap-2.c renamed from lib/alchemy/testsuite/heap-2.c +0 -0
testsuite/smokey/alchemytests/mq-1.c renamed from lib/alchemy/testsuite/mq-1.c +0 -0
testsuite/smokey/alchemytests/mq-2.c renamed from lib/alchemy/testsuite/mq-2.c +0 -0
testsuite/smokey/alchemytests/mq-3.c renamed from lib/alchemy/testsuite/mq-3.c +0 -0
testsuite/smokey/alchemytests/mutex-1.c renamed from lib/alchemy/testsuite/mutex-1.c +0 -0
testsuite/smokey/alchemytests/pipe-1.c renamed from lib/alchemy/testsuite/pipe-1.c +0 -0
testsuite/smokey/alchemytests/sem-1.c renamed from lib/alchemy/testsuite/sem-1.c +0 -0
testsuite/smokey/alchemytests/sem-2.c renamed from lib/alchemy/testsuite/sem-2.c +0 -0
testsuite/smokey/alchemytests/task-1.c renamed from lib/alchemy/testsuite/task-1.c +0 -0
testsuite/smokey/alchemytests/task-10.c renamed from lib/alchemy/testsuite/task-10.c +0 -0
testsuite/smokey/alchemytests/task-2.c renamed from lib/alchemy/testsuite/task-2.c +0 -0
testsuite/smokey/alchemytests/task-3.c renamed from lib/alchemy/testsuite/task-3.c +0 -0
testsuite/smokey/alchemytests/task-4.c renamed from lib/alchemy/testsuite/task-4.c +0 -0
testsuite/smokey/alchemytests/task-5.c renamed from lib/alchemy/testsuite/task-5.c +0 -0
testsuite/smokey/alchemytests/task-6.c renamed from lib/alchemy/testsuite/task-6.c +0 -0
testsuite/smokey/alchemytests/task-7.c renamed from lib/alchemy/testsuite/task-7.c +0 -0
testsuite/smokey/alchemytests/task-8.c renamed from lib/alchemy/testsuite/task-8.c +0 -0
testsuite/smokey/alchemytests/task-9.c renamed from lib/alchemy/testsuite/task-9.c +0 -0
Signature · 1 line
2.35.3
Re: [PATCH 01/10] testsuite: Fully integrate alchemytests into smokey
testsuite/smokey/alchemytests/task-9.c
Quoted 480 lines · Aaron Marcher
This is the very first step to have the alchemy tests embedded into our testsuite.
Build them using Xenomai's build system and hook them up using Smokey. Every test binary has it's own respective testcase in the testsuite.
Signed-off-by Richard Weinberger <[email protected]>Signed-off-by Aaron Marcher <[email protected]>--- configure.ac | 7 +- testsuite/Makefile.am | 8 +- testsuite/smokey/Makefile.am | 9 +- testsuite/smokey/alchemytests/Makefile.am | 148 ++++++++++++++++++ .../smokey/alchemytests}/alarm-1.c | 0 testsuite/smokey/alchemytests/alchemytests.c | 55 +++++++ .../smokey/alchemytests/alchemytests_driver.c | 32 ++++ .../smokey/alchemytests}/buffer-1.c | 0 .../smokey/alchemytests}/event-1.c | 0 .../smokey/alchemytests}/heap-1.c | 0 .../smokey/alchemytests}/heap-2.c | 0 .../smokey/alchemytests}/mq-1.c | 0 .../smokey/alchemytests}/mq-2.c | 0 .../smokey/alchemytests}/mq-3.c | 0 .../smokey/alchemytests}/mutex-1.c | 0 .../smokey/alchemytests}/pipe-1.c | 0 .../smokey/alchemytests}/sem-1.c | 0 .../smokey/alchemytests}/sem-2.c | 0 .../smokey/alchemytests}/task-1.c | 0 .../smokey/alchemytests}/task-10.c | 0 .../smokey/alchemytests}/task-2.c | 0 .../smokey/alchemytests}/task-3.c | 0 .../smokey/alchemytests}/task-4.c | 0 .../smokey/alchemytests}/task-5.c | 0 .../smokey/alchemytests}/task-6.c | 0 .../smokey/alchemytests}/task-7.c | 0 .../smokey/alchemytests}/task-8.c | 0 .../smokey/alchemytests}/task-9.c | 0 28 files changed, 252 insertions(+), 7 deletions(-) create mode 100644 testsuite/smokey/alchemytests/Makefile.am rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/alarm-1.c (100%) create mode 100644 testsuite/smokey/alchemytests/alchemytests.c create mode 100644 testsuite/smokey/alchemytests/alchemytests_driver.c rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/buffer-1.c (100%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/event-1.c (100%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/heap-1.c (100%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/heap-2.c (100%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mq-1.c (100%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mq-2.c (100%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mq-3.c (100%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mutex-1.c (100%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/pipe-1.c (100%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/sem-1.c (100%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/sem-2.c (100%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-1.c (100%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-10.c (100%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-2.c (100%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-3.c (100%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-4.c (100%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-5.c (100%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-6.c (100%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-7.c (100%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-8.c (100%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-9.c (100%)configure.ac +5
-2@@ -1041,10 +1041,13 @@ AC_CONFIG_FILES([ \ testsuite/smokey/cpu-affinity/Makefile \ testsuite/smokey/gdb/Makefile \ testsuite/smokey/y2038/Makefile \ - testsuite/smokey/can/Makefile - testsuite/smokey/x86io/Makefile + testsuite/smokey/can/Makefile \ + testsuite/smokey/x86io/Makefile \ + testsuite/smokey/alchemytests/Makefile \ testsuite/clocktest/Makefile \ testsuite/xeno-test/Makefile \ + testsuite/psostests/Makefile \ + testsuite/vxworkstests/Makefile \ utils/Makefile \ utils/hdb/Makefile \ utils/can/Makefile \testsuite/Makefile.am +6
-2@@ -7,7 +7,9 @@ SUBDIRS += \ gpiotest \ spitest \ switchtest \ - xeno-test + xeno-test \ + psostests \ + vxworkstests endif DIST_SUBDIRS = \@@ -18,4 +20,6 @@ DIST_SUBDIRS = \ smokey \ spitest \ switchtest \ - xeno-test + xeno-test \ + psostests \ + vxworksteststestsuite/smokey/Makefile.am +6
-3@@ -40,12 +40,14 @@ COBALT_SUBDIRS = \ tsc \ vdso-access \ xddp \ - y2038 + y2038 \ + alchemytests MERCURY_SUBDIRS = \ memory-heapmem \ memory-tlsf \ - memcheck + memcheck \ + alchemytests DIST_SUBDIRS = \ arith \@@ -80,7 +82,8 @@ DIST_SUBDIRS = \ tsc \ vdso-access \ xddp \ - y2038 + y2038 \ + alchemytests if XENO_X86 DIST_SUBDIRS += x86iotestsuite/smokey/alchemytests/Makefile.am new file +148
-0@@ -0,0 +1,148 @@ +testdir = @XENO_TEST_DIR@ +noinst_LIBRARIES = libalchemytests.a + +libalchemytests_a_SOURCES = alchemytests.c +libalchemytests_a_CPPFLAGS = \ + @XENO_USER_CFLAGS@ \ + -I$(top_srcdir) \ + -I$(top_srcdir)/include \ + -DXENO_TEST_DIR='"$(XENO_TEST_DIR)"' + +CCLD = $(top_srcdir)/scripts/wrap-link.sh $(CC) + +test_PROGRAMS = \ + alchemytests \ + alchemytests_alarm1 \ + alchemytests_buffer1 \ + alchemytests_event1 \ + alchemytests_heap1 \ + alchemytests_heap2 \ + alchemytests_mq1 \ + alchemytests_mq2 \ + alchemytests_mq3 \ + alchemytests_mutex1 \ + alchemytests_pipe1 \ + alchemytests_sem1 \ + alchemytests_sem2 \ + alchemytests_task1 \ + alchemytests_task2 \ + alchemytests_task3 \ + alchemytests_task4 \ + alchemytests_task5 \ + alchemytests_task6 \ + alchemytests_task7 \ + alchemytests_task8 \ + alchemytests_task9 \ + alchemytests_task10 + +alchemycppflags = \ + $(XENO_USER_CFLAGS) \ + -I$(top_srcdir)/include + +alchemyldadd = \ + ../../../lib/alchemy/libalchemy@[email protected] \ + ../../../lib/copperplate/libcopperplate@[email protected] \ + @XENO_CORE_LDADD@ \ + @XENO_USER_LDADD@ \ + -lpthread -lrt -lm + +alchemytests_SOURCES = alchemytests_driver.c +alchemytests_CPPFLAGS = \ + $(XENO_USER_CFLAGS) \ + -I$(top_srcdir)/include +alchemytests_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_LDADD = \ + ../../../lib/smokey/libsmokey@[email protected] \ + @XENO_CORE_LDADD@ \ + @XENO_USER_LDADD@ \ + -lpthread -lrt + +alchemytests_alarm1_SOURCES = alarm-1.c +alchemytests_alarm1_CPPFLAGS = $(alchemycppflags) +alchemytests_alarm1_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_alarm1_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_event1_SOURCES = event-1.c +alchemytests_event1_CPPFLAGS = $(alchemycppflags) +alchemytests_event1_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_event1_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_heap1_SOURCES = heap-1.c +alchemytests_heap1_CPPFLAGS = $(alchemycppflags) +alchemytests_heap1_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_heap1_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_heap2_SOURCES = heap-2.c +alchemytests_heap2_CPPFLAGS = $(alchemycppflags) +alchemytests_heap2_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_heap2_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_buffer1_SOURCES = buffer-1.c +alchemytests_buffer1_CPPFLAGS = $(alchemycppflags) +alchemytests_buffer1_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_buffer1_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_mutex1_SOURCES = mutex-1.c +alchemytests_mutex1_CPPFLAGS = $(alchemycppflags) +alchemytests_mutex1_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_mutex1_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_pipe1_SOURCES = pipe-1.c +alchemytests_pipe1_CPPFLAGS = $(alchemycppflags) +alchemytests_pipe1_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_pipe1_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_mq1_SOURCES = mq-1.c +alchemytests_mq1_CPPFLAGS = $(alchemycppflags) +alchemytests_mq1_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_mq1_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_mq2_SOURCES = mq-2.c +alchemytests_mq2_CPPFLAGS = $(alchemycppflags) +alchemytests_mq2_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_mq2_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_mq3_SOURCES = mq-3.c +alchemytests_mq3_CPPFLAGS = $(alchemycppflags) +alchemytests_mq3_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_mq3_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_sem1_SOURCES = sem-1.c +alchemytests_sem1_CPPFLAGS = $(alchemycppflags) +alchemytests_sem1_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_sem1_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_sem2_SOURCES = sem-2.c +alchemytests_sem2_CPPFLAGS = $(alchemycppflags) +alchemytests_sem2_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_sem2_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_task1_SOURCES = task-1.c +alchemytests_task1_CPPFLAGS = $(alchemycppflags) +alchemytests_task1_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_task1_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_task2_SOURCES = task-2.c +alchemytests_task2_CPPFLAGS = $(alchemycppflags) +alchemytests_task2_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_task2_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_task3_SOURCES = task-3.c +alchemytests_task3_CPPFLAGS = $(alchemycppflags) +alchemytests_task3_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_task3_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_task4_SOURCES = task-4.c +alchemytests_task4_CPPFLAGS = $(alchemycppflags) +alchemytests_task4_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_task4_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_task5_SOURCES = task-5.c +alchemytests_task5_CPPFLAGS = $(alchemycppflags) +alchemytests_task5_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_task5_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_task6_SOURCES = task-6.c +alchemytests_task6_CPPFLAGS = $(alchemycppflags) +alchemytests_task6_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_task6_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_task7_SOURCES = task-7.c +alchemytests_task7_CPPFLAGS = $(alchemycppflags) +alchemytests_task7_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_task7_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_task8_SOURCES = task-8.c +alchemytests_task8_CPPFLAGS = $(alchemycppflags) +alchemytests_task8_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_task8_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_task9_SOURCES = task-9.c +alchemytests_task9_CPPFLAGS = $(alchemycppflags) +alchemytests_task9_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_task9_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_task10_SOURCES = task-10.c +alchemytests_task10_CPPFLAGS = $(alchemycppflags) +alchemytests_task10_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_task10_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +testsuite/smokey/alchemytests/alarm-1.c renamed from lib/alchemy/testsuite/alarm-1.c +0
-0testsuite/smokey/alchemytests/alchemytests.c new file +55
-0@@ -0,0 +1,55 @@ +#include <error.h> +#include <libgen.h> +#include <smokey/smokey.h> +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> + +#define TEST (name) \ + smokey_test_plugin(name, SMOKEY_NOARGS, "Run external test"); \ + static int run_##name(struct smokey_test *t, int argc, char *const argv[]) \ + { \ + return __run_extprog(t, argc, argv); \ + } + +static int __run_extprog (struct smokey_test *t,int argc,char *const argv[]) +{ +int ret; +char *tst_path; + + ret =asprintf (&tst_path,"%s/%s --cpu-affinity=0" ,XENO_TEST_DIR , t->name); +if (ret ==-1 ) +return -ENOMEM ; + + ret =system (tst_path); +free (tst_path); + +return ret; +} + +TEST(alchemytests) +TEST(alchemytests_alarm1) +TEST(alchemytests_buffer1) +TEST(alchemytests_event1) +TEST(alchemytests_heap1) +TEST(alchemytests_heap2) +TEST(alchemytests_mq1) +TEST(alchemytests_mq2) +TEST(alchemytests_mq3) +TEST(alchemytests_mutex1) +TEST(alchemytests_pipe1) +TEST(alchemytests_sem1) +TEST(alchemytests_sem2) +TEST(alchemytests_task1) +TEST(alchemytests_task2) +TEST(alchemytests_task3) +TEST(alchemytests_task4) +TEST(alchemytests_task5) +TEST(alchemytests_task6) +TEST(alchemytests_task7) +TEST(alchemytests_task8) +TEST(alchemytests_task9) +TEST(alchemytests_task10) +testsuite/smokey/alchemytests/alchemytests_driver.c new file +32
-0@@ -0,0 +1,32 @@ +#include <error.h> +#include <libgen.h> +#include <smokey/smokey.h> +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> + +int main (int argc,char *const argv[]) +{ +struct smokey_test *t; +int ret, fails =0 ; + +if (pvlist_empty (&smokey_test_list)) +return 0 ; + +for_each_smokey_test (t) { + ret = t->run (t, argc, argv); +if (ret) { + fails++; +if (smokey_keep_going) +continue ; +if (smokey_verbose_mode) +error (1 , -ret,"test %s failed" , t->name); +return 1 ; + } +smokey_note ("%s OK" , t->name); + } + +return fails !=0 ; +}testsuite/smokey/alchemytests/buffer-1.c renamed from lib/alchemy/testsuite/buffer-1.c +0
-0testsuite/smokey/alchemytests/event-1.c renamed from lib/alchemy/testsuite/event-1.c +0
-0testsuite/smokey/alchemytests/heap-1.c renamed from lib/alchemy/testsuite/heap-1.c +0
-0testsuite/smokey/alchemytests/heap-2.c renamed from lib/alchemy/testsuite/heap-2.c +0
-0testsuite/smokey/alchemytests/mq-1.c renamed from lib/alchemy/testsuite/mq-1.c +0
-0testsuite/smokey/alchemytests/mq-2.c renamed from lib/alchemy/testsuite/mq-2.c +0
-0testsuite/smokey/alchemytests/mq-3.c renamed from lib/alchemy/testsuite/mq-3.c +0
-0testsuite/smokey/alchemytests/mutex-1.c renamed from lib/alchemy/testsuite/mutex-1.c +0
-0testsuite/smokey/alchemytests/pipe-1.c renamed from lib/alchemy/testsuite/pipe-1.c +0
-0testsuite/smokey/alchemytests/sem-1.c renamed from lib/alchemy/testsuite/sem-1.c +0
-0testsuite/smokey/alchemytests/sem-2.c renamed from lib/alchemy/testsuite/sem-2.c +0
-0testsuite/smokey/alchemytests/task-1.c renamed from lib/alchemy/testsuite/task-1.c +0
-0testsuite/smokey/alchemytests/task-10.c renamed from lib/alchemy/testsuite/task-10.c +0
-0testsuite/smokey/alchemytests/task-2.c renamed from lib/alchemy/testsuite/task-2.c +0
-0testsuite/smokey/alchemytests/task-3.c renamed from lib/alchemy/testsuite/task-3.c +0
-0testsuite/smokey/alchemytests/task-4.c renamed from lib/alchemy/testsuite/task-4.c +0
-0testsuite/smokey/alchemytests/task-5.c renamed from lib/alchemy/testsuite/task-5.c +0
-0testsuite/smokey/alchemytests/task-6.c renamed from lib/alchemy/testsuite/task-6.c +0
-0testsuite/smokey/alchemytests/task-7.c renamed from lib/alchemy/testsuite/task-7.c +0
-0testsuite/smokey/alchemytests/task-8.c renamed from lib/alchemy/testsuite/task-8.c +0
-0testsuite/smokey/alchemytests/task-9.c renamed from lib/alchemy/testsuite/task-9.c +0
-0
Could we also get a copyright header for new files, please? At least an SPDX-License-Identifier line.
Jan
Signature · 2 lines
Siemens AG, Technology Linux Expert Center
PATCH v4 2/10 testsuite: Fully integrate psostests into smokey
In reply to Aaron MarcherJust like for alchemytests, integrate them into our testsuite.
---
configure.ac | 2 +-
lib/psos/testsuite/Makefile | 49 ------
testsuite/Makefile.am | 2 -
testsuite/smokey/Makefile.am | 9 +-
testsuite/smokey/psostests/Makefile.am | 148 ++++++++++++++++++
.../smokey/psostests}/mq-1.c | 0
.../smokey/psostests}/mq-2.c | 0
.../smokey/psostests}/mq-3.c | 0
testsuite/smokey/psostests/psostests.c | 56 +++++++
testsuite/smokey/psostests/psostests_driver.c | 33 ++++
.../smokey/psostests}/pt-1.c | 0
.../smokey/psostests}/rn-1.c | 0
.../smokey/psostests}/sem-1.c | 0
.../smokey/psostests}/sem-2.c | 0
.../smokey/psostests}/task-1.c | 0
.../smokey/psostests}/task-2.c | 0
.../smokey/psostests}/task-3.c | 0
.../smokey/psostests}/task-4.c | 0
.../smokey/psostests}/task-5.c | 0
.../smokey/psostests}/task-6.c | 0
.../smokey/psostests}/task-7.c | 0
.../smokey/psostests}/task-8.c | 0
.../smokey/psostests}/task-9.c | 0
.../smokey/psostests}/tm-1.c | 0
.../smokey/psostests}/tm-2.c | 0
.../smokey/psostests}/tm-3.c | 0
.../smokey/psostests}/tm-4.c | 0
.../smokey/psostests}/tm-5.c | 0
.../smokey/psostests}/tm-6.c | 0
.../smokey/psostests}/tm-7.c | 0
30 files changed, 244 insertions(+), 55 deletions(-)
delete mode 100644 lib/psos/testsuite/Makefile
create mode 100644 testsuite/smokey/psostests/Makefile.am
rename {lib/psos/testsuite => testsuite/smokey/psostests}/mq-1.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/mq-2.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/mq-3.c (100%)
create mode 100644 testsuite/smokey/psostests/psostests.c
create mode 100644 testsuite/smokey/psostests/psostests_driver.c
rename {lib/psos/testsuite => testsuite/smokey/psostests}/pt-1.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/rn-1.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/sem-1.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/sem-2.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-1.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-2.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-3.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-4.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-5.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-6.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-7.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-8.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-9.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-1.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-2.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-3.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-4.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-5.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-6.c (100%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-7.c (100%)configure.ac +1 -1
@@ -1044,9 +1044,9 @@ AC_CONFIG_FILES([ \ testsuite/smokey/can/Makefile \ testsuite/smokey/x86io/Makefile \ testsuite/smokey/alchemytests/Makefile \ + testsuite/smokey/psostests/Makefile \ testsuite/clocktest/Makefile \ testsuite/xeno-test/Makefile \ - testsuite/psostests/Makefile \ testsuite/vxworkstests/Makefile \ utils/Makefile \ utils/hdb/Makefile \
lib/psos/testsuite/Makefile deleted +0 -49
49 lines not on this page · raw message
testsuite/Makefile.am +0 -2
@@ -8,7 +8,6 @@ SUBDIRS += \ spitest \ switchtest \ xeno-test \ - psostests \ vxworkstests endif
@@ -21,5 +20,4 @@ DIST_SUBDIRS = \ spitest \ switchtest \ xeno-test \ - psostests \ vxworkstests
testsuite/smokey/Makefile.am +6 -3
@@ -41,13 +41,15 @@ COBALT_SUBDIRS = \ vdso-access \ xddp \ y2038 \ - alchemytests + alchemytests \ + psostests MERCURY_SUBDIRS = \ memory-heapmem \ memory-tlsf \ memcheck \ - alchemytests + alchemytests \ + psostests DIST_SUBDIRS = \ arith \
@@ -83,7 +85,8 @@ DIST_SUBDIRS = \ vdso-access \ xddp \ y2038 \ - alchemytests + alchemytests \ + psostests if XENO_X86 DIST_SUBDIRS += x86io
testsuite/smokey/psostests/Makefile.am new file +148 -0
148 lines not on this page · raw message
testsuite/smokey/psostests/mq-1.c renamed from lib/psos/testsuite/mq-1.c +0 -0
testsuite/smokey/psostests/mq-2.c renamed from lib/psos/testsuite/mq-2.c +0 -0
testsuite/smokey/psostests/mq-3.c renamed from lib/psos/testsuite/mq-3.c +0 -0
testsuite/smokey/psostests/psostests.c new file +56 -0
56 lines not on this page · raw message
testsuite/smokey/psostests/psostests_driver.c new file +33 -0
@@ -0,0 +1,33 @@ +#include <error.h> +#include <libgen.h> +#include <smokey/smokey.h> +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> + +int main (int argc,char *const argv[]) +{ +struct smokey_test *t; +int ret, fails =0 ; + +if (pvlist_empty (&smokey_test_list)) +return 0 ; + +for_each_smokey_test (t) { + ret = t->run (t, argc, argv); +if (ret) { + fails++; +if (smokey_keep_going) +continue ; +if (smokey_verbose_mode) +error (1 , -ret,"test %s failed" , t->name); +return 1 ; + } +smokey_note ("%s OK" , t->name); + } + +return fails !=0 ; +} +
testsuite/smokey/psostests/pt-1.c renamed from lib/psos/testsuite/pt-1.c +0 -0
testsuite/smokey/psostests/rn-1.c renamed from lib/psos/testsuite/rn-1.c +0 -0
testsuite/smokey/psostests/sem-1.c renamed from lib/psos/testsuite/sem-1.c +0 -0
testsuite/smokey/psostests/sem-2.c renamed from lib/psos/testsuite/sem-2.c +0 -0
testsuite/smokey/psostests/task-1.c renamed from lib/psos/testsuite/task-1.c +0 -0
testsuite/smokey/psostests/task-2.c renamed from lib/psos/testsuite/task-2.c +0 -0
testsuite/smokey/psostests/task-3.c renamed from lib/psos/testsuite/task-3.c +0 -0
testsuite/smokey/psostests/task-4.c renamed from lib/psos/testsuite/task-4.c +0 -0
testsuite/smokey/psostests/task-5.c renamed from lib/psos/testsuite/task-5.c +0 -0
testsuite/smokey/psostests/task-6.c renamed from lib/psos/testsuite/task-6.c +0 -0
testsuite/smokey/psostests/task-7.c renamed from lib/psos/testsuite/task-7.c +0 -0
testsuite/smokey/psostests/task-8.c renamed from lib/psos/testsuite/task-8.c +0 -0
testsuite/smokey/psostests/task-9.c renamed from lib/psos/testsuite/task-9.c +0 -0
testsuite/smokey/psostests/tm-1.c renamed from lib/psos/testsuite/tm-1.c +0 -0
testsuite/smokey/psostests/tm-2.c renamed from lib/psos/testsuite/tm-2.c +0 -0
testsuite/smokey/psostests/tm-3.c renamed from lib/psos/testsuite/tm-3.c +0 -0
testsuite/smokey/psostests/tm-4.c renamed from lib/psos/testsuite/tm-4.c +0 -0
testsuite/smokey/psostests/tm-5.c renamed from lib/psos/testsuite/tm-5.c +0 -0
testsuite/smokey/psostests/tm-6.c renamed from lib/psos/testsuite/tm-6.c +0 -0
testsuite/smokey/psostests/tm-7.c renamed from lib/psos/testsuite/tm-7.c +0 -0
Signature · 1 line
2.35.3
PATCH v4 3/10 testsuite: Fully integrate vwworkstests into smokey
In reply to Aaron MarcherSame as for alchemytests and psostests.
---
configure.ac | 2 +-
lib/vxworks/testsuite/Makefile | 43 ---------
testsuite/Makefile.am | 6 +-
testsuite/smokey/Makefile.am | 3 +
testsuite/smokey/vxworkstests/Makefile.am | 94 +++++++++++++++++++
.../smokey/vxworkstests}/lst-1.c | 0
.../smokey/vxworkstests}/msgQ-1.c | 0
.../smokey/vxworkstests}/msgQ-2.c | 0
.../smokey/vxworkstests}/msgQ-3.c | 0
.../smokey/vxworkstests}/rng-1.c | 0
.../smokey/vxworkstests}/sem-1.c | 0
.../smokey/vxworkstests}/sem-2.c | 0
.../smokey/vxworkstests}/sem-3.c | 0
.../smokey/vxworkstests}/sem-4.c | 0
.../smokey/vxworkstests}/task-1.c | 0
.../smokey/vxworkstests}/task-2.c | 0
testsuite/smokey/vxworkstests/vxworkstests.c | 45 +++++++++
.../smokey/vxworkstests/vxworkstests_driver.c | 32 +++++++
.../smokey/vxworkstests}/wd-1.c | 0
19 files changed, 177 insertions(+), 48 deletions(-)
delete mode 100644 lib/vxworks/testsuite/Makefile
create mode 100644 testsuite/smokey/vxworkstests/Makefile.am
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/lst-1.c (100%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/msgQ-1.c (100%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/msgQ-2.c (100%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/msgQ-3.c (100%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/rng-1.c (100%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-1.c (100%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-2.c (100%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-3.c (100%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-4.c (100%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/task-1.c (100%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/task-2.c (100%)
create mode 100644 testsuite/smokey/vxworkstests/vxworkstests.c
create mode 100644 testsuite/smokey/vxworkstests/vxworkstests_driver.c
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/wd-1.c (100%)configure.ac +1 -1
@@ -1045,9 +1045,9 @@ AC_CONFIG_FILES([ \ testsuite/smokey/x86io/Makefile \ testsuite/smokey/alchemytests/Makefile \ testsuite/smokey/psostests/Makefile \ + testsuite/smokey/vxworkstests/Makefile \ testsuite/clocktest/Makefile \ testsuite/xeno-test/Makefile \ - testsuite/vxworkstests/Makefile \ utils/Makefile \ utils/hdb/Makefile \ utils/can/Makefile \
lib/vxworks/testsuite/Makefile deleted +0 -43
43 lines not on this page · raw message
testsuite/Makefile.am +2 -4
@@ -7,8 +7,7 @@ SUBDIRS += \ gpiotest \ spitest \ switchtest \ - xeno-test \ - vxworkstests + xeno-test endif DIST_SUBDIRS = \
@@ -19,5 +18,4 @@ DIST_SUBDIRS = \ smokey \ spitest \ switchtest \ - xeno-test \ - vxworkstests + xeno-test
testsuite/smokey/Makefile.am +3 -0
@@ -42,6 +42,7 @@ COBALT_SUBDIRS = \ xddp \ y2038 \ alchemytests \ + vxworkstests \ psostests MERCURY_SUBDIRS = \
@@ -49,6 +50,7 @@ MERCURY_SUBDIRS = \ memory-tlsf \ memcheck \ alchemytests \ + vxworkstests \ psostests DIST_SUBDIRS = \
@@ -86,6 +88,7 @@ DIST_SUBDIRS = \ xddp \ y2038 \ alchemytests \ + vxworkstests \ psostests if XENO_X86
testsuite/smokey/vxworkstests/Makefile.am new file +94 -0
94 lines not on this page · raw message
testsuite/smokey/vxworkstests/lst-1.c renamed from lib/vxworks/testsuite/lst-1.c +0 -0
testsuite/smokey/vxworkstests/msgQ-1.c renamed from lib/vxworks/testsuite/msgQ-1.c +0 -0
testsuite/smokey/vxworkstests/msgQ-2.c renamed from lib/vxworks/testsuite/msgQ-2.c +0 -0
testsuite/smokey/vxworkstests/msgQ-3.c renamed from lib/vxworks/testsuite/msgQ-3.c +0 -0
testsuite/smokey/vxworkstests/rng-1.c renamed from lib/vxworks/testsuite/rng-1.c +0 -0
testsuite/smokey/vxworkstests/sem-1.c renamed from lib/vxworks/testsuite/sem-1.c +0 -0
testsuite/smokey/vxworkstests/sem-2.c renamed from lib/vxworks/testsuite/sem-2.c +0 -0
testsuite/smokey/vxworkstests/sem-3.c renamed from lib/vxworks/testsuite/sem-3.c +0 -0
testsuite/smokey/vxworkstests/sem-4.c renamed from lib/vxworks/testsuite/sem-4.c +0 -0
testsuite/smokey/vxworkstests/task-1.c renamed from lib/vxworks/testsuite/task-1.c +0 -0
testsuite/smokey/vxworkstests/task-2.c renamed from lib/vxworks/testsuite/task-2.c +0 -0
testsuite/smokey/vxworkstests/vxworkstests.c new file +45 -0
45 lines not on this page · raw message
testsuite/smokey/vxworkstests/vxworkstests_driver.c new file +32 -0
@@ -0,0 +1,32 @@ +#include <error.h> +#include <libgen.h> +#include <smokey/smokey.h> +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> + +int main (int argc,char *const argv[]) +{ +struct smokey_test *t; +int ret, fails =0 ; + +if (pvlist_empty (&smokey_test_list)) +return 0 ; + +for_each_smokey_test (t) { + ret = t->run (t, argc, argv); +if (ret) { + fails++; +if (smokey_keep_going) +continue ; +if (smokey_verbose_mode) +error (1 , -ret,"test %s failed" , t->name); +return 1 ; + } +smokey_note ("%s OK" , t->name); + } + +return fails !=0 ; +}
testsuite/smokey/vxworkstests/wd-1.c renamed from lib/vxworks/testsuite/wd-1.c +0 -0
Signature · 1 line
2.35.3
PATCH v4 4/10 testsuite: Remove old alchemytests Makefile
In reply to Aaron MarcherFrom: Richard Weinberger <[email protected]>
--- lib/alchemy/testsuite/Makefile | 70 ---------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 lib/alchemy/testsuite/Makefile
lib/alchemy/testsuite/Makefile deleted +0 -70
@@ -1,70 +0,0 @@ -ifeq ($(DESTDIR),) -XENO_CONFIG=xeno-config -else -XENO_CONFIG=$(DESTDIR)/bin/xeno-config -endif - -prefix := $(shell DESTDIR=$(DESTDIR) $(XENO_CONFIG) --prefix) -solibs := $(shell DESTDIR=$(DESTDIR) $(XENO_CONFIG) --libdir) -core := $(shell DESTDIR=$(DESTDIR) $(XENO_CONFIG) --core) - -ifeq ($(prefix),) -$(error Please add <xenomai-install-path>/bin to your PATH variable or specify DESTDIR) -endif - -cobalt-only := pipe-1 -mercury-only := -core-specific = $($(core)-only) - -TESTS := \ - task-1 \ - task-2 \ - task-3 \ - task-4 \ - task-5 \ - task-6 \ - task-7 \ - task-8 \ - task-9 \ - task-10 \ - mq-1 \ - mq-2 \ - mq-3 \ - alarm-1 \ - sem-1 \ - sem-2 \ - mutex-1 \ - event-1 \ - heap-1 \ - heap-2 \ - buffer-1 \ - $(core-specific) - -CFLAGS := $(shell DESTDIR=$(DESTDIR) $(XENO_CONFIG) --skin=alchemy --cflags) -g -LDFLAGS := $(shell DESTDIR=$(DESTDIR) $(XENO_CONFIG) --skin=alchemy --ldflags) -CC = $(shell DESTDIR=$(DESTDIR) $(XENO_CONFIG) --cc) - -all: $(TESTS) - -%: %.c - $(CC) -o $@ $< $(CFLAGS) $(LDFLAGS) - -install: all - install -d $(prefix)/testsuite/alchemy - install -t $(prefix)/testsuite/alchemy $(TESTS) - -clean: - $(RM) $(TESTS) *~ - -# Run the test suite. We pin all tests to CPU #0, so that SMP does not -# alter the execution sequence we expect from them. -test: all - @for t in $(TESTS); do \ - echo -n $$t...; \ - sudo LD_LIBRARY_PATH=$(solibs) $(VALGRIND) ./$$t --cpu-affinity=0 --silent && echo ok || echo BAD; \ - done - -test/%: % - sudo LD_LIBRARY_PATH=$(solibs) $(VALGRIND) ./$(@F) --cpu-affinity=0 --silent && echo ok || echo BAD - -.PHONY: clean test
Signature · 1 line
2.35.3
PATCH v4 5/10 alchemytests: Fix gcc warning in buffer-1
In reply to Aaron MarcherFrom: Richard Weinberger <[email protected]>
Make n an unsigned integer, such that gcc realizes that "%.2d" cannot become negative and will fit into our 3 bytes buffer.
Fixes:
buffer-1.c:64:15: error: ‘%.2d’ directive writing between 2 and 10 bytes into a region of size 3 [-Werror=format-overflow=]
sprintf(s, "%.2d", 11 * n);
^~~~--- testsuite/smokey/alchemytests/buffer-1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
testsuite/smokey/alchemytests/buffer-1.c +1 -1
@@ -49,7 +49,7 @@ static void background_task(void *arg) {char c ='A' , s[3 ];ssize_t ret; -int n =0 ; +unsigned int n =0 ;traceobj_enter (&trobj);
Signature · 1 line
2.35.3
PATCH v4 6/10 alchemytests: Fix gcc warning in task-9
In reply to Aaron MarcherFrom: Richard Weinberger <[email protected]>
Make it static, no prototype needed anymore.
Fixes:
task-9.c:13:6: error: no previous prototype for ‘sighandler’ [-Werror=missing-prototypes]
void sighandler(int sig)
--- testsuite/smokey/alchemytests/task-9.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
testsuite/smokey/alchemytests/task-9.c +1 -1
@@ -10,7 +10,7 @@ static RT_TASK t_test;#define ONE_SECOND 1000000000ULL -void sighandler (int sig) +static void sighandler (int sig) {/* nop */ }
Signature · 1 line
2.35.3
PATCH v4 7/10 alchemytests: Check pipe-1 asprintf ret value
In reply to Aaron Marcher--- testsuite/smokey/alchemytests/pipe-1.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
testsuite/smokey/alchemytests/pipe-1.c +4 -2
@@ -48,11 +48,13 @@ static void realtime_task(void *arg)static void *regular_thread (void *arg) {struct pipe_message m; -int fd, seq =0 ; +int fd, res, seq =0 ;ssize_t ret;char *rtp; -asprintf (&rtp,"/dev/rtp%d" , minor); + res =asprintf (&rtp,"/dev/rtp%d" , minor); +if (res <0 ) +return NULL ; fd =open (rtp,O_RDWR );free (rtp);
Signature · 1 line
2.35.3
PATCH v4 8/10 alchemytests: Fix task-2
In reply to Aaron Marcherhttps://lore.kernel.org/xenomai/[email protected]/
--- testsuite/smokey/alchemytests/task-2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
testsuite/smokey/alchemytests/task-2.c +3 -1
@@ -28,8 +28,10 @@ static void background_task(void *arg)traceobj_mark (&trobj,2 ); -while (--safety >0 ) +while (--safety >0 ) { +compiler_barrier (); count++; + }traceobj_exit (&trobj); }
Signature · 1 line
2.35.3
PATCH v4 9/10 alchemytests: Fix task-5 logic
In reply to Aaron MarcherSemaphore call in wrong logical order, so that on the second rt_task_set_priority call the task doesn't exist anymore and thus the call fails with EINVAL.
This commit fixes the order so that the test passes again.
--- testsuite/smokey/alchemytests/task-5.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
testsuite/smokey/alchemytests/task-5.c +5 -5
@@ -44,17 +44,17 @@ static void foreground_task(void *arg)traceobj_mark (&trobj,4 ); - ret =rt_sem_v (&sem); -traceobj_check (&trobj, ret,0 ); + ret =rt_task_inquire (NULL , &info); +traceobj_assert (&trobj, ret ==0 && info.prio ==21 );traceobj_mark (&trobj,5 ); - ret =rt_task_inquire (NULL , &info); -traceobj_assert (&trobj, ret ==0 && info.prio ==21 ); + ret =rt_task_set_priority (&t_bgnd, info.prio); +traceobj_check (&trobj, ret,0 );traceobj_mark (&trobj,6 ); - ret =rt_task_set_priority (&t_bgnd, info.prio); + ret =rt_sem_v (&sem);traceobj_check (&trobj, ret,0 );traceobj_mark (&trobj,7 );
Signature · 1 line
2.35.3
PATCH v4 10/10 testsuite: disable broken tests
In reply to Aaron Marcheras discussed on the mailing list, disable broken tests (for now)
--- testsuite/smokey/psostests/psostests.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-)
testsuite/smokey/psostests/psostests.c +17 -5
@@ -34,18 +34,30 @@ TEST(psostests_mq1) TEST(psostests_mq2) TEST(psostests_mq3) TEST(psostests_pt1) -TEST(psostests_rn1) +// 0"000.679| BUG in __traceobj_assert_failed(): [rn1] trace assertion failed: +// testsuite/psostests/rn-1.c:46 +// => "ret == 0" +//TEST(psostests_rn1) TEST(psostests_sem1) TEST(psostests_sem2) TEST(psostests_task1) -TEST(psostests_task2) +// 0"014.452| BUG in __traceobj_assert_failed(): [FGND] trace assertion failed: +// ../../../../../../../../../workspace/sources/xenomai/testsuite/smokey/psostests/task-2.c:56 => "ret == 0" +//TEST(psostests_task2) TEST(psostests_task3) TEST(psostests_task4) TEST(psostests_task5) -TEST(psostests_task6) +// 0"011.370| BUG in __traceobj_assert_failed(): [FGND] trace assertion failed: +// testsuite/psostests/task-6.c:62 +// => "ret == 0 && oldprio == myprio" +// TEST(psostests_task6) TEST(psostests_task7) -TEST(psostests_task8) -TEST(psostests_task9) +// runs forever (100% CPU) +//TEST(psostests_task8) +// 0"002.198| WARNING: [main] lack of resources for core thread, EBUSY +// 0"003.421| BUG in __traceobj_assert_failed(): [root] trace assertion failed: +// ../../../../../../../../../workspace/sources/xenomai/testsuite/smokey/psostests/task-9.c:29 => "ret == 0" +//TEST(psostests_task9) TEST(psostests_tm1) TEST(psostests_tm2) TEST(psostests_tm3)
Signature · 1 line
2.35.3
Quoted 13 lines · Aaron Marcher
This patch series fully integrates the currently abandoned alchemy, pSOS and VxWorks tests into Xenomai's testsuite.
For each test, a Smokey testcase is hooked up.Aaron Marcher (7):
testsuite: Fully integrate alchemytests into smokey
testsuite: Fully integrate psostests into smokey
testsuite: Fully integrate vwworkstests into smokey
alchemytests: Check pipe-1 asprintf ret value
alchemytests: Fix task-2
alchemytests: Fix task-5 logic
testsuite: disable broken tests
Quoted 5 lines
Richard Weinberger (3):
testsuite: Remove old alchemytestsMakefile
alchemytests: Fix gcc warning in buffer-1
alchemytests: Fix gcc warning in task-9
Thanks for the update! For the lazy maintainer at least: What's new in v4?
Jan
Signature · 2 lines
Siemens AG, Technology Linux Expert Center
Hi Jan,
Quoted 1 line
Thanks for the update! For the lazy maintainer at least: What's new in v4?
sorry for the missing changelog. Here are all major changes since v3:
- Fully integrated all tests into Smokey framework, as discussed
- Disabled some tests with comments, as discussed
- Fixed task-2 in alchemytests
- Fixed task-5 in alchemytests
- Rebased to latest master
Aaron
Signature · 2 lines
sigma star gmbh | Eduard-Bodem-Gasse 6, 6020 Innsbruck, AUT UID/VAT Nr: ATU 66964118 | FN: 374287y
v5 cover Revive alchemy, pSOS and VxWorks tests
In reply to Aaron MarcherThis patch series fully integrates the currently abandoned alchemy, pSOS and VxWorks tests into Xenomai's testsuite.
For each test, a Smokey testcase is hooked up.
Changes since v4:
- Added SPDX-License-Identifier lines
Aaron Marcher (7):
testsuite: Fully integrate alchemytests into smokey
testsuite: Fully integrate psostests into smokey
testsuite: Fully integrate vwworkstests into smokey
alchemytests: Check pipe-1 asprintf ret value
alchemytests: Fix task-2
alchemytests: Fix task-5 logic
testsuite: disable broken tests
Richard Weinberger (3):
testsuite: Remove old alchemytests Makefile
alchemytests: Fix gcc warning in buffer-1
alchemytests: Fix gcc warning in task-9
configure.ac | 7 +-
lib/alchemy/testsuite/Makefile | 70 ---------
lib/psos/testsuite/Makefile | 49 ------
lib/vxworks/testsuite/Makefile | 43 -----
testsuite/smokey/Makefile.am | 15 +-
testsuite/smokey/alchemytests/Makefile.am | 148 ++++++++++++++++++
.../smokey/alchemytests}/alarm-1.c | 1 +
testsuite/smokey/alchemytests/alchemytests.c | 56 +++++++
.../smokey/alchemytests/alchemytests_driver.c | 33 ++++
.../smokey/alchemytests}/buffer-1.c | 3 +-
.../smokey/alchemytests}/event-1.c | 1 +
.../smokey/alchemytests}/heap-1.c | 1 +
.../smokey/alchemytests}/heap-2.c | 1 +
.../smokey/alchemytests}/mq-1.c | 1 +
.../smokey/alchemytests}/mq-2.c | 1 +
.../smokey/alchemytests}/mq-3.c | 1 +
.../smokey/alchemytests}/mutex-1.c | 1 +
.../smokey/alchemytests}/pipe-1.c | 7 +-
.../smokey/alchemytests}/sem-1.c | 1 +
.../smokey/alchemytests}/sem-2.c | 1 +
.../smokey/alchemytests}/task-1.c | 1 +
.../smokey/alchemytests}/task-10.c | 1 +
.../smokey/alchemytests}/task-2.c | 5 +-
.../smokey/alchemytests}/task-3.c | 1 +
.../smokey/alchemytests}/task-4.c | 1 +
.../smokey/alchemytests}/task-5.c | 11 +-
.../smokey/alchemytests}/task-6.c | 1 +
.../smokey/alchemytests}/task-7.c | 1 +
.../smokey/alchemytests}/task-8.c | 1 +
.../smokey/alchemytests}/task-9.c | 3 +-
testsuite/smokey/psostests/Makefile.am | 148 ++++++++++++++++++
.../smokey/psostests}/mq-1.c | 1 +
.../smokey/psostests}/mq-2.c | 1 +
.../smokey/psostests}/mq-3.c | 1 +
testsuite/smokey/psostests/psostests.c | 69 ++++++++
testsuite/smokey/psostests/psostests_driver.c | 34 ++++
.../smokey/psostests}/pt-1.c | 1 +
.../smokey/psostests}/rn-1.c | 1 +
.../smokey/psostests}/sem-1.c | 1 +
.../smokey/psostests}/sem-2.c | 1 +
.../smokey/psostests}/task-1.c | 1 +
.../smokey/psostests}/task-2.c | 1 +
.../smokey/psostests}/task-3.c | 1 +
.../smokey/psostests}/task-4.c | 1 +
.../smokey/psostests}/task-5.c | 1 +
.../smokey/psostests}/task-6.c | 1 +
.../smokey/psostests}/task-7.c | 1 +
.../smokey/psostests}/task-8.c | 1 +
.../smokey/psostests}/task-9.c | 1 +
.../smokey/psostests}/tm-1.c | 1 +
.../smokey/psostests}/tm-2.c | 1 +
.../smokey/psostests}/tm-3.c | 1 +
.../smokey/psostests}/tm-4.c | 1 +
.../smokey/psostests}/tm-5.c | 1 +
.../smokey/psostests}/tm-6.c | 1 +
.../smokey/psostests}/tm-7.c | 1 +
testsuite/smokey/vxworkstests/Makefile.am | 94 +++++++++++
.../smokey/vxworkstests}/lst-1.c | 1 +
.../smokey/vxworkstests}/msgQ-1.c | 1 +
.../smokey/vxworkstests}/msgQ-2.c | 1 +
.../smokey/vxworkstests}/msgQ-3.c | 1 +
.../smokey/vxworkstests}/rng-1.c | 1 +
.../smokey/vxworkstests}/sem-1.c | 1 +
.../smokey/vxworkstests}/sem-2.c | 1 +
.../smokey/vxworkstests}/sem-3.c | 1 +
.../smokey/vxworkstests}/sem-4.c | 1 +
.../smokey/vxworkstests}/task-1.c | 1 +
.../smokey/vxworkstests}/task-2.c | 1 +
testsuite/smokey/vxworkstests/vxworkstests.c | 46 ++++++
.../smokey/vxworkstests/vxworkstests_driver.c | 33 ++++
.../smokey/vxworkstests}/wd-1.c | 1 +
71 files changed, 749 insertions(+), 177 deletions(-)
delete mode 100644 lib/alchemy/testsuite/Makefile
delete mode 100644 lib/psos/testsuite/Makefile
delete mode 100644 lib/vxworks/testsuite/Makefile
create mode 100644 testsuite/smokey/alchemytests/Makefile.am
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/alarm-1.c (97%)
create mode 100644 testsuite/smokey/alchemytests/alchemytests.c
create mode 100644 testsuite/smokey/alchemytests/alchemytests_driver.c
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/buffer-1.c (97%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/event-1.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/heap-1.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/heap-2.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mq-1.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mq-2.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mq-3.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mutex-1.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/pipe-1.c (96%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/sem-1.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/sem-2.c (97%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-1.c (94%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-10.c (97%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-2.c (95%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-3.c (97%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-4.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-5.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-6.c (97%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-7.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-8.c (97%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-9.c (94%)
create mode 100644 testsuite/smokey/psostests/Makefile.am
rename {lib/psos/testsuite => testsuite/smokey/psostests}/mq-1.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/mq-2.c (98%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/mq-3.c (98%)
create mode 100644 testsuite/smokey/psostests/psostests.c
create mode 100644 testsuite/smokey/psostests/psostests_driver.c
rename {lib/psos/testsuite => testsuite/smokey/psostests}/pt-1.c (96%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/rn-1.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/sem-1.c (98%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/sem-2.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-1.c (95%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-2.c (98%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-3.c (96%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-4.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-5.c (98%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-6.c (98%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-7.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-8.c (98%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-9.c (98%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-1.c (95%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-2.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-3.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-4.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-5.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-6.c (95%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-7.c (95%)
create mode 100644 testsuite/smokey/vxworkstests/Makefile.am
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/lst-1.c (99%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/msgQ-1.c (98%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/msgQ-2.c (98%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/msgQ-3.c (98%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/rng-1.c (99%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-1.c (98%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-2.c (98%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-3.c (97%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-4.c (98%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/task-1.c (96%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/task-2.c (98%)
create mode 100644 testsuite/smokey/vxworkstests/vxworkstests.c
create mode 100644 testsuite/smokey/vxworkstests/vxworkstests_driver.c
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/wd-1.c (97%)Signature · 1 line
2.35.3
PATCH v4 1/10 testsuite: Fully integrate alchemytests into smokey
This is the very first step to have the alchemy tests embedded into our testsuite.
Build them using Xenomai's build system and hook them up using Smokey. Every test binary has it's own respective testcase in the testsuite.
---
configure.ac | 7 +-
testsuite/Makefile.am | 8 +-
testsuite/smokey/Makefile.am | 9 +-
testsuite/smokey/alchemytests/Makefile.am | 148 ++++++++++++++++++
.../smokey/alchemytests}/alarm-1.c | 1 +
testsuite/smokey/alchemytests/alchemytests.c | 56 +++++++
.../smokey/alchemytests/alchemytests_driver.c | 33 ++++
.../smokey/alchemytests}/buffer-1.c | 1 +
.../smokey/alchemytests}/event-1.c | 1 +
.../smokey/alchemytests}/heap-1.c | 1 +
.../smokey/alchemytests}/heap-2.c | 1 +
.../smokey/alchemytests}/mq-1.c | 1 +
.../smokey/alchemytests}/mq-2.c | 1 +
.../smokey/alchemytests}/mq-3.c | 1 +
.../smokey/alchemytests}/mutex-1.c | 1 +
.../smokey/alchemytests}/pipe-1.c | 1 +
.../smokey/alchemytests}/sem-1.c | 1 +
.../smokey/alchemytests}/sem-2.c | 1 +
.../smokey/alchemytests}/task-1.c | 1 +
.../smokey/alchemytests}/task-10.c | 1 +
.../smokey/alchemytests}/task-2.c | 1 +
.../smokey/alchemytests}/task-3.c | 1 +
.../smokey/alchemytests}/task-4.c | 1 +
.../smokey/alchemytests}/task-5.c | 1 +
.../smokey/alchemytests}/task-6.c | 1 +
.../smokey/alchemytests}/task-7.c | 1 +
.../smokey/alchemytests}/task-8.c | 1 +
.../smokey/alchemytests}/task-9.c | 1 +
28 files changed, 276 insertions(+), 7 deletions(-)
create mode 100644 testsuite/smokey/alchemytests/Makefile.am
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/alarm-1.c (97%)
create mode 100644 testsuite/smokey/alchemytests/alchemytests.c
create mode 100644 testsuite/smokey/alchemytests/alchemytests_driver.c
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/buffer-1.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/event-1.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/heap-1.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/heap-2.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mq-1.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mq-2.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mq-3.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mutex-1.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/pipe-1.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/sem-1.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/sem-2.c (97%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-1.c (94%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-10.c (97%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-2.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-3.c (97%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-4.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-5.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-6.c (97%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-7.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-8.c (97%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-9.c (97%)configure.ac +5 -2
@@ -1041,10 +1041,13 @@ AC_CONFIG_FILES([ \ testsuite/smokey/cpu-affinity/Makefile \ testsuite/smokey/gdb/Makefile \ testsuite/smokey/y2038/Makefile \ - testsuite/smokey/can/Makefile - testsuite/smokey/x86io/Makefile + testsuite/smokey/can/Makefile \ + testsuite/smokey/x86io/Makefile \ + testsuite/smokey/alchemytests/Makefile \ testsuite/clocktest/Makefile \ testsuite/xeno-test/Makefile \ + testsuite/psostests/Makefile \ + testsuite/vxworkstests/Makefile \ utils/Makefile \ utils/hdb/Makefile \ utils/can/Makefile \
testsuite/Makefile.am +6 -2
@@ -7,7 +7,9 @@ SUBDIRS += \ gpiotest \ spitest \ switchtest \ - xeno-test + xeno-test \ + psostests \ + vxworkstests endif DIST_SUBDIRS = \
@@ -18,4 +20,6 @@ DIST_SUBDIRS = \ smokey \ spitest \ switchtest \ - xeno-test + xeno-test \ + psostests \ + vxworkstests
testsuite/smokey/Makefile.am +6 -3
@@ -40,12 +40,14 @@ COBALT_SUBDIRS = \ tsc \ vdso-access \ xddp \ - y2038 + y2038 \ + alchemytests MERCURY_SUBDIRS = \ memory-heapmem \ memory-tlsf \ - memcheck + memcheck \ + alchemytests DIST_SUBDIRS = \ arith \
@@ -80,7 +82,8 @@ DIST_SUBDIRS = \ tsc \ vdso-access \ xddp \ - y2038 + y2038 \ + alchemytests if XENO_X86 DIST_SUBDIRS += x86io
testsuite/smokey/alchemytests/Makefile.am new file +148 -0
148 lines not on this page · raw message
testsuite/smokey/alchemytests/alarm-1.c renamed from lib/alchemy/testsuite/alarm-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/alchemytests.c new file +56 -0
56 lines not on this page · raw message
testsuite/smokey/alchemytests/alchemytests_driver.c new file +33 -0
@@ -0,0 +1,33 @@ +// SPDX-License-Identifier: GPL-2.0 +#include <error.h> +#include <libgen.h> +#include <smokey/smokey.h> +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> + +int main (int argc,char *const argv[]) +{ +struct smokey_test *t; +int ret, fails =0 ; + +if (pvlist_empty (&smokey_test_list)) +return 0 ; + +for_each_smokey_test (t) { + ret = t->run (t, argc, argv); +if (ret) { + fails++; +if (smokey_keep_going) +continue ; +if (smokey_verbose_mode) +error (1 , -ret,"test %s failed" , t->name); +return 1 ; + } +smokey_note ("%s OK" , t->name); + } + +return fails !=0 ; +}
testsuite/smokey/alchemytests/buffer-1.c renamed from lib/alchemy/testsuite/buffer-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <memory.h>
testsuite/smokey/alchemytests/event-1.c renamed from lib/alchemy/testsuite/event-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/heap-1.c renamed from lib/alchemy/testsuite/heap-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/heap-2.c renamed from lib/alchemy/testsuite/heap-2.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/mq-1.c renamed from lib/alchemy/testsuite/mq-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/mq-2.c renamed from lib/alchemy/testsuite/mq-2.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/mq-3.c renamed from lib/alchemy/testsuite/mq-3.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/mutex-1.c renamed from lib/alchemy/testsuite/mutex-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/pipe-1.c renamed from lib/alchemy/testsuite/pipe-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <fcntl.h>
testsuite/smokey/alchemytests/sem-1.c renamed from lib/alchemy/testsuite/sem-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/sem-2.c renamed from lib/alchemy/testsuite/sem-2.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/task-1.c renamed from lib/alchemy/testsuite/task-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/task-10.c renamed from lib/alchemy/testsuite/task-10.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/task-2.c renamed from lib/alchemy/testsuite/task-2.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/task-3.c renamed from lib/alchemy/testsuite/task-3.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/task-4.c renamed from lib/alchemy/testsuite/task-4.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/task-5.c renamed from lib/alchemy/testsuite/task-5.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/task-6.c renamed from lib/alchemy/testsuite/task-6.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/task-7.c renamed from lib/alchemy/testsuite/task-7.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/task-8.c renamed from lib/alchemy/testsuite/task-8.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/task-9.c renamed from lib/alchemy/testsuite/task-9.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <signal.h>
Signature · 1 line
2.35.3
Re: [PATCH 01/10] testsuite: Fully integrate alchemytests into smokey
Quoted 10 lines · Aaron Marcher
This is the very first step to have the alchemy tests embedded into our testsuite.
Build them using Xenomai's build system and hook them up using Smokey. Every test binary has it's own respective testcase in the testsuite.
Signed-off-by Richard Weinberger <[email protected]>Signed-off-by Aaron Marcher <[email protected]>---
[snip]
Quoted 7 lines
testsuite/smokey/alchemytests/alchemytests.c new file +0
-0
testsuite/smokey/alchemytests/alchemytests.c line 9
Quoted 9 lines
testsuite/smokey/alchemytests/alchemytests.c new file +9
-0@@ -0,0 +1,56 @@ +// SPDX-License-Identifier: GPL-2.0 +#include <error.h> +#include <libgen.h> +#include <smokey/smokey.h> +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h>
IMHO includes can be cleaned up. Can't spot a usage of error.h, libgen.h, stdbool.h and unistd.h (at least).
Applies to more locations within this series.
Quoted 37 lines
testsuite/smokey/alchemytests/alchemytests.c new file +37
-0+ +#define TEST (name) \ + smokey_test_plugin(name, SMOKEY_NOARGS, "Run external test"); \ + static int run_##name(struct smokey_test *t, int argc, char *const argv[]) \ + { \ + return __run_extprog(t, argc, argv); \ + } + +static int __run_extprog (struct smokey_test *t,int argc,char *const argv[]) +{ +int ret; +char *tst_path; + + ret =asprintf (&tst_path,"%s/%s --cpu-affinity=0" ,XENO_TEST_DIR , t->name); +if (ret ==-1 ) +return -ENOMEM ; + + ret =system (tst_path); +free (tst_path); + +return ret; +} + +TEST(alchemytests) +TEST(alchemytests_alarm1) +TEST(alchemytests_buffer1) +TEST(alchemytests_event1) +TEST(alchemytests_heap1) +TEST(alchemytests_heap2) +TEST(alchemytests_mq1) +TEST(alchemytests_mq2) +TEST(alchemytests_mq3) +TEST(alchemytests_mutex1) +TEST(alchemytests_pipe1) +TEST(alchemytests_sem1) +TEST(alchemytests_sem2) +TEST(alchemytests_task1)
testsuite/smokey/alchemytests/alchemytests.c line 56
Quoted 10 lines
testsuite/smokey/alchemytests/alchemytests.c new file +10
-0+TEST(alchemytests_task2) +TEST(alchemytests_task3) +TEST(alchemytests_task4) +TEST(alchemytests_task5) +TEST(alchemytests_task6) +TEST(alchemytests_task7) +TEST(alchemytests_task8) +TEST(alchemytests_task9) +TEST(alchemytests_task10) +
The following applies here and on several other places of this series:
Do we really want to have a test plugin for each sub-test? I would have expected one plugin for each "test class", so basically one for each sub folder in testsuite/smokey.
Each module could then call all the sub-tests and report back which one actually failed - if any.
Btw: I think Jan already reported that: I have to disable the vxworkstests_task2 test as it fails CI runs here.
Best regards,
Florian
Re: [PATCH 01/10] testsuite: Fully integrate alchemytests into smokey
Quoted 86 lines · Florian Bezdeka
Quoted 10 lines · Aaron Marcher
This is the very first step to have the alchemy tests embedded into our testsuite.
Build them using Xenomai's build system and hook them up using Smokey. Every test binary has it's own respective testcase in the testsuite.
Signed-off-by Richard Weinberger <[email protected]>Signed-off-by Aaron Marcher <[email protected]>---
[snip]
Quoted 7 lines
testsuite/smokey/alchemytests/alchemytests.c new file +0
-0testsuite/smokey/alchemytests/alchemytests.c line 9
Quoted 9 lines
testsuite/smokey/alchemytests/alchemytests.c new file +9
-0@@ -0,0 +1,56 @@ +// SPDX-License-Identifier: GPL-2.0 +#include <error.h> +#include <libgen.h> +#include <smokey/smokey.h> +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> IMHO includes can be cleaned up. Can't spot a usage of
error.h,libgen.h,stdbool.handunistd.h(at least).Applies to more locations within this series.
Quoted 37 lines
testsuite/smokey/alchemytests/alchemytests.c new file +37
-0+ +#define TEST (name) \ + smokey_test_plugin(name, SMOKEY_NOARGS, "Run external test"); \ + static int run_##name(struct smokey_test *t, int argc, char *const argv[]) \ + { \ + return __run_extprog(t, argc, argv); \ + } + +static int __run_extprog (struct smokey_test *t,int argc,char *const argv[]) +{ +int ret; +char *tst_path; + + ret =asprintf (&tst_path,"%s/%s --cpu-affinity=0" ,XENO_TEST_DIR , t->name); +if (ret ==-1 ) +return -ENOMEM ; + + ret =system (tst_path); +free (tst_path); + +return ret; +} + +TEST(alchemytests) +TEST(alchemytests_alarm1) +TEST(alchemytests_buffer1) +TEST(alchemytests_event1) +TEST(alchemytests_heap1) +TEST(alchemytests_heap2) +TEST(alchemytests_mq1) +TEST(alchemytests_mq2) +TEST(alchemytests_mq3) +TEST(alchemytests_mutex1) +TEST(alchemytests_pipe1) +TEST(alchemytests_sem1) +TEST(alchemytests_sem2) +TEST(alchemytests_task1)testsuite/smokey/alchemytests/alchemytests.c line 56
Quoted 10 lines
testsuite/smokey/alchemytests/alchemytests.c new file +10
-0+TEST(alchemytests_task2) +TEST(alchemytests_task3) +TEST(alchemytests_task4) +TEST(alchemytests_task5) +TEST(alchemytests_task6) +TEST(alchemytests_task7) +TEST(alchemytests_task8) +TEST(alchemytests_task9) +TEST(alchemytests_task10) +The following applies here and on several other places of this series:
Quoted 7 lines
Do we really want to have a test plugin for each sub-test? I would have expected one plugin for each "test class", so basically one for each sub folder in testsuite/smokey.
Each module could then call all the sub-tests and report back which one actually failed - if any.
Looking at smokey --list, I agree with this: too many test cases to browse now. Please rework this on top of 'next'.
Quoted 3 lines
Btw: I think Jan already reported that: I have to disable the
vxworkstests_task2test as it fails CI runs here.
Fix is in next.
Jan
Signature · 2 lines
Siemens AG, Technology Linux Expert Center
Re: [PATCH 01/10] testsuite: Fully integrate alchemytests into smokey
Hi,
Quoted 2 lines
Looking at smokey --list, I agree with this: too many test cases to browse now. Please rework this on top of 'next'.
As already described in the previous mail, I will have a look what can be improved. Generally I totally agree that the number of tests is a little overwhelming atm.
Best regards,
Aaron
Signature · 2 lines
sigma star gmbh | Eduard-Bodem-Gasse 6, 6020 Innsbruck, AUT UID/VAT Nr: ATU 66964118 | FN: 374287y
Quoted 110 lines · Jan Kiszka
Quoted 86 lines · Florian Bezdeka
Quoted 10 lines · Aaron Marcher
This is the very first step to have the alchemy tests embedded into our testsuite.
Build them using Xenomai's build system and hook them up using Smokey. Every test binary has it's own respective testcase in the testsuite.
Signed-off-by Richard Weinberger <[email protected]>Signed-off-by Aaron Marcher <[email protected]>---
[snip]
Quoted 7 lines
testsuite/smokey/alchemytests/alchemytests.c new file +0
-0testsuite/smokey/alchemytests/alchemytests.c line 9
Quoted 9 lines
testsuite/smokey/alchemytests/alchemytests.c new file +9
-0@@ -0,0 +1,56 @@ +// SPDX-License-Identifier: GPL-2.0 +#include <error.h> +#include <libgen.h> +#include <smokey/smokey.h> +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> IMHO includes can be cleaned up. Can't spot a usage of
error.h,libgen.h,stdbool.handunistd.h(at least).Applies to more locations within this series.
Quoted 37 lines
testsuite/smokey/alchemytests/alchemytests.c new file +37
-0+ +#define TEST (name) \ + smokey_test_plugin(name, SMOKEY_NOARGS, "Run external test"); \ + static int run_##name(struct smokey_test *t, int argc, char *const argv[]) \ + { \ + return __run_extprog(t, argc, argv); \ + } + +static int __run_extprog (struct smokey_test *t,int argc,char *const argv[]) +{ +int ret; +char *tst_path; + + ret =asprintf (&tst_path,"%s/%s --cpu-affinity=0" ,XENO_TEST_DIR , t->name); +if (ret ==-1 ) +return -ENOMEM ; + + ret =system (tst_path); +free (tst_path); + +return ret; +} + +TEST(alchemytests) +TEST(alchemytests_alarm1) +TEST(alchemytests_buffer1) +TEST(alchemytests_event1) +TEST(alchemytests_heap1) +TEST(alchemytests_heap2) +TEST(alchemytests_mq1) +TEST(alchemytests_mq2) +TEST(alchemytests_mq3) +TEST(alchemytests_mutex1) +TEST(alchemytests_pipe1) +TEST(alchemytests_sem1) +TEST(alchemytests_sem2) +TEST(alchemytests_task1)testsuite/smokey/alchemytests/alchemytests.c line 56
Quoted 10 lines
testsuite/smokey/alchemytests/alchemytests.c new file +10
-0+TEST(alchemytests_task2) +TEST(alchemytests_task3) +TEST(alchemytests_task4) +TEST(alchemytests_task5) +TEST(alchemytests_task6) +TEST(alchemytests_task7) +TEST(alchemytests_task8) +TEST(alchemytests_task9) +TEST(alchemytests_task10) +The following applies here and on several other places of this series:
Quoted 7 lines
Do we really want to have a test plugin for each sub-test? I would have expected one plugin for each "test class", so basically one for each sub folder in testsuite/smokey.
Each module could then call all the sub-tests and report back which one actually failed - if any.
Looking at smokey --list, I agree with this: too many test cases to browse now. Please rework this on top of 'next'.
Quoted 3 lines
Btw: I think Jan already reported that: I have to disable the
vxworkstests_task2test as it fails CI runs here.Fix is in next.
Jan
Signature · 2 lines
Siemens AG, Technology Linux Expert Center
Re: [PATCH 01/10] testsuite: Fully integrate alchemytests into smokey
Hi Aaron,
Quoted 9 lines · Aaron Marcher
Hi,
Quoted 2 lines
Looking at smokey --list, I agree with this: too many test cases to browse now. Please rework this on top of 'next'.
As already described in the previous mail, I will have a look what can be improved. Generally I totally agree that the number of tests is a little overwhelming atm.
Any news on this?
Jan
Signature · 2 lines
Siemens AG, Technology Linux Expert Center
cover Improvements for smokey skintests
Merges all skin-related testsuite parts into common top-level smokey testcases, which in turn spawn all the related skin tests - as discussed before.
Additionally cleans up some includes and more.
Aaron Marcher (5):
lib: Add smokey_run_extprog as helper for testsuite
testsuite: Merge alchemytests in single smokey case
testsuite: Merge psostests in a single smokey case
testsuite: Merge vxworkstests in a single smokey case
testsuite: Drop skin test "drivers"
include/smokey/smokey.h | 2 + lib/smokey/helpers.c | 15 +++ testsuite/smokey/alchemytests/Makefile.am | 12 -- testsuite/smokey/alchemytests/alchemytests.c | 85 +++++++------- .../smokey/alchemytests/alchemytests_driver.c | 33 ------ testsuite/smokey/psostests/Makefile.am | 10 -- testsuite/smokey/psostests/psostests.c | 111 +++++++++--------- testsuite/smokey/psostests/psostests_driver.c | 33 ------ testsuite/smokey/vxworkstests/Makefile.am | 10 -- testsuite/smokey/vxworkstests/vxworkstests.c | 66 ++++++----- .../smokey/vxworkstests/vxworkstests_driver.c | 33 ------ 11 files changed, 150 insertions(+), 260 deletions(-) delete mode 100644 testsuite/smokey/alchemytests/alchemytests_driver.c delete mode 100644 testsuite/smokey/psostests/psostests_driver.c delete mode 100644 testsuite/smokey/vxworkstests/vxworkstests_driver.c
Signature · 1 line
2.35.3
PATCH 1/5 lib: Add smokey_run_extprog as helper for testsuite
--- include/smokey/smokey.h | 2 ++ lib/smokey/helpers.c | 15 +++++++++++++++ 2 files changed, 17 insertions(+)
include/smokey/smokey.h +2 -0
@@ -259,6 +259,8 @@ int smokey_modprobe(const char *name, bool silent);int smokey_rmmod (const char *name); +int smokey_run_extprog (const char *dir,const char *name,int argc,char *const argv[]); + #ifdef __cplusplus }#endif
lib/smokey/helpers.c +15 -0
@@ -410,3 +410,18 @@ int smokey_rmmod(const char *name)return err; } + +int smokey_run_extprog (const char *dir,const char *name,int argc,char *const argv[]) +{ +int ret; +char *tst_path; + + ret =asprintf (&tst_path,"%s/%s --cpu-affinity=0" , dir, name); +if (ret ==-1 ) +return -ENOMEM ; + + ret =system (tst_path); +free (tst_path); + +return ret; +}
Signature · 1 line
2.35.3
Re: [PATCH 1/5] lib: Add smokey_run_extprog as helper for testsuite
Quoted 24 lines · Aaron Marcher
Signed-off-by Aaron Marcher <[email protected]>--- include/smokey/smokey.h | 2 ++ lib/smokey/helpers.c | 15 +++++++++++++++ 2 files changed, 17 insertions(+)include/smokey/smokey.h +2
-0@@ -259,6 +259,8 @@ int smokey_modprobe(const char *name, bool silent);int smokey_rmmod (const char *name); +int smokey_run_extprog (const char *dir,const char *name,int argc,char *const argv[]); + #ifdef __cplusplus }#endif lib/smokey/helpers.c +0
-0
lib/smokey/helpers.c int smokey_rmmod(const char *name) · line 419
Quoted 10 lines
lib/smokey/helpers.c +7
-0@@ -410,3 +410,18 @@ int smokey_rmmod(const char *name)return err; } + +int smokey_run_extprog (const char *dir,const char *name,int argc,char *const argv[]) +{ +int ret; +char *tst_path; + + ret =asprintf (&tst_path,"%s/%s --cpu-affinity=0" , dir, name);
Why do we need to hard-code an affinity here?
Jan
Quoted 8 lines
lib/smokey/helpers.c +8
-0+if (ret ==-1 ) +return -ENOMEM ; + + ret =system (tst_path); +free (tst_path); + +return ret; +}
Signature · 2 lines
Siemens AG, Technology Linux Expert Center
Re: [PATCH 1/5] lib: Add smokey_run_extprog as helper for testsuite
----- Ursprüngliche Mail -----
Quoted 10 lines
Von: "Jan Kiszka" <[email protected]>
lib/smokey/helpers.c int smokey_rmmod(const char *name) · line 419
Quoted 7 lines
+int
smokey_run_extprog(const char *dir, const char *name, int argc, char *const argv[])lib/smokey/helpers.c +5
-0+{ +int ret; +char *tst_path; + + ret =asprintf (&tst_path,"%s/%s --cpu-affinity=0" , dir, name);Why do we need to hard-code an affinity here?
We don't. Looks like a copy&paste error from my initial Alchemy test driver. Aaron, please make it more flexible.
Alchemy, pSos and VxWorks tests assume an CPU affinity of 0, but we cannot enforce that for smokey in general.
Thanks,
//richard
PATCH 1/1 lib: Drop cpu-affinity=0 from skin-tests helper
In reply to Jan KiszkaAlchemy, pSos and VxWorks tests assume zero CPU affinity, but we cannot enforce that in general.
--- lib/smokey/helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/smokey/helpers.c +1 -1
@@ -416,7 +416,7 @@ int smokey_run_extprog(const char *dir, const char *name, int argc, char *constint ret;char *tst_path; - ret =asprintf (&tst_path,"%s/%s --cpu-affinity=0" , dir, name); + ret =asprintf (&tst_path,"%s/%s" , dir, name);if (ret ==-1 )return -ENOMEM ;
Signature · 1 line
2.35.3
Re: [PATCH] lib: Drop cpu-affinity=0 from skin-tests helper
Quoted 13 lines · Aaron Marcher
Alchemy, pSos and VxWorks tests assume zero CPU affinity, but we cannot enforce that in general.
Signed-off-by Aaron Marcher <[email protected]>--- lib/smokey/helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)lib/smokey/helpers.c +0
-0
lib/smokey/helpers.c int smokey_run_extprog(const char *dir, const char *name, int argc, char *const · line 421
Quoted 7 lines
lib/smokey/helpers.c +1
-1@@ -416,7 +416,7 @@ int smokey_run_extprog(const char *dir, const char *name, int argc, char *constint ret;char *tst_path; - ret =asprintf (&tst_path,"%s/%s --cpu-affinity=0" , dir, name); + ret =asprintf (&tst_path,"%s/%s" , dir, name);if (ret ==-1 )return -ENOMEM ;
This is going to break the tests on SMP, because the test logic checks whether some series of actions happen sequentially, in the right order. Allowing the threads to run in parallel on multiple CPUs would prevent that.
CPU0 is by design always available as the boot CPU.
Signature · 1 line
Philippe.
v2 cover lib: Drop cpu-affinity=0 from skin-tests helper
In reply to Aaron MarcherChanges since v1:
- Introduce parameter to control arguments on a case-to-case basis
Aaron Marcher (1):
lib: Drop cpu-affinity=0 from skin-tests helper
include/smokey/smokey.h | 2 +- lib/smokey/helpers.c | 8 ++++++-- testsuite/smokey/alchemytests/alchemytests.c | 3 ++- testsuite/smokey/psostests/psostests.c | 3 ++- testsuite/smokey/vxworkstests/vxworkstests.c | 3 ++- 5 files changed, 13 insertions(+), 6 deletions(-)
Signature · 1 line
2.35.3
PATCH v2 1/1 lib: Drop cpu-affinity=0 from skin-tests helper
Alchemy, pSos and VxWorks tests assume zero CPU affinity, but we cannot enforce that in general.
Introduces a parameter to control the arguments.
--- include/smokey/smokey.h | 2 +- lib/smokey/helpers.c | 8 ++++++-- testsuite/smokey/alchemytests/alchemytests.c | 3 ++- testsuite/smokey/psostests/psostests.c | 3 ++- testsuite/smokey/vxworkstests/vxworkstests.c | 3 ++- 5 files changed, 13 insertions(+), 6 deletions(-)
include/smokey/smokey.h +1 -1
@@ -259,7 +259,7 @@ int smokey_modprobe(const char *name, bool silent);int smokey_rmmod (const char *name); -int smokey_run_extprog (const char *dir,const char *name,int argc,char *const argv[]); +int smokey_run_extprog (const char *dir,const char *name,const char *args); #ifdef __cplusplus }
lib/smokey/helpers.c +6 -2
@@ -411,12 +411,16 @@ int smokey_rmmod(const char *name)return err; } -int smokey_run_extprog (const char *dir,const char *name,int argc,char *const argv[]) +int smokey_run_extprog (const char *dir,const char *name,const char *args) {int ret;char *tst_path; - ret =asprintf (&tst_path,"%s/%s --cpu-affinity=0" , dir, name); +if (args ==NULL ) + ret =asprintf (&tst_path,"%s/%s" , dir, name); +else + ret =asprintf (&tst_path,"%s/%s %s" , dir, name, args); +if (ret ==-1 )return -ENOMEM ;
testsuite/smokey/alchemytests/alchemytests.c +2 -1
@@ -33,12 +33,13 @@ static int run_alchemytests(struct smokey_test *t, int argc, char *const argv[])"alchemytests_task9" , "alchemytests_task10" }; +char *args ="--cpu-affinity=0" ;for (size_t t =0 ; t <sizeof (tests) /sizeof (tests[0 ]); t++) {int fails =0 ; - ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], argc, argv); + ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], args);if (ret) { fails++;if (smokey_keep_going)
testsuite/smokey/psostests/psostests.c +2 -1
@@ -46,12 +46,13 @@ static int run_psostests(struct smokey_test *t, int argc, char *const argv[])"psostests_tm6" , "psostests_tm7" }; +char *args ="--cpu-affinity=0" ;for (size_t t =0 ; t <sizeof (tests) /sizeof (tests[0 ]); t++) {int fails =0 ; - ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], argc, argv); + ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], args);if (ret) { fails++;if (smokey_keep_going)
testsuite/smokey/vxworkstests/vxworkstests.c +2 -1
@@ -24,12 +24,13 @@ static int run_vxworkstests(struct smokey_test *t, int argc, char *const argv[])"vxworkstests_task1" , "vxworkstests_task2" }; +char *args ="--cpu-affinity=0" ;for (size_t t =0 ; t <sizeof (tests) /sizeof (tests[0 ]); t++) {int fails =0 ; - ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], argc, argv); + ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], args);if (ret) { fails++;if (smokey_keep_going)
Signature · 1 line
2.35.3
Re: [PATCH 1/1] lib: Drop cpu-affinity=0 from skin-tests helper
Quoted 32 lines · Aaron Marcher
Alchemy, pSos and VxWorks tests assume zero CPU affinity, but we cannot enforce that in general.
Introduces a parameter to control the arguments.
Signed-off-by Aaron Marcher <[email protected]>--- include/smokey/smokey.h | 2 +- lib/smokey/helpers.c | 8 ++++++-- testsuite/smokey/alchemytests/alchemytests.c | 3 ++- testsuite/smokey/psostests/psostests.c | 3 ++- testsuite/smokey/vxworkstests/vxworkstests.c | 3 ++- 5 files changed, 13 insertions(+), 6 deletions(-)include/smokey/smokey.h +1
-1@@ -259,7 +259,7 @@ int smokey_modprobe(const char *name, bool silent);int smokey_rmmod (const char *name); -int smokey_run_extprog (const char *dir,const char *name,int argc,char *const argv[]); +int smokey_run_extprog (const char *dir,const char *name,const char *args); #ifdef __cplusplus }lib/smokey/helpers.c +0
-0
lib/smokey/helpers.c int smokey_rmmod(const char *name) · line 414
Quoted 5 lines
lib/smokey/helpers.c +1
-1@@ -411,12 +411,16 @@ int smokey_rmmod(const char *name)return err; } -int smokey_run_extprog (const char *dir,const char *name,int argc,char *const argv[]) +int smokey_run_extprog (const char *dir,const char *name,const char *args)
Actually, argc/argv were dead vars before...
Quoted 18 lines
lib/smokey/helpers.c +5
-1{int ret;char *tst_path; - ret =asprintf (&tst_path,"%s/%s --cpu-affinity=0" , dir, name); +if (args ==NULL ) + ret =asprintf (&tst_path,"%s/%s" , dir, name); +else + ret =asprintf (&tst_path,"%s/%s %s" , dir, name, args); +if (ret ==-1 )return -ENOMEM ;testsuite/smokey/alchemytests/alchemytests.c +0
-0
testsuite/smokey/alchemytests/alchemytests.c static int run_alchemytests(struct smokey_test *t, int argc, char *const argv[]) · line 36
Quoted 4 lines
testsuite/smokey/alchemytests/alchemytests.c +1
-0@@ -33,12 +33,13 @@ static int run_alchemytests(struct smokey_test *t, int argc, char *const argv[])"alchemytests_task9" , "alchemytests_task10" }; +char *args ="--cpu-affinity=0" ;
const? Maybe even inline into the call?
Quoted 38 lines
testsuite/smokey/alchemytests/alchemytests.c +1
-1for (size_t t =0 ; t <sizeof (tests) /sizeof (tests[0 ]); t++) {int fails =0 ; - ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], argc, argv); + ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], args);if (ret) { fails++;if (smokey_keep_going)testsuite/smokey/psostests/psostests.c +2
-1@@ -46,12 +46,13 @@ static int run_psostests(struct smokey_test *t, int argc, char *const argv[])"psostests_tm6" , "psostests_tm7" }; +char *args ="--cpu-affinity=0" ;for (size_t t =0 ; t <sizeof (tests) /sizeof (tests[0 ]); t++) {int fails =0 ; - ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], argc, argv); + ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], args);if (ret) { fails++;if (smokey_keep_going)testsuite/smokey/vxworkstests/vxworkstests.c +1
-0@@ -24,12 +24,13 @@ static int run_vxworkstests(struct smokey_test *t, int argc, char *const argv[])"vxworkstests_task1" , "vxworkstests_task2" }; +char *args ="--cpu-affinity=0" ;
testsuite/smokey/vxworkstests/vxworkstests.c static int run_vxworkstests(struct smokey_test *t, int argc, char *const argv[]) · line 36
Quoted 10 lines
testsuite/smokey/vxworkstests/vxworkstests.c +1
-1for (size_t t =0 ; t <sizeof (tests) /sizeof (tests[0 ]); t++) {int fails =0 ; - ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], argc, argv); + ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], args);if (ret) { fails++;if (smokey_keep_going)
I'm inclined to ask for v2 of the original series. 'next' is not 'master', we can still update it.
Jan
Signature · 2 lines
Siemens AG, Technology Linux Expert Center
Re: [PATCH 1/1] lib: Drop cpu-affinity=0 from skin-tests helper
Quoted 109 lines · Jan Kiszka
Quoted 32 lines · Aaron Marcher
Alchemy, pSos and VxWorks tests assume zero CPU affinity, but we cannot enforce that in general.
Introduces a parameter to control the arguments.
Signed-off-by Aaron Marcher <[email protected]>--- include/smokey/smokey.h | 2 +- lib/smokey/helpers.c | 8 ++++++-- testsuite/smokey/alchemytests/alchemytests.c | 3 ++- testsuite/smokey/psostests/psostests.c | 3 ++- testsuite/smokey/vxworkstests/vxworkstests.c | 3 ++- 5 files changed, 13 insertions(+), 6 deletions(-)include/smokey/smokey.h +1
-1@@ -259,7 +259,7 @@ int smokey_modprobe(const char *name, bool silent);int smokey_rmmod (const char *name); -int smokey_run_extprog (const char *dir,const char *name,int argc,char *const argv[]); +int smokey_run_extprog (const char *dir,const char *name,const char *args); #ifdef __cplusplus }lib/smokey/helpers.c +0
-0lib/smokey/helpers.c int smokey_rmmod(const char *name) · line 414
Quoted 5 lines
lib/smokey/helpers.c +1
-1@@ -411,12 +411,16 @@ int smokey_rmmod(const char *name)return err; } -int smokey_run_extprog (const char *dir,const char *name,int argc,char *const argv[]) +int smokey_run_extprog (const char *dir,const char *name,const char *args)Actually, argc/argv were dead vars before...
Quoted 18 lines
lib/smokey/helpers.c +5
-1{int ret;char *tst_path; - ret =asprintf (&tst_path,"%s/%s --cpu-affinity=0" , dir, name); +if (args ==NULL ) + ret =asprintf (&tst_path,"%s/%s" , dir, name); +else + ret =asprintf (&tst_path,"%s/%s %s" , dir, name, args); +if (ret ==-1 )return -ENOMEM ;testsuite/smokey/alchemytests/alchemytests.c +0
-0testsuite/smokey/alchemytests/alchemytests.c static int run_alchemytests(struct smokey_test *t, int argc, char *const argv[]) · line 36
Quoted 4 lines
testsuite/smokey/alchemytests/alchemytests.c +1
-0@@ -33,12 +33,13 @@ static int run_alchemytests(struct smokey_test *t, int argc, char *const argv[])"alchemytests_task9" , "alchemytests_task10" }; +char *args ="--cpu-affinity=0" ;const? Maybe even inline into the call?
Quoted 43 lines
testsuite/smokey/alchemytests/alchemytests.c +1
-1for (size_t t =0 ; t <sizeof (tests) /sizeof (tests[0 ]); t++) {int fails =0 ; - ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], argc, argv); + ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], args);if (ret) { fails++;if (smokey_keep_going)testsuite/smokey/psostests/psostests.c +2
-1@@ -46,12 +46,13 @@ static int run_psostests(struct smokey_test *t, int argc, char *const argv[])"psostests_tm6" , "psostests_tm7" }; +char *args ="--cpu-affinity=0" ;for (size_t t =0 ; t <sizeof (tests) /sizeof (tests[0 ]); t++) {int fails =0 ; - ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], argc, argv); + ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], args);if (ret) { fails++;if (smokey_keep_going)testsuite/smokey/vxworkstests/vxworkstests.c +1
-0@@ -24,12 +24,13 @@ static int run_vxworkstests(struct smokey_test *t, int argc, char *const argv[])"vxworkstests_task1" , "vxworkstests_task2" }; +char *args ="--cpu-affinity=0" ;for (size_t t =0 ; t <sizeof (tests) /sizeof (tests[0 ]); t++) {int fails =0 ;
Quoted 9 lines
testsuite/smokey/vxworkstests/vxworkstests.c static int run_vxworkstests(struct smokey_test *t, int argc, char *const argv[]) · line 36
Quoted 5 lines
testsuite/smokey/vxworkstests/vxworkstests.c +1
-1- ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], argc, argv); + ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], args);if (ret) { fails++;if (smokey_keep_going)I'm inclined to ask for v2 of the original series. 'next' is not 'master', we can still update it.
Any chance to get a v2 soon?
Jan
Signature · 2 lines
Siemens AG, Technology Linux Expert Center
Re: [PATCH 1/1] lib: Drop cpu-affinity=0 from skin-tests helper
Quoted 120 lines · Jan Kiszka
Quoted 109 lines · Jan Kiszka
Quoted 32 lines · Aaron Marcher
Alchemy, pSos and VxWorks tests assume zero CPU affinity, but we cannot enforce that in general.
Introduces a parameter to control the arguments.
Signed-off-by Aaron Marcher <[email protected]>--- include/smokey/smokey.h | 2 +- lib/smokey/helpers.c | 8 ++++++-- testsuite/smokey/alchemytests/alchemytests.c | 3 ++- testsuite/smokey/psostests/psostests.c | 3 ++- testsuite/smokey/vxworkstests/vxworkstests.c | 3 ++- 5 files changed, 13 insertions(+), 6 deletions(-)include/smokey/smokey.h +1
-1@@ -259,7 +259,7 @@ int smokey_modprobe(const char *name, bool silent);int smokey_rmmod (const char *name); -int smokey_run_extprog (const char *dir,const char *name,int argc,char *const argv[]); +int smokey_run_extprog (const char *dir,const char *name,const char *args); #ifdef __cplusplus }lib/smokey/helpers.c +0
-0lib/smokey/helpers.c int smokey_rmmod(const char *name) · line 414
Quoted 5 lines
lib/smokey/helpers.c +1
-1@@ -411,12 +411,16 @@ int smokey_rmmod(const char *name)return err; } -int smokey_run_extprog (const char *dir,const char *name,int argc,char *const argv[]) +int smokey_run_extprog (const char *dir,const char *name,const char *args)Actually, argc/argv were dead vars before...
Quoted 18 lines
lib/smokey/helpers.c +5
-1{int ret;char *tst_path; - ret =asprintf (&tst_path,"%s/%s --cpu-affinity=0" , dir, name); +if (args ==NULL ) + ret =asprintf (&tst_path,"%s/%s" , dir, name); +else + ret =asprintf (&tst_path,"%s/%s %s" , dir, name, args); +if (ret ==-1 )return -ENOMEM ;testsuite/smokey/alchemytests/alchemytests.c +0
-0testsuite/smokey/alchemytests/alchemytests.c static int run_alchemytests(struct smokey_test *t, int argc, char *const argv[]) · line 36
Quoted 4 lines
testsuite/smokey/alchemytests/alchemytests.c +1
-0@@ -33,12 +33,13 @@ static int run_alchemytests(struct smokey_test *t, int argc, char *const argv[])"alchemytests_task9" , "alchemytests_task10" }; +char *args ="--cpu-affinity=0" ;const? Maybe even inline into the call?
Quoted 43 lines
testsuite/smokey/alchemytests/alchemytests.c +1
-1for (size_t t =0 ; t <sizeof (tests) /sizeof (tests[0 ]); t++) {int fails =0 ; - ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], argc, argv); + ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], args);if (ret) { fails++;if (smokey_keep_going)testsuite/smokey/psostests/psostests.c +2
-1@@ -46,12 +46,13 @@ static int run_psostests(struct smokey_test *t, int argc, char *const argv[])"psostests_tm6" , "psostests_tm7" }; +char *args ="--cpu-affinity=0" ;for (size_t t =0 ; t <sizeof (tests) /sizeof (tests[0 ]); t++) {int fails =0 ; - ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], argc, argv); + ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], args);if (ret) { fails++;if (smokey_keep_going)testsuite/smokey/vxworkstests/vxworkstests.c +1
-0@@ -24,12 +24,13 @@ static int run_vxworkstests(struct smokey_test *t, int argc, char *const argv[])"vxworkstests_task1" , "vxworkstests_task2" }; +char *args ="--cpu-affinity=0" ;for (size_t t =0 ; t <sizeof (tests) /sizeof (tests[0 ]); t++) {int fails =0 ;Quoted 9 lines
testsuite/smokey/vxworkstests/vxworkstests.c static int run_vxworkstests(struct smokey_test *t, int argc, char *const argv[]) · line 36
Quoted 5 lines
testsuite/smokey/vxworkstests/vxworkstests.c +1
-1- ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], argc, argv); + ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], args);if (ret) { fails++;if (smokey_keep_going)I'm inclined to ask for v2 of the original series. 'next' is not 'master', we can still update it.
Quoted 2 lines
Any chance to get a v2 soon?
Just looked into this again and decided to update in-place:
include/smokey/smokey.h +1 -1
@@ -259,7 +259,7 @@ int smokey_modprobe(const char *name, bool silent);int smokey_rmmod (const char *name); -int smokey_run_extprog (const char *dir,const char *name,int argc,char *const argv[]); +int smokey_run_extprog (const char *dir,const char *name,const char *args); #ifdef __cplusplus }
lib/smokey/helpers.c +2 -2
@@ -411,12 +411,12 @@ int smokey_rmmod(const char *name)return err; } -int smokey_run_extprog (const char *dir,const char *name,int argc,char *const argv[]) +int smokey_run_extprog (const char *dir,const char *name,const char *args) {int ret;char *tst_path; - ret =asprintf (&tst_path,"%s/%s --cpu-affinity=0" , dir, name); + ret =asprintf (&tst_path,"%s/%s %s" , dir, name, args ? :"" );if (ret ==-1 )return -ENOMEM ;
testsuite/smokey/alchemytests/alchemytests.c +2 -1
@@ -38,7 +38,8 @@ static int run_alchemytests(struct smokey_test *t, int argc, char *const argv[]) {int fails =0 ; - ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], argc, argv); + ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], +"--cpu-affinity=0" );if (ret) { fails++;if (smokey_keep_going)
testsuite/smokey/psostests/psostests.c +2 -1
@@ -51,7 +51,8 @@ static int run_psostests(struct smokey_test *t, int argc, char *const argv[]) {int fails =0 ; - ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], argc, argv); + ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], +"--cpu-affinity=0" );if (ret) { fails++;if (smokey_keep_going)
testsuite/smokey/vxworkstests/vxworkstests.c +2 -1
@@ -29,7 +29,8 @@ static int run_vxworkstests(struct smokey_test *t, int argc, char *const argv[]) {int fails =0 ; - ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], argc, argv); + ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], +"--cpu-affinity=0" );if (ret) { fails++;if (smokey_keep_going)
Jan
Signature · 2 lines
Siemens AG, Technology Linux Expert Center
Re: [PATCH 1/1] lib: Drop cpu-affinity=0 from skin-tests helper
In reply to Jan KiszkaHi Jan,
should I still rebase the original series into clean commits we can re-apply to next then or do you want to keep it like that?
Aaron
Signature · 2 lines
sigma star gmbh | Eduard-Bodem-Gasse 6, 6020 Innsbruck, AUT UID/VAT Nr: ATU 66964118 | FN: 374287y
Quoted 123 lines · Jan Kiszka
Quoted 32 lines · Aaron Marcher
Alchemy, pSos and VxWorks tests assume zero CPU affinity, but we cannot enforce that in general.
Introduces a parameter to control the arguments.
Signed-off-by Aaron Marcher <[email protected]>--- include/smokey/smokey.h | 2 +- lib/smokey/helpers.c | 8 ++++++-- testsuite/smokey/alchemytests/alchemytests.c | 3 ++- testsuite/smokey/psostests/psostests.c | 3 ++- testsuite/smokey/vxworkstests/vxworkstests.c | 3 ++- 5 files changed, 13 insertions(+), 6 deletions(-)include/smokey/smokey.h +1
-1@@ -259,7 +259,7 @@ int smokey_modprobe(const char *name, bool silent);int smokey_rmmod (const char *name); -int smokey_run_extprog (const char *dir,const char *name,int argc,char *const argv[]); +int smokey_run_extprog (const char *dir,const char *name,const char *args); #ifdef __cplusplus }lib/smokey/helpers.c +0
-0lib/smokey/helpers.c int smokey_rmmod(const char *name) · line 414
Quoted 5 lines
lib/smokey/helpers.c +1
-1@@ -411,12 +411,16 @@ int smokey_rmmod(const char *name)return err; } -int smokey_run_extprog (const char *dir,const char *name,int argc,char *const argv[]) +int smokey_run_extprog (const char *dir,const char *name,const char *args)Actually, argc/argv were dead vars before...
Quoted 18 lines
lib/smokey/helpers.c +5
-1{int ret;char *tst_path; - ret =asprintf (&tst_path,"%s/%s --cpu-affinity=0" , dir, name); +if (args ==NULL ) + ret =asprintf (&tst_path,"%s/%s" , dir, name); +else + ret =asprintf (&tst_path,"%s/%s %s" , dir, name, args); +if (ret ==-1 )return -ENOMEM ;testsuite/smokey/alchemytests/alchemytests.c +0
-0testsuite/smokey/alchemytests/alchemytests.c static int run_alchemytests(struct smokey_test *t, int argc, char *const argv[]) · line 36
Quoted 4 lines
testsuite/smokey/alchemytests/alchemytests.c +1
-0@@ -33,12 +33,13 @@ static int run_alchemytests(struct smokey_test *t, int argc, char *const argv[])"alchemytests_task9" , "alchemytests_task10" }; +char *args ="--cpu-affinity=0" ;const? Maybe even inline into the call?
Quoted 38 lines
testsuite/smokey/alchemytests/alchemytests.c +1
-1for (size_t t =0 ; t <sizeof (tests) /sizeof (tests[0 ]); t++) {int fails =0 ; - ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], argc, argv); + ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], args);if (ret) { fails++;if (smokey_keep_going)testsuite/smokey/psostests/psostests.c +2
-1@@ -46,12 +46,13 @@ static int run_psostests(struct smokey_test *t, int argc, char *const argv[])"psostests_tm6" , "psostests_tm7" }; +char *args ="--cpu-affinity=0" ;for (size_t t =0 ; t <sizeof (tests) /sizeof (tests[0 ]); t++) {int fails =0 ; - ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], argc, argv); + ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], args);if (ret) { fails++;if (smokey_keep_going)testsuite/smokey/vxworkstests/vxworkstests.c +1
-0@@ -24,12 +24,13 @@ static int run_vxworkstests(struct smokey_test *t, int argc, char *const argv[])"vxworkstests_task1" , "vxworkstests_task2" }; +char *args ="--cpu-affinity=0" ;testsuite/smokey/vxworkstests/vxworkstests.c static int run_vxworkstests(struct smokey_test *t, int argc, char *const argv[]) · line 36
Quoted 10 lines
testsuite/smokey/vxworkstests/vxworkstests.c +1
-1for (size_t t =0 ; t <sizeof (tests) /sizeof (tests[0 ]); t++) {int fails =0 ; - ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], argc, argv); + ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], args);if (ret) { fails++;if (smokey_keep_going)I'm inclined to ask for v2 of the original series. 'next' is not 'master', we can still update it.
Jan
Signature · 2 lines
Siemens AG, Technology Linux Expert Center
Re: [PATCH 1/1] lib: Drop cpu-affinity=0 from skin-tests helper
Quoted 5 lines · Aaron Marcher
Hi Jan,
should I still rebase the original series into clean commits we can re-apply to
nextthen or do you want to keep it like that?
Next should be clean now, but please cross check if you like to add something.
Thanks,
Jan
Signature · 2 lines
Siemens AG, Technology Linux Expert Center
PATCH 2/5 testsuite: Merge alchemytests in single smokey case
In reply to Aaron Marcher--- testsuite/smokey/alchemytests/alchemytests.c | 85 ++++++++++---------- 1 file changed, 43 insertions(+), 42 deletions(-)
testsuite/smokey/alchemytests/alchemytests.c +43 -42
@@ -1,55 +1,56 @@// SPDX-License-Identifier: GPL-2.0 #include <error.h> -#include <libgen.h> -#include <smokey/smokey.h> -#include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <unistd.h> - -#define TEST (name) \ - smokey_test_plugin(name, SMOKEY_NOARGS, "Run external test"); \ - static int run_##name(struct smokey_test *t, int argc, char *const argv[]) \ - { \ - return __run_extprog(t, argc, argv); \ - } +#include <smokey/smokey.h> -static int __run_extprog (struct smokey_test *t,int argc,char *const argv[]) +static int run_alchemytests (struct smokey_test *t,int argc,char *const argv[]) { -int ret; -char *tst_path; +int ret =0 ; + +char *tests[] = { +"alchemytests_alarm1" , +"alchemytests_buffer1" , +"alchemytests_event1" , +"alchemytests_heap1" , +"alchemytests_heap2" , +"alchemytests_mq1" , +"alchemytests_mq2" , +"alchemytests_mq3" , +"alchemytests_mutex1" , +"alchemytests_pipe1" , +"alchemytests_sem1" , +"alchemytests_sem2" , +"alchemytests_task1" , +"alchemytests_task2" , +"alchemytests_task3" , +"alchemytests_task4" , +"alchemytests_task5" , +"alchemytests_task6" , +"alchemytests_task7" , +"alchemytests_task8" , +"alchemytests_task9" , +"alchemytests_task10" + }; - ret =asprintf (&tst_path,"%s/%s --cpu-affinity=0" ,XENO_TEST_DIR , t->name); -if (ret ==-1 ) -return -ENOMEM ; +for (size_t t =0 ; t <sizeof (tests) /sizeof (tests[0 ]); t++) + { +int fails =0 ; - ret =system (tst_path); -free (tst_path); + ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], argc, argv); +if (ret) { + fails++; +if (smokey_keep_going) +continue ; +if (smokey_verbose_mode) +error (1 , -ret,"test %s failed" , tests[t]); +return 1 ; + } +smokey_note ("%s OK" , tests[t]); + }return ret; } +smokey_test_plugin (alchemytests,SMOKEY_NOARGS ,"Run external alchemytests" ); -TEST(alchemytests) -TEST(alchemytests_alarm1) -TEST(alchemytests_buffer1) -TEST(alchemytests_event1) -TEST(alchemytests_heap1) -TEST(alchemytests_heap2) -TEST(alchemytests_mq1) -TEST(alchemytests_mq2) -TEST(alchemytests_mq3) -TEST(alchemytests_mutex1) -TEST(alchemytests_pipe1) -TEST(alchemytests_sem1) -TEST(alchemytests_sem2) -TEST(alchemytests_task1) -TEST(alchemytests_task2) -TEST(alchemytests_task3) -TEST(alchemytests_task4) -TEST(alchemytests_task5) -TEST(alchemytests_task6) -TEST(alchemytests_task7) -TEST(alchemytests_task8) -TEST(alchemytests_task9) -TEST(alchemytests_task10)
Signature · 1 line
2.35.3
PATCH 3/5 testsuite: Merge psostests in a single smokey case
In reply to Aaron MarcherCleans up includes
--- testsuite/smokey/psostests/psostests.c | 111 +++++++++++++------------ 1 file changed, 56 insertions(+), 55 deletions(-)
testsuite/smokey/psostests/psostests.c +56 -55
@@ -1,68 +1,69 @@// SPDX-License-Identifier: GPL-2.0 #include <error.h> -#include <libgen.h> -#include <smokey/smokey.h> -#include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <unistd.h> - -#define TEST (name) \ - smokey_test_plugin(name, SMOKEY_NOARGS, "Run external test"); \ - static int run_##name(struct smokey_test *t, int argc, char *const argv[]) \ - { \ - return __run_extprog(t, argc, argv); \ - } +#include <smokey/smokey.h> -static int __run_extprog (struct smokey_test *t,int argc,char *const argv[]) +static int run_psostests (struct smokey_test *t,int argc,char *const argv[]) { -int ret; -char *tst_path; +int ret =0 ; + +char *tests[] = { +"psostests_mq1" , +"psostests_mq2" , +"psostests_mq3" , +"psostests_pt1" , +// 0"000.679| BUG in __traceobj_assert_failed(): [rn1] trace assertion failed: +// testsuite/psostests/rn-1.c:46 +// => "ret == 0" +//"psostests_rn1" +"psostests_sem1" , +"psostests_sem2" , +"psostests_task1" , +// 0"014.452| BUG in __traceobj_assert_failed(): [FGND] trace assertion failed: +// ../../../../../../../../../workspace/sources/xenomai/testsuite/smokey/psostests/task-2.c:56 => "ret == 0" +//"psostests_task2", +"psostests_task3" , +"psostests_task4" , +"psostests_task5" , +// 0"011.370| BUG in __traceobj_assert_failed(): [FGND] trace assertion failed: +// testsuite/psostests/task-6.c:62 +// => "ret == 0 && oldprio == myprio" +//"psostests_task6", +"psostests_task7" , +// Runs forever (100% CPU) +//"psostests_task8" +// 0"002.198| WARNING: [main] lack of resources for core thread, EBUSY +// 0"003.421| BUG in __traceobj_assert_failed(): [root] trace assertion failed: +// ../../../../../../../../../workspace/sources/xenomai/testsuite/smokey/psostests/task-9.c:29 => "ret == 0" +//"psostests_task9", +"psostests_tm1" , +"psostests_tm2" , +"psostests_tm3" , +"psostests_tm4" , +"psostests_tm5" , +"psostests_tm6" , +"psostests_tm7" + }; - ret =asprintf (&tst_path,"%s/%s --cpu-affinity=0" ,XENO_TEST_DIR , t->name); -if (ret ==-1 ) -return -ENOMEM ; +for (size_t t =0 ; t <sizeof (tests) /sizeof (tests[0 ]); t++) + { +int fails =0 ; - ret =system (tst_path); -free (tst_path); + ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], argc, argv); +if (ret) { + fails++; +if (smokey_keep_going) +continue ; +if (smokey_verbose_mode) +error (1 , -ret,"test %s failed" , tests[t]); +return 1 ; + } +smokey_note ("%s OK" , tests[t]); + }return ret; } +smokey_test_plugin (psostests,SMOKEY_NOARGS ,"Run external psostests" ); -TEST(psostests) -TEST(psostests_mq1) -TEST(psostests_mq2) -TEST(psostests_mq3) -TEST(psostests_pt1) -// 0"000.679| BUG in __traceobj_assert_failed(): [rn1] trace assertion failed: -// testsuite/psostests/rn-1.c:46 -// => "ret == 0" -//TEST(psostests_rn1) -TEST(psostests_sem1) -TEST(psostests_sem2) -TEST(psostests_task1) -// 0"014.452| BUG in __traceobj_assert_failed(): [FGND] trace assertion failed: -// ../../../../../../../../../workspace/sources/xenomai/testsuite/smokey/psostests/task-2.c:56 => "ret == 0" -//TEST(psostests_task2) -TEST(psostests_task3) -TEST(psostests_task4) -TEST(psostests_task5) -// 0"011.370| BUG in __traceobj_assert_failed(): [FGND] trace assertion failed: -// testsuite/psostests/task-6.c:62 -// => "ret == 0 && oldprio == myprio" -// TEST(psostests_task6) -TEST(psostests_task7) -// runs forever (100% CPU) -//TEST(psostests_task8) -// 0"002.198| WARNING: [main] lack of resources for core thread, EBUSY -// 0"003.421| BUG in __traceobj_assert_failed(): [root] trace assertion failed: -// ../../../../../../../../../workspace/sources/xenomai/testsuite/smokey/psostests/task-9.c:29 => "ret == 0" -//TEST(psostests_task9) -TEST(psostests_tm1) -TEST(psostests_tm2) -TEST(psostests_tm3) -TEST(psostests_tm4) -TEST(psostests_tm5) -TEST(psostests_tm6) -TEST(psostests_tm7)
Signature · 1 line
2.35.3
PATCH 4/5 testsuite: Merge vxworkstests in a single smokey case
In reply to Aaron MarcherCleans up includes
--- testsuite/smokey/vxworkstests/vxworkstests.c | 66 ++++++++++---------- 1 file changed, 34 insertions(+), 32 deletions(-)
testsuite/smokey/vxworkstests/vxworkstests.c +34 -32
@@ -1,45 +1,47 @@// SPDX-License-Identifier: GPL-2.0 #include <error.h> -#include <libgen.h> -#include <smokey/smokey.h> -#include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <unistd.h> - -#define TEST (name) \ - smokey_test_plugin(name, SMOKEY_NOARGS, "Run external test"); \ - static int run_##name(struct smokey_test *t, int argc, char *const argv[]) \ - { \ - return __run_extprog(t, argc, argv); \ - } +#include <smokey/smokey.h> -static int __run_extprog (struct smokey_test *t,int argc,char *const argv[]) +static int run_vxworkstests (struct smokey_test *t,int argc,char *const argv[]) { -int ret; -char *tst_path; +int ret =0 ; + +char *tests[] = { +"vxworkstests" , +"vxworkstests_lst1" , +"vxworkstests_msgQ1" , +"vxworkstests_msgQ2" , +"vxworkstests_msgQ3" , +"vxworkstests_rng1" , +"vxworkstests_sem1" , +"vxworkstests_sem2" , +"vxworkstests_sem3" , +"vxworkstests_sem4" , +"vxworkstests_wd1" , +"vxworkstests_task1" , +"vxworkstests_task2" + }; - ret =asprintf (&tst_path,"%s/%s --cpu-affinity=0" ,XENO_TEST_DIR , t->name); -if (ret ==-1 ) -return -ENOMEM ; +for (size_t t =0 ; t <sizeof (tests) /sizeof (tests[0 ]); t++) + { +int fails =0 ; - ret =system (tst_path); -free (tst_path); + ret =smokey_run_extprog (XENO_TEST_DIR , tests[t], argc, argv); +if (ret) { + fails++; +if (smokey_keep_going) +continue ; +if (smokey_verbose_mode) +error (1 , -ret,"test %s failed" , tests[t]); +return 1 ; + } +smokey_note ("%s OK" , tests[t]); + }return ret; } +smokey_test_plugin (vxworkstests,SMOKEY_NOARGS ,"Run external vxworkstests" ); -TEST(vxworkstests) -TEST(vxworkstests_lst1) -TEST(vxworkstests_msgQ1) -TEST(vxworkstests_msgQ2) -TEST(vxworkstests_msgQ3) -TEST(vxworkstests_rng1) -TEST(vxworkstests_sem1) -TEST(vxworkstests_sem2) -TEST(vxworkstests_sem3) -TEST(vxworkstests_sem4) -TEST(vxworkstests_wd1) -TEST(vxworkstests_task1) -TEST(vxworkstests_task2)
Signature · 1 line
2.35.3
PATCH 5/5 testsuite: Drop skin test "drivers"
In reply to Aaron MarcherEach skin-testsuite now has its own respective smokey test case, which runs all underlying tests and returns appropriately.
--- testsuite/smokey/alchemytests/Makefile.am | 12 ------- .../smokey/alchemytests/alchemytests_driver.c | 33 ------------------- testsuite/smokey/psostests/Makefile.am | 10 ------ testsuite/smokey/psostests/psostests_driver.c | 33 ------------------- testsuite/smokey/vxworkstests/Makefile.am | 10 ------ .../smokey/vxworkstests/vxworkstests_driver.c | 33 ------------------- 6 files changed, 131 deletions(-) delete mode 100644 testsuite/smokey/alchemytests/alchemytests_driver.c delete mode 100644 testsuite/smokey/psostests/psostests_driver.c delete mode 100644 testsuite/smokey/vxworkstests/vxworkstests_driver.c
testsuite/smokey/alchemytests/Makefile.am +0 -12
@@ -11,7 +11,6 @@ libalchemytests_a_CPPFLAGS = \ CCLD = $(top_srcdir)/scripts/wrap-link.sh $(CC) test_PROGRAMS = \ - alchemytests \ alchemytests_alarm1 \ alchemytests_buffer1 \ alchemytests_event1 \
@@ -46,17 +45,6 @@ alchemyldadd = \ @XENO_USER_LDADD@ \ -lpthread -lrt -lm -alchemytests_SOURCES = alchemytests_driver.c -alchemytests_CPPFLAGS = \ - $(XENO_USER_CFLAGS) \ - -I$(top_srcdir)/include -alchemytests_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ -alchemytests_LDADD = \ - ../../../lib/smokey/libsmokey@[email protected] \ - @XENO_CORE_LDADD@ \ - @XENO_USER_LDADD@ \ - -lpthread -lrt - alchemytests_alarm1_SOURCES = alarm-1.c alchemytests_alarm1_CPPFLAGS = $(alchemycppflags) alchemytests_alarm1_LDADD = $(alchemyldadd)
testsuite/smokey/alchemytests/alchemytests_driver.c deleted +0 -33
@@ -1,33 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -#include <error.h> -#include <libgen.h> -#include <smokey/smokey.h> -#include <stdbool.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> - -int main (int argc,char *const argv[]) -{ -struct smokey_test *t; -int ret, fails =0 ; - -if (pvlist_empty (&smokey_test_list)) -return 0 ; - -for_each_smokey_test (t) { - ret = t->run (t, argc, argv); -if (ret) { - fails++; -if (smokey_keep_going) -continue ; -if (smokey_verbose_mode) -error (1 , -ret,"test %s failed" , t->name); -return 1 ; - } -smokey_note ("%s OK" , t->name); - } - -return fails !=0 ; -}
testsuite/smokey/psostests/Makefile.am +0 -10
@@ -11,7 +11,6 @@ libpsostests_a_CPPFLAGS = \ CCLD = $(top_srcdir)/scripts/wrap-link.sh $(CC) test_PROGRAMS = \ - psostests \ psostests_mq1 \ psostests_mq2 \ psostests_mq3 \
@@ -48,15 +47,6 @@ psosldadd = \ @XENO_USER_LDADD@ \ -lpthread -lrt -lm -psostests_SOURCES = psostests_driver.c -psostests_CPPFLAGS = $(psoscppflags) -psostests_LDADD = \ - ../../../lib/smokey/libsmokey@[email protected] \ - @XENO_CORE_LDADD@ \ - @XENO_USER_LDADD@ \ - -lpthread -lrt -psostests_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ $(XENO_POSIX_WRAPPERS) - psostests_mq1_SOURCES = mq-1.c psostests_mq1_CPPFLAGS = $(psoscppflags) psostests_mq1_LDADD = $(psosldadd)
testsuite/smokey/psostests/psostests_driver.c deleted +0 -33
@@ -1,33 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -#include <error.h> -#include <libgen.h> -#include <smokey/smokey.h> -#include <stdbool.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> - -int main (int argc,char *const argv[]) -{ -struct smokey_test *t; -int ret, fails =0 ; - -if (pvlist_empty (&smokey_test_list)) -return 0 ; - -for_each_smokey_test (t) { - ret = t->run (t, argc, argv); -if (ret) { - fails++; -if (smokey_keep_going) -continue ; -if (smokey_verbose_mode) -error (1 , -ret,"test %s failed" , t->name); -return 1 ; - } -smokey_note ("%s OK" , t->name); - } - -return fails !=0 ; -}
testsuite/smokey/vxworkstests/Makefile.am +0 -10
@@ -11,7 +11,6 @@ libvxworkstests_a_CPPFLAGS = \ CCLD = $(top_srcdir)/scripts/wrap-link.sh $(CC) test_PROGRAMS = \ - vxworkstests \ vxworkstests_lst1 \ vxworkstests_msgQ1 \ vxworkstests_msgQ2 \
@@ -36,15 +35,6 @@ vxworksldadd = \ @XENO_USER_LDADD@ \ -lpthread -lrt -lm -vxworkstests_SOURCES = vxworkstests_driver.c -vxworkstests_CPPFLAGS = $(vxworkscppflags) -vxworkstests_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ $(XENO_POSIX_WRAPPERS) -vxworkstests_LDADD = \ - ../../../lib/smokey/libsmokey@[email protected] \ - @XENO_CORE_LDADD@ \ - @XENO_USER_LDADD@ \ - -lpthread -lrt - vxworkstests_lst1_SOURCES = lst-1.c vxworkstests_lst1_CPPFLAGS = $(vxworkscppflags) vxworkstests_lst1_LDADD = $(vxworksldadd)
testsuite/smokey/vxworkstests/vxworkstests_driver.c deleted +0 -33
@@ -1,33 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -#include <error.h> -#include <libgen.h> -#include <smokey/smokey.h> -#include <stdbool.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> - -int main (int argc,char *const argv[]) -{ -struct smokey_test *t; -int ret, fails =0 ; - -if (pvlist_empty (&smokey_test_list)) -return 0 ; - -for_each_smokey_test (t) { - ret = t->run (t, argc, argv); -if (ret) { - fails++; -if (smokey_keep_going) -continue ; -if (smokey_verbose_mode) -error (1 , -ret,"test %s failed" , t->name); -return 1 ; - } -smokey_note ("%s OK" , t->name); - } - -return fails !=0 ; -}
Signature · 1 line
2.35.3
Re: [PATCH 0/5] Improvements for smokey skintests
In reply to Aaron MarcherQuoted 12 lines · Aaron Marcher
Merges all skin-related testsuite parts into common top-level smokey testcases, which in turn spawn all the related skin tests - as discussed before.
Additionally cleans up some includes and more.
Aaron Marcher (5):
lib: Addsmokey_run_extprogas helper for testsuite
testsuite: Merge alchemytests in single smokey case
testsuite: Merge psostests in a single smokey case
testsuite: Merge vxworkstests in a single smokey case
testsuite: Drop skin test "drivers"
Quoted 16 lines
include/smokey/smokey.h | 2 + lib/smokey/helpers.c | 15 +++ testsuite/smokey/alchemytests/Makefile.am | 12 -- testsuite/smokey/alchemytests/alchemytests.c | 85 +++++++------- .../smokey/alchemytests/alchemytests_driver.c | 33 ------ testsuite/smokey/psostests/Makefile.am | 10 -- testsuite/smokey/psostests/psostests.c | 111 +++++++++--------- testsuite/smokey/psostests/psostests_driver.c | 33 ------ testsuite/smokey/vxworkstests/Makefile.am | 10 -- testsuite/smokey/vxworkstests/vxworkstests.c | 66 ++++++----- .../smokey/vxworkstests/vxworkstests_driver.c | 33 ------ 11 files changed, 150 insertions(+), 260 deletions(-) delete mode 100644 testsuite/smokey/alchemytests/alchemytests_driver.c delete mode 100644 testsuite/smokey/psostests/psostests_driver.c delete mode 100644 testsuite/smokey/vxworkstests/vxworkstests_driver.c
I'm giving this a spin in 'next' already, but I would still like to hear an answer on my question on patch 1. Maybe that could be put into commit message for that patch later on...
Thanks,
Jan
Signature · 2 lines
Siemens AG, Technology Linux Expert Center
Re: [PATCH 01/10] testsuite: Fully integrate alchemytests into smokey
In reply to Jan KiszkaHi Jan,
sent you a patch series on top of next, fixing/improving the discussed points. Let me know what you think of the solution I came up with.
Thanks,
Aaron
Signature · 2 lines
sigma star gmbh | Eduard-Bodem-Gasse 6, 6020 Innsbruck, AUT UID/VAT Nr: ATU 66964118 | FN: 374287y
Quoted 9 lines · Jan Kiszka
Hi Aaron,
Any news on this?
Jan
Signature · 2 lines
Siemens AG, Technology Linux Expert Center
Re: [PATCH 01/10] testsuite: Fully integrate alchemytests into smokey
In reply to Florian BezdekaHi,
Quoted 4 lines
IMHO includes can be cleaned up. Can't spot a usage of
error.h,libgen.h,stdbool.handunistd.h(at least).Applies to more locations within this series.
Oh, missed that one. Thanks for the note, will fix.
Quoted 8 lines
The following applies here and on several other places of this series:
Do we really want to have a test plugin for each sub-test? I would have expected one plugin for each "test class", so basically one for each sub folder in testsuite/smokey.
Each module could then call all the sub-tests and report back which one actually failed - if any.
Hm, I will have a look if that is easily changeable, as I had some troubles with linking the Smokey plugins together initially when trying to create a plugin for each "class" (which was planned originally).
Quoted 2 lines
Btw: I think Jan already reported that: I have to disable the
vxworkstests_task2test as it fails CI runs here.
I think Jan posted a fix already afterwards?
Best regards,
Aaron
Signature · 2 lines
sigma star gmbh | Eduard-Bodem-Gasse 6, 6020 Innsbruck, AUT UID/VAT Nr: ATU 66964118 | FN: 374287y
Quoted 99 lines · Florian Bezdeka
Quoted 10 lines · Aaron Marcher
This is the very first step to have the alchemy tests embedded into our testsuite.
Build them using Xenomai's build system and hook them up using Smokey. Every test binary has it's own respective testcase in the testsuite.
Signed-off-by Richard Weinberger <[email protected]>Signed-off-by Aaron Marcher <[email protected]>---
[snip]
Quoted 7 lines
testsuite/smokey/alchemytests/alchemytests.c new file +0
-0testsuite/smokey/alchemytests/alchemytests.c line 9
Quoted 9 lines
testsuite/smokey/alchemytests/alchemytests.c new file +9
-0@@ -0,0 +1,56 @@ +// SPDX-License-Identifier: GPL-2.0 +#include <error.h> +#include <libgen.h> +#include <smokey/smokey.h> +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> IMHO includes can be cleaned up. Can't spot a usage of
error.h,libgen.h,stdbool.handunistd.h(at least).Applies to more locations within this series.
Quoted 37 lines
testsuite/smokey/alchemytests/alchemytests.c new file +37
-0+ +#define TEST (name) \ + smokey_test_plugin(name, SMOKEY_NOARGS, "Run external test"); \ + static int run_##name(struct smokey_test *t, int argc, char *const argv[]) \ + { \ + return __run_extprog(t, argc, argv); \ + } + +static int __run_extprog (struct smokey_test *t,int argc,char *const argv[]) +{ +int ret; +char *tst_path; + + ret =asprintf (&tst_path,"%s/%s --cpu-affinity=0" ,XENO_TEST_DIR , t->name); +if (ret ==-1 ) +return -ENOMEM ; + + ret =system (tst_path); +free (tst_path); + +return ret; +} + +TEST(alchemytests) +TEST(alchemytests_alarm1) +TEST(alchemytests_buffer1) +TEST(alchemytests_event1) +TEST(alchemytests_heap1) +TEST(alchemytests_heap2) +TEST(alchemytests_mq1) +TEST(alchemytests_mq2) +TEST(alchemytests_mq3) +TEST(alchemytests_mutex1) +TEST(alchemytests_pipe1) +TEST(alchemytests_sem1) +TEST(alchemytests_sem2) +TEST(alchemytests_task1)testsuite/smokey/alchemytests/alchemytests.c line 56
Quoted 10 lines
testsuite/smokey/alchemytests/alchemytests.c new file +10
-0+TEST(alchemytests_task2) +TEST(alchemytests_task3) +TEST(alchemytests_task4) +TEST(alchemytests_task5) +TEST(alchemytests_task6) +TEST(alchemytests_task7) +TEST(alchemytests_task8) +TEST(alchemytests_task9) +TEST(alchemytests_task10) +The following applies here and on several other places of this series:
Do we really want to have a test plugin for each sub-test? I would have expected one plugin for each "test class", so basically one for each sub folder in testsuite/smokey.
Each module could then call all the sub-tests and report back which one actually failed - if any.
Btw: I think Jan already reported that: I have to disable the
vxworkstests_task2test as it fails CI runs here.Best regards,
Florian
Re: [PATCH 01/10] testsuite: Fully integrate alchemytests into smokey
Quoted 18 lines · Aaron Marcher
Hi,
Quoted 4 lines
IMHO includes can be cleaned up. Can't spot a usage of
error.h,libgen.h,stdbool.handunistd.h(at least).Applies to more locations within this series.
Oh, missed that one. Thanks for the note, will fix.
Quoted 8 lines
The following applies here and on several other places of this series:
Do we really want to have a test plugin for each sub-test? I would have expected one plugin for each "test class", so basically one for each sub folder in testsuite/smokey.
Each module could then call all the sub-tests and report back which one actually failed - if any.
Quoted 8 lines
Hm, I will have a look if that is easily changeable, as I had some troubles with linking the Smokey plugins together initially when trying to create a plugin for each "class" (which was planned originally).
Quoted 2 lines
Btw: I think Jan already reported that: I have to disable the
vxworkstests_task2test as it fails CI runs here.I think Jan posted a fix already afterwards?
Yes, task2 should be fine now. I had some other tests failing in some qemu build these days, see
https://source.denx.de/Xenomai/xenomai-images/-/jobs/675985.
Jan
Signature · 2 lines
Siemens AG, Technology Linux Expert Center
PATCH v4 2/10 testsuite: Fully integrate psostests into smokey
In reply to Aaron MarcherJust like for alchemytests, integrate them into our testsuite.
---
configure.ac | 2 +-
lib/psos/testsuite/Makefile | 49 ------
testsuite/Makefile.am | 2 -
testsuite/smokey/Makefile.am | 9 +-
testsuite/smokey/psostests/Makefile.am | 148 ++++++++++++++++++
.../smokey/psostests}/mq-1.c | 1 +
.../smokey/psostests}/mq-2.c | 1 +
.../smokey/psostests}/mq-3.c | 1 +
testsuite/smokey/psostests/psostests.c | 57 +++++++
testsuite/smokey/psostests/psostests_driver.c | 34 ++++
.../smokey/psostests}/pt-1.c | 1 +
.../smokey/psostests}/rn-1.c | 1 +
.../smokey/psostests}/sem-1.c | 1 +
.../smokey/psostests}/sem-2.c | 1 +
.../smokey/psostests}/task-1.c | 1 +
.../smokey/psostests}/task-2.c | 1 +
.../smokey/psostests}/task-3.c | 1 +
.../smokey/psostests}/task-4.c | 1 +
.../smokey/psostests}/task-5.c | 1 +
.../smokey/psostests}/task-6.c | 1 +
.../smokey/psostests}/task-7.c | 1 +
.../smokey/psostests}/task-8.c | 1 +
.../smokey/psostests}/task-9.c | 1 +
.../smokey/psostests}/tm-1.c | 1 +
.../smokey/psostests}/tm-2.c | 1 +
.../smokey/psostests}/tm-3.c | 1 +
.../smokey/psostests}/tm-4.c | 1 +
.../smokey/psostests}/tm-5.c | 1 +
.../smokey/psostests}/tm-6.c | 1 +
.../smokey/psostests}/tm-7.c | 1 +
30 files changed, 269 insertions(+), 55 deletions(-)
delete mode 100644 lib/psos/testsuite/Makefile
create mode 100644 testsuite/smokey/psostests/Makefile.am
rename {lib/psos/testsuite => testsuite/smokey/psostests}/mq-1.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/mq-2.c (98%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/mq-3.c (98%)
create mode 100644 testsuite/smokey/psostests/psostests.c
create mode 100644 testsuite/smokey/psostests/psostests_driver.c
rename {lib/psos/testsuite => testsuite/smokey/psostests}/pt-1.c (96%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/rn-1.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/sem-1.c (98%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/sem-2.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-1.c (95%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-2.c (98%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-3.c (96%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-4.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-5.c (98%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-6.c (98%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-7.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-8.c (98%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-9.c (98%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-1.c (95%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-2.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-3.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-4.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-5.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-6.c (95%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-7.c (95%)configure.ac +1 -1
@@ -1044,9 +1044,9 @@ AC_CONFIG_FILES([ \ testsuite/smokey/can/Makefile \ testsuite/smokey/x86io/Makefile \ testsuite/smokey/alchemytests/Makefile \ + testsuite/smokey/psostests/Makefile \ testsuite/clocktest/Makefile \ testsuite/xeno-test/Makefile \ - testsuite/psostests/Makefile \ testsuite/vxworkstests/Makefile \ utils/Makefile \ utils/hdb/Makefile \
lib/psos/testsuite/Makefile deleted +0 -49
49 lines not on this page · raw message
testsuite/Makefile.am +0 -2
@@ -8,7 +8,6 @@ SUBDIRS += \ spitest \ switchtest \ xeno-test \ - psostests \ vxworkstests endif
@@ -21,5 +20,4 @@ DIST_SUBDIRS = \ spitest \ switchtest \ xeno-test \ - psostests \ vxworkstests
testsuite/smokey/Makefile.am +6 -3
@@ -41,13 +41,15 @@ COBALT_SUBDIRS = \ vdso-access \ xddp \ y2038 \ - alchemytests + alchemytests \ + psostests MERCURY_SUBDIRS = \ memory-heapmem \ memory-tlsf \ memcheck \ - alchemytests + alchemytests \ + psostests DIST_SUBDIRS = \ arith \
@@ -83,7 +85,8 @@ DIST_SUBDIRS = \ vdso-access \ xddp \ y2038 \ - alchemytests + alchemytests \ + psostests if XENO_X86 DIST_SUBDIRS += x86io
testsuite/smokey/psostests/Makefile.am new file +148 -0
148 lines not on this page · raw message
testsuite/smokey/psostests/mq-1.c renamed from lib/psos/testsuite/mq-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/mq-2.c renamed from lib/psos/testsuite/mq-2.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/mq-3.c renamed from lib/psos/testsuite/mq-3.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/psostests.c new file +57 -0
57 lines not on this page · raw message
testsuite/smokey/psostests/psostests_driver.c new file +34 -0
@@ -0,0 +1,34 @@ +// SPDX-License-Identifier: GPL-2.0 +#include <error.h> +#include <libgen.h> +#include <smokey/smokey.h> +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> + +int main (int argc,char *const argv[]) +{ +struct smokey_test *t; +int ret, fails =0 ; + +if (pvlist_empty (&smokey_test_list)) +return 0 ; + +for_each_smokey_test (t) { + ret = t->run (t, argc, argv); +if (ret) { + fails++; +if (smokey_keep_going) +continue ; +if (smokey_verbose_mode) +error (1 , -ret,"test %s failed" , t->name); +return 1 ; + } +smokey_note ("%s OK" , t->name); + } + +return fails !=0 ; +} +
testsuite/smokey/psostests/pt-1.c renamed from lib/psos/testsuite/pt-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <memory.h>
testsuite/smokey/psostests/rn-1.c renamed from lib/psos/testsuite/rn-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <memory.h>
testsuite/smokey/psostests/sem-1.c renamed from lib/psos/testsuite/sem-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/sem-2.c renamed from lib/psos/testsuite/sem-2.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/task-1.c renamed from lib/psos/testsuite/task-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/task-2.c renamed from lib/psos/testsuite/task-2.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/task-3.c renamed from lib/psos/testsuite/task-3.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/task-4.c renamed from lib/psos/testsuite/task-4.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/task-5.c renamed from lib/psos/testsuite/task-5.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/task-6.c renamed from lib/psos/testsuite/task-6.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/task-7.c renamed from lib/psos/testsuite/task-7.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/task-8.c renamed from lib/psos/testsuite/task-8.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <xeno_config.h>
testsuite/smokey/psostests/task-9.c renamed from lib/psos/testsuite/task-9.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/tm-1.c renamed from lib/psos/testsuite/tm-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/tm-2.c renamed from lib/psos/testsuite/tm-2.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/tm-3.c renamed from lib/psos/testsuite/tm-3.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/tm-4.c renamed from lib/psos/testsuite/tm-4.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/tm-5.c renamed from lib/psos/testsuite/tm-5.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/tm-6.c renamed from lib/psos/testsuite/tm-6.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/tm-7.c renamed from lib/psos/testsuite/tm-7.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
Signature · 1 line
2.35.3
PATCH v4 3/10 testsuite: Fully integrate vwworkstests into smokey
In reply to Aaron MarcherSame as for alchemytests and psostests.
---
configure.ac | 2 +-
lib/vxworks/testsuite/Makefile | 43 ---------
testsuite/Makefile.am | 6 +-
testsuite/smokey/Makefile.am | 3 +
testsuite/smokey/vxworkstests/Makefile.am | 94 +++++++++++++++++++
.../smokey/vxworkstests}/lst-1.c | 1 +
.../smokey/vxworkstests}/msgQ-1.c | 1 +
.../smokey/vxworkstests}/msgQ-2.c | 1 +
.../smokey/vxworkstests}/msgQ-3.c | 1 +
.../smokey/vxworkstests}/rng-1.c | 1 +
.../smokey/vxworkstests}/sem-1.c | 1 +
.../smokey/vxworkstests}/sem-2.c | 1 +
.../smokey/vxworkstests}/sem-3.c | 1 +
.../smokey/vxworkstests}/sem-4.c | 1 +
.../smokey/vxworkstests}/task-1.c | 1 +
.../smokey/vxworkstests}/task-2.c | 1 +
testsuite/smokey/vxworkstests/vxworkstests.c | 46 +++++++++
.../smokey/vxworkstests/vxworkstests_driver.c | 33 +++++++
.../smokey/vxworkstests}/wd-1.c | 1 +
19 files changed, 191 insertions(+), 48 deletions(-)
delete mode 100644 lib/vxworks/testsuite/Makefile
create mode 100644 testsuite/smokey/vxworkstests/Makefile.am
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/lst-1.c (99%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/msgQ-1.c (98%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/msgQ-2.c (98%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/msgQ-3.c (98%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/rng-1.c (99%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-1.c (98%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-2.c (98%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-3.c (97%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-4.c (98%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/task-1.c (96%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/task-2.c (98%)
create mode 100644 testsuite/smokey/vxworkstests/vxworkstests.c
create mode 100644 testsuite/smokey/vxworkstests/vxworkstests_driver.c
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/wd-1.c (97%)configure.ac +1 -1
@@ -1045,9 +1045,9 @@ AC_CONFIG_FILES([ \ testsuite/smokey/x86io/Makefile \ testsuite/smokey/alchemytests/Makefile \ testsuite/smokey/psostests/Makefile \ + testsuite/smokey/vxworkstests/Makefile \ testsuite/clocktest/Makefile \ testsuite/xeno-test/Makefile \ - testsuite/vxworkstests/Makefile \ utils/Makefile \ utils/hdb/Makefile \ utils/can/Makefile \
lib/vxworks/testsuite/Makefile deleted +0 -43
43 lines not on this page · raw message
testsuite/Makefile.am +2 -4
@@ -7,8 +7,7 @@ SUBDIRS += \ gpiotest \ spitest \ switchtest \ - xeno-test \ - vxworkstests + xeno-test endif DIST_SUBDIRS = \
@@ -19,5 +18,4 @@ DIST_SUBDIRS = \ smokey \ spitest \ switchtest \ - xeno-test \ - vxworkstests + xeno-test
testsuite/smokey/Makefile.am +3 -0
@@ -42,6 +42,7 @@ COBALT_SUBDIRS = \ xddp \ y2038 \ alchemytests \ + vxworkstests \ psostests MERCURY_SUBDIRS = \
@@ -49,6 +50,7 @@ MERCURY_SUBDIRS = \ memory-tlsf \ memcheck \ alchemytests \ + vxworkstests \ psostests DIST_SUBDIRS = \
@@ -86,6 +88,7 @@ DIST_SUBDIRS = \ xddp \ y2038 \ alchemytests \ + vxworkstests \ psostests if XENO_X86
testsuite/smokey/vxworkstests/Makefile.am new file +94 -0
94 lines not on this page · raw message
testsuite/smokey/vxworkstests/lst-1.c renamed from lib/vxworks/testsuite/lst-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/vxworkstests/msgQ-1.c renamed from lib/vxworks/testsuite/msgQ-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/vxworkstests/msgQ-2.c renamed from lib/vxworks/testsuite/msgQ-2.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/vxworkstests/msgQ-3.c renamed from lib/vxworks/testsuite/msgQ-3.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/vxworkstests/rng-1.c renamed from lib/vxworks/testsuite/rng-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdlib.h> #include <string.h> #include <stdio.h>
testsuite/smokey/vxworkstests/sem-1.c renamed from lib/vxworks/testsuite/sem-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/vxworkstests/sem-2.c renamed from lib/vxworks/testsuite/sem-2.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/vxworkstests/sem-3.c renamed from lib/vxworks/testsuite/sem-3.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/vxworkstests/sem-4.c renamed from lib/vxworks/testsuite/sem-4.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/vxworkstests/task-1.c renamed from lib/vxworks/testsuite/task-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/vxworkstests/task-2.c renamed from lib/vxworks/testsuite/task-2.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <unistd.h>
testsuite/smokey/vxworkstests/vxworkstests.c new file +46 -0
46 lines not on this page · raw message
testsuite/smokey/vxworkstests/vxworkstests_driver.c new file +33 -0
@@ -0,0 +1,33 @@ +// SPDX-License-Identifier: GPL-2.0 +#include <error.h> +#include <libgen.h> +#include <smokey/smokey.h> +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> + +int main (int argc,char *const argv[]) +{ +struct smokey_test *t; +int ret, fails =0 ; + +if (pvlist_empty (&smokey_test_list)) +return 0 ; + +for_each_smokey_test (t) { + ret = t->run (t, argc, argv); +if (ret) { + fails++; +if (smokey_keep_going) +continue ; +if (smokey_verbose_mode) +error (1 , -ret,"test %s failed" , t->name); +return 1 ; + } +smokey_note ("%s OK" , t->name); + } + +return fails !=0 ; +}
testsuite/smokey/vxworkstests/wd-1.c renamed from lib/vxworks/testsuite/wd-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
Signature · 1 line
2.35.3
PATCH v4 4/10 testsuite: Remove old alchemytests Makefile
In reply to Aaron MarcherFrom: Richard Weinberger <[email protected]>
--- lib/alchemy/testsuite/Makefile | 70 ---------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 lib/alchemy/testsuite/Makefile
lib/alchemy/testsuite/Makefile deleted +0 -70
@@ -1,70 +0,0 @@ -ifeq ($(DESTDIR),) -XENO_CONFIG=xeno-config -else -XENO_CONFIG=$(DESTDIR)/bin/xeno-config -endif - -prefix := $(shell DESTDIR=$(DESTDIR) $(XENO_CONFIG) --prefix) -solibs := $(shell DESTDIR=$(DESTDIR) $(XENO_CONFIG) --libdir) -core := $(shell DESTDIR=$(DESTDIR) $(XENO_CONFIG) --core) - -ifeq ($(prefix),) -$(error Please add <xenomai-install-path>/bin to your PATH variable or specify DESTDIR) -endif - -cobalt-only := pipe-1 -mercury-only := -core-specific = $($(core)-only) - -TESTS := \ - task-1 \ - task-2 \ - task-3 \ - task-4 \ - task-5 \ - task-6 \ - task-7 \ - task-8 \ - task-9 \ - task-10 \ - mq-1 \ - mq-2 \ - mq-3 \ - alarm-1 \ - sem-1 \ - sem-2 \ - mutex-1 \ - event-1 \ - heap-1 \ - heap-2 \ - buffer-1 \ - $(core-specific) - -CFLAGS := $(shell DESTDIR=$(DESTDIR) $(XENO_CONFIG) --skin=alchemy --cflags) -g -LDFLAGS := $(shell DESTDIR=$(DESTDIR) $(XENO_CONFIG) --skin=alchemy --ldflags) -CC = $(shell DESTDIR=$(DESTDIR) $(XENO_CONFIG) --cc) - -all: $(TESTS) - -%: %.c - $(CC) -o $@ $< $(CFLAGS) $(LDFLAGS) - -install: all - install -d $(prefix)/testsuite/alchemy - install -t $(prefix)/testsuite/alchemy $(TESTS) - -clean: - $(RM) $(TESTS) *~ - -# Run the test suite. We pin all tests to CPU #0, so that SMP does not -# alter the execution sequence we expect from them. -test: all - @for t in $(TESTS); do \ - echo -n $$t...; \ - sudo LD_LIBRARY_PATH=$(solibs) $(VALGRIND) ./$$t --cpu-affinity=0 --silent && echo ok || echo BAD; \ - done - -test/%: % - sudo LD_LIBRARY_PATH=$(solibs) $(VALGRIND) ./$(@F) --cpu-affinity=0 --silent && echo ok || echo BAD - -.PHONY: clean test
Signature · 1 line
2.35.3
PATCH v4 5/10 alchemytests: Fix gcc warning in buffer-1
In reply to Aaron MarcherFrom: Richard Weinberger <[email protected]>
Make n an unsigned integer, such that gcc realizes that "%.2d" cannot become negative and will fit into our 3 bytes buffer.
Fixes:
buffer-1.c:64:15: error: ‘%.2d’ directive writing between 2 and 10 bytes into a region of size 3 [-Werror=format-overflow=]
sprintf(s, "%.2d", 11 * n);
^~~~--- testsuite/smokey/alchemytests/buffer-1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
testsuite/smokey/alchemytests/buffer-1.c +1 -1
@@ -50,7 +50,7 @@ static void background_task(void *arg) {char c ='A' , s[3 ];ssize_t ret; -int n =0 ; +unsigned int n =0 ;traceobj_enter (&trobj);
Signature · 1 line
2.35.3
PATCH v4 6/10 alchemytests: Fix gcc warning in task-9
In reply to Aaron MarcherFrom: Richard Weinberger <[email protected]>
Make it static, no prototype needed anymore.
Fixes:
task-9.c:13:6: error: no previous prototype for ‘sighandler’ [-Werror=missing-prototypes]
void sighandler(int sig)
--- testsuite/smokey/alchemytests/task-9.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
testsuite/smokey/alchemytests/task-9.c +1 -1
@@ -11,7 +11,7 @@ static RT_TASK t_test;#define ONE_SECOND 1000000000ULL -void sighandler (int sig) +static void sighandler (int sig) {/* nop */ }
Signature · 1 line
2.35.3
PATCH v4 7/10 alchemytests: Check pipe-1 asprintf ret value
In reply to Aaron Marcher--- testsuite/smokey/alchemytests/pipe-1.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
testsuite/smokey/alchemytests/pipe-1.c +4 -2
@@ -49,11 +49,13 @@ static void realtime_task(void *arg)static void *regular_thread (void *arg) {struct pipe_message m; -int fd, seq =0 ; +int fd, res, seq =0 ;ssize_t ret;char *rtp; -asprintf (&rtp,"/dev/rtp%d" , minor); + res =asprintf (&rtp,"/dev/rtp%d" , minor); +if (res <0 ) +return NULL ; fd =open (rtp,O_RDWR );free (rtp);
Signature · 1 line
2.35.3
PATCH v4 8/10 alchemytests: Fix task-2
In reply to Aaron Marcherhttps://lore.kernel.org/xenomai/[email protected]/
--- testsuite/smokey/alchemytests/task-2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
testsuite/smokey/alchemytests/task-2.c +3 -1
@@ -29,8 +29,10 @@ static void background_task(void *arg)traceobj_mark (&trobj,2 ); -while (--safety >0 ) +while (--safety >0 ) { +compiler_barrier (); count++; + }traceobj_exit (&trobj); }
Signature · 1 line
2.35.3
Re: [PATCH 08/10] alchemytests: Fix task-2
----- Ursprüngliche Mail -----
Quoted 9 lines
Von: "aaron" <[email protected]>
An: "xenomai" <[email protected]>
CC: "richard" <[email protected]>, "Jan Kiszka" <[email protected]>, "aaron" <[email protected]>
Gesendet: Montag, 24. Juli 2023 15:52:37
Betreff: [PATCH 08/10] alchemytests: Fix task-2https://lore.kernel.org/xenomai/[email protected]/
Signed-off-by Aaron Marcher <[email protected]>
I think this changelog can be improved.
Thanks,
//richard
v6 cover Revive alchemy, pSOS and VxWorks tests
This patch series fully integrates the currently abandoned alchemy, pSOS and VxWorks tests into Xenomai's testsuite.
For each test, a Smokey testcase is hooked up.
Changes since v5:
- Improved task-2 fix commit message
Aaron Marcher (7):
testsuite: Fully integrate alchemytests into smokey
testsuite: Fully integrate psostests into smokey
testsuite: Fully integrate vwworkstests into smokey
alchemytests: Check pipe-1 asprintf ret value
alchemytests: Fix task-2
alchemytests: Fix task-5 logic
testsuite: disable broken tests
Richard Weinberger (3):
testsuite: Remove old alchemytests Makefile
alchemytests: Fix gcc warning in buffer-1
alchemytests: Fix gcc warning in task-9
configure.ac | 7 +-
lib/alchemy/testsuite/Makefile | 70 ---------
lib/psos/testsuite/Makefile | 49 ------
lib/vxworks/testsuite/Makefile | 43 -----
testsuite/smokey/Makefile.am | 15 +-
testsuite/smokey/alchemytests/Makefile.am | 148 ++++++++++++++++++
.../smokey/alchemytests}/alarm-1.c | 1 +
testsuite/smokey/alchemytests/alchemytests.c | 56 +++++++
.../smokey/alchemytests/alchemytests_driver.c | 33 ++++
.../smokey/alchemytests}/buffer-1.c | 3 +-
.../smokey/alchemytests}/event-1.c | 1 +
.../smokey/alchemytests}/heap-1.c | 1 +
.../smokey/alchemytests}/heap-2.c | 1 +
.../smokey/alchemytests}/mq-1.c | 1 +
.../smokey/alchemytests}/mq-2.c | 1 +
.../smokey/alchemytests}/mq-3.c | 1 +
.../smokey/alchemytests}/mutex-1.c | 1 +
.../smokey/alchemytests}/pipe-1.c | 7 +-
.../smokey/alchemytests}/sem-1.c | 1 +
.../smokey/alchemytests}/sem-2.c | 1 +
.../smokey/alchemytests}/task-1.c | 1 +
.../smokey/alchemytests}/task-10.c | 1 +
.../smokey/alchemytests}/task-2.c | 5 +-
.../smokey/alchemytests}/task-3.c | 1 +
.../smokey/alchemytests}/task-4.c | 1 +
.../smokey/alchemytests}/task-5.c | 11 +-
.../smokey/alchemytests}/task-6.c | 1 +
.../smokey/alchemytests}/task-7.c | 1 +
.../smokey/alchemytests}/task-8.c | 1 +
.../smokey/alchemytests}/task-9.c | 3 +-
testsuite/smokey/psostests/Makefile.am | 148 ++++++++++++++++++
.../smokey/psostests}/mq-1.c | 1 +
.../smokey/psostests}/mq-2.c | 1 +
.../smokey/psostests}/mq-3.c | 1 +
testsuite/smokey/psostests/psostests.c | 69 ++++++++
testsuite/smokey/psostests/psostests_driver.c | 34 ++++
.../smokey/psostests}/pt-1.c | 1 +
.../smokey/psostests}/rn-1.c | 1 +
.../smokey/psostests}/sem-1.c | 1 +
.../smokey/psostests}/sem-2.c | 1 +
.../smokey/psostests}/task-1.c | 1 +
.../smokey/psostests}/task-2.c | 1 +
.../smokey/psostests}/task-3.c | 1 +
.../smokey/psostests}/task-4.c | 1 +
.../smokey/psostests}/task-5.c | 1 +
.../smokey/psostests}/task-6.c | 1 +
.../smokey/psostests}/task-7.c | 1 +
.../smokey/psostests}/task-8.c | 1 +
.../smokey/psostests}/task-9.c | 1 +
.../smokey/psostests}/tm-1.c | 1 +
.../smokey/psostests}/tm-2.c | 1 +
.../smokey/psostests}/tm-3.c | 1 +
.../smokey/psostests}/tm-4.c | 1 +
.../smokey/psostests}/tm-5.c | 1 +
.../smokey/psostests}/tm-6.c | 1 +
.../smokey/psostests}/tm-7.c | 1 +
testsuite/smokey/vxworkstests/Makefile.am | 94 +++++++++++
.../smokey/vxworkstests}/lst-1.c | 1 +
.../smokey/vxworkstests}/msgQ-1.c | 1 +
.../smokey/vxworkstests}/msgQ-2.c | 1 +
.../smokey/vxworkstests}/msgQ-3.c | 1 +
.../smokey/vxworkstests}/rng-1.c | 1 +
.../smokey/vxworkstests}/sem-1.c | 1 +
.../smokey/vxworkstests}/sem-2.c | 1 +
.../smokey/vxworkstests}/sem-3.c | 1 +
.../smokey/vxworkstests}/sem-4.c | 1 +
.../smokey/vxworkstests}/task-1.c | 1 +
.../smokey/vxworkstests}/task-2.c | 1 +
testsuite/smokey/vxworkstests/vxworkstests.c | 46 ++++++
.../smokey/vxworkstests/vxworkstests_driver.c | 33 ++++
.../smokey/vxworkstests}/wd-1.c | 1 +
71 files changed, 749 insertions(+), 177 deletions(-)
delete mode 100644 lib/alchemy/testsuite/Makefile
delete mode 100644 lib/psos/testsuite/Makefile
delete mode 100644 lib/vxworks/testsuite/Makefile
create mode 100644 testsuite/smokey/alchemytests/Makefile.am
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/alarm-1.c (97%)
create mode 100644 testsuite/smokey/alchemytests/alchemytests.c
create mode 100644 testsuite/smokey/alchemytests/alchemytests_driver.c
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/buffer-1.c (97%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/event-1.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/heap-1.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/heap-2.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mq-1.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mq-2.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mq-3.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mutex-1.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/pipe-1.c (96%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/sem-1.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/sem-2.c (97%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-1.c (94%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-10.c (97%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-2.c (95%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-3.c (97%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-4.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-5.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-6.c (97%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-7.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-8.c (97%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-9.c (94%)
create mode 100644 testsuite/smokey/psostests/Makefile.am
rename {lib/psos/testsuite => testsuite/smokey/psostests}/mq-1.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/mq-2.c (98%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/mq-3.c (98%)
create mode 100644 testsuite/smokey/psostests/psostests.c
create mode 100644 testsuite/smokey/psostests/psostests_driver.c
rename {lib/psos/testsuite => testsuite/smokey/psostests}/pt-1.c (96%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/rn-1.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/sem-1.c (98%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/sem-2.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-1.c (95%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-2.c (98%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-3.c (96%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-4.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-5.c (98%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-6.c (98%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-7.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-8.c (98%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-9.c (98%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-1.c (95%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-2.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-3.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-4.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-5.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-6.c (95%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-7.c (95%)
create mode 100644 testsuite/smokey/vxworkstests/Makefile.am
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/lst-1.c (99%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/msgQ-1.c (98%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/msgQ-2.c (98%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/msgQ-3.c (98%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/rng-1.c (99%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-1.c (98%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-2.c (98%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-3.c (97%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-4.c (98%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/task-1.c (96%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/task-2.c (98%)
create mode 100644 testsuite/smokey/vxworkstests/vxworkstests.c
create mode 100644 testsuite/smokey/vxworkstests/vxworkstests_driver.c
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/wd-1.c (97%)Signature · 1 line
2.35.3
PATCH v4 1/10 testsuite: Fully integrate alchemytests into smokey
This is the very first step to have the alchemy tests embedded into our testsuite.
Build them using Xenomai's build system and hook them up using Smokey. Every test binary has it's own respective testcase in the testsuite.
---
configure.ac | 7 +-
testsuite/Makefile.am | 8 +-
testsuite/smokey/Makefile.am | 9 +-
testsuite/smokey/alchemytests/Makefile.am | 148 ++++++++++++++++++
.../smokey/alchemytests}/alarm-1.c | 1 +
testsuite/smokey/alchemytests/alchemytests.c | 56 +++++++
.../smokey/alchemytests/alchemytests_driver.c | 33 ++++
.../smokey/alchemytests}/buffer-1.c | 1 +
.../smokey/alchemytests}/event-1.c | 1 +
.../smokey/alchemytests}/heap-1.c | 1 +
.../smokey/alchemytests}/heap-2.c | 1 +
.../smokey/alchemytests}/mq-1.c | 1 +
.../smokey/alchemytests}/mq-2.c | 1 +
.../smokey/alchemytests}/mq-3.c | 1 +
.../smokey/alchemytests}/mutex-1.c | 1 +
.../smokey/alchemytests}/pipe-1.c | 1 +
.../smokey/alchemytests}/sem-1.c | 1 +
.../smokey/alchemytests}/sem-2.c | 1 +
.../smokey/alchemytests}/task-1.c | 1 +
.../smokey/alchemytests}/task-10.c | 1 +
.../smokey/alchemytests}/task-2.c | 1 +
.../smokey/alchemytests}/task-3.c | 1 +
.../smokey/alchemytests}/task-4.c | 1 +
.../smokey/alchemytests}/task-5.c | 1 +
.../smokey/alchemytests}/task-6.c | 1 +
.../smokey/alchemytests}/task-7.c | 1 +
.../smokey/alchemytests}/task-8.c | 1 +
.../smokey/alchemytests}/task-9.c | 1 +
28 files changed, 276 insertions(+), 7 deletions(-)
create mode 100644 testsuite/smokey/alchemytests/Makefile.am
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/alarm-1.c (97%)
create mode 100644 testsuite/smokey/alchemytests/alchemytests.c
create mode 100644 testsuite/smokey/alchemytests/alchemytests_driver.c
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/buffer-1.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/event-1.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/heap-1.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/heap-2.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mq-1.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mq-2.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mq-3.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mutex-1.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/pipe-1.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/sem-1.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/sem-2.c (97%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-1.c (94%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-10.c (97%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-2.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-3.c (97%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-4.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-5.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-6.c (97%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-7.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-8.c (97%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-9.c (97%)configure.ac +5 -2
@@ -1041,10 +1041,13 @@ AC_CONFIG_FILES([ \ testsuite/smokey/cpu-affinity/Makefile \ testsuite/smokey/gdb/Makefile \ testsuite/smokey/y2038/Makefile \ - testsuite/smokey/can/Makefile - testsuite/smokey/x86io/Makefile + testsuite/smokey/can/Makefile \ + testsuite/smokey/x86io/Makefile \ + testsuite/smokey/alchemytests/Makefile \ testsuite/clocktest/Makefile \ testsuite/xeno-test/Makefile \ + testsuite/psostests/Makefile \ + testsuite/vxworkstests/Makefile \ utils/Makefile \ utils/hdb/Makefile \ utils/can/Makefile \
testsuite/Makefile.am +6 -2
@@ -7,7 +7,9 @@ SUBDIRS += \ gpiotest \ spitest \ switchtest \ - xeno-test + xeno-test \ + psostests \ + vxworkstests endif DIST_SUBDIRS = \
@@ -18,4 +20,6 @@ DIST_SUBDIRS = \ smokey \ spitest \ switchtest \ - xeno-test + xeno-test \ + psostests \ + vxworkstests
testsuite/smokey/Makefile.am +6 -3
@@ -40,12 +40,14 @@ COBALT_SUBDIRS = \ tsc \ vdso-access \ xddp \ - y2038 + y2038 \ + alchemytests MERCURY_SUBDIRS = \ memory-heapmem \ memory-tlsf \ - memcheck + memcheck \ + alchemytests DIST_SUBDIRS = \ arith \
@@ -80,7 +82,8 @@ DIST_SUBDIRS = \ tsc \ vdso-access \ xddp \ - y2038 + y2038 \ + alchemytests if XENO_X86 DIST_SUBDIRS += x86io
testsuite/smokey/alchemytests/Makefile.am new file +148 -0
148 lines not on this page · raw message
testsuite/smokey/alchemytests/alarm-1.c renamed from lib/alchemy/testsuite/alarm-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/alchemytests.c new file +56 -0
56 lines not on this page · raw message
testsuite/smokey/alchemytests/alchemytests_driver.c new file +33 -0
@@ -0,0 +1,33 @@ +// SPDX-License-Identifier: GPL-2.0 +#include <error.h> +#include <libgen.h> +#include <smokey/smokey.h> +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> + +int main (int argc,char *const argv[]) +{ +struct smokey_test *t; +int ret, fails =0 ; + +if (pvlist_empty (&smokey_test_list)) +return 0 ; + +for_each_smokey_test (t) { + ret = t->run (t, argc, argv); +if (ret) { + fails++; +if (smokey_keep_going) +continue ; +if (smokey_verbose_mode) +error (1 , -ret,"test %s failed" , t->name); +return 1 ; + } +smokey_note ("%s OK" , t->name); + } + +return fails !=0 ; +}
testsuite/smokey/alchemytests/buffer-1.c renamed from lib/alchemy/testsuite/buffer-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <memory.h>
testsuite/smokey/alchemytests/event-1.c renamed from lib/alchemy/testsuite/event-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/heap-1.c renamed from lib/alchemy/testsuite/heap-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/heap-2.c renamed from lib/alchemy/testsuite/heap-2.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/mq-1.c renamed from lib/alchemy/testsuite/mq-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/mq-2.c renamed from lib/alchemy/testsuite/mq-2.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/mq-3.c renamed from lib/alchemy/testsuite/mq-3.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/mutex-1.c renamed from lib/alchemy/testsuite/mutex-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/pipe-1.c renamed from lib/alchemy/testsuite/pipe-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <fcntl.h>
testsuite/smokey/alchemytests/sem-1.c renamed from lib/alchemy/testsuite/sem-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/sem-2.c renamed from lib/alchemy/testsuite/sem-2.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/task-1.c renamed from lib/alchemy/testsuite/task-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/task-10.c renamed from lib/alchemy/testsuite/task-10.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/task-2.c renamed from lib/alchemy/testsuite/task-2.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/task-3.c renamed from lib/alchemy/testsuite/task-3.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/task-4.c renamed from lib/alchemy/testsuite/task-4.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/task-5.c renamed from lib/alchemy/testsuite/task-5.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/task-6.c renamed from lib/alchemy/testsuite/task-6.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/task-7.c renamed from lib/alchemy/testsuite/task-7.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/task-8.c renamed from lib/alchemy/testsuite/task-8.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/task-9.c renamed from lib/alchemy/testsuite/task-9.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <signal.h>
Signature · 1 line
2.35.3
Re: [PATCH 01/10] testsuite: Fully integrate alchemytests into smokey
Quoted 101 lines · Aaron Marcher
This is the very first step to have the alchemy tests embedded into our testsuite.
Build them using Xenomai's build system and hook them up using Smokey. Every test binary has it's own respective testcase in the testsuite.
Signed-off-by Richard Weinberger <[email protected]>Signed-off-by Aaron Marcher <[email protected]>--- configure.ac | 7 +- testsuite/Makefile.am | 8 +- testsuite/smokey/Makefile.am | 9 +- testsuite/smokey/alchemytests/Makefile.am | 148 ++++++++++++++++++ .../smokey/alchemytests}/alarm-1.c | 1 + testsuite/smokey/alchemytests/alchemytests.c | 56 +++++++ .../smokey/alchemytests/alchemytests_driver.c | 33 ++++ .../smokey/alchemytests}/buffer-1.c | 1 + .../smokey/alchemytests}/event-1.c | 1 + .../smokey/alchemytests}/heap-1.c | 1 + .../smokey/alchemytests}/heap-2.c | 1 + .../smokey/alchemytests}/mq-1.c | 1 + .../smokey/alchemytests}/mq-2.c | 1 + .../smokey/alchemytests}/mq-3.c | 1 + .../smokey/alchemytests}/mutex-1.c | 1 + .../smokey/alchemytests}/pipe-1.c | 1 + .../smokey/alchemytests}/sem-1.c | 1 + .../smokey/alchemytests}/sem-2.c | 1 + .../smokey/alchemytests}/task-1.c | 1 + .../smokey/alchemytests}/task-10.c | 1 + .../smokey/alchemytests}/task-2.c | 1 + .../smokey/alchemytests}/task-3.c | 1 + .../smokey/alchemytests}/task-4.c | 1 + .../smokey/alchemytests}/task-5.c | 1 + .../smokey/alchemytests}/task-6.c | 1 + .../smokey/alchemytests}/task-7.c | 1 + .../smokey/alchemytests}/task-8.c | 1 + .../smokey/alchemytests}/task-9.c | 1 + 28 files changed, 276 insertions(+), 7 deletions(-) create mode 100644 testsuite/smokey/alchemytests/Makefile.am rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/alarm-1.c (97%) create mode 100644 testsuite/smokey/alchemytests/alchemytests.c create mode 100644 testsuite/smokey/alchemytests/alchemytests_driver.c rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/buffer-1.c (98%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/event-1.c (98%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/heap-1.c (98%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/heap-2.c (98%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mq-1.c (98%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mq-2.c (98%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mq-3.c (98%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mutex-1.c (98%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/pipe-1.c (98%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/sem-1.c (98%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/sem-2.c (97%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-1.c (94%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-10.c (97%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-2.c (98%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-3.c (97%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-4.c (98%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-5.c (98%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-6.c (97%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-7.c (98%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-8.c (97%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-9.c (97%)configure.ac +5
-2@@ -1041,10 +1041,13 @@ AC_CONFIG_FILES([ \ testsuite/smokey/cpu-affinity/Makefile \ testsuite/smokey/gdb/Makefile \ testsuite/smokey/y2038/Makefile \ - testsuite/smokey/can/Makefile - testsuite/smokey/x86io/Makefile + testsuite/smokey/can/Makefile \ + testsuite/smokey/x86io/Makefile \ + testsuite/smokey/alchemytests/Makefile \ testsuite/clocktest/Makefile \ testsuite/xeno-test/Makefile \ + testsuite/psostests/Makefile \ + testsuite/vxworkstests/Makefile \ utils/Makefile \ utils/hdb/Makefile \ utils/can/Makefile \testsuite/Makefile.am +3
-1@@ -7,7 +7,9 @@ SUBDIRS += \ gpiotest \ spitest \ switchtest \ - xeno-test + xeno-test \ + psostests \ + vxworkstests endif DIST_SUBDIRS = \
testsuite/Makefile.am DIST_SUBDIRS = \ · line 25
Quoted 7 lines
testsuite/Makefile.am +3
-1@@ -18,4 +20,6 @@ DIST_SUBDIRS = \ smokey \ spitest \ switchtest \ - xeno-test + xeno-test \ + psostests \ + vxworkstests
These changes make no sense and are reverted in later patches. Dropping them while merging.
Quoted 22 lines
testsuite/smokey/Makefile.am +4
-2@@ -40,12 +40,14 @@ COBALT_SUBDIRS = \ tsc \ vdso-access \ xddp \ - y2038 + y2038 \ + alchemytests MERCURY_SUBDIRS = \ memory-heapmem \ memory-tlsf \ - memcheck + memcheck \ + alchemytests DIST_SUBDIRS = \ arith \
testsuite/smokey/Makefile.am DIST_SUBDIRS = \ · line 87
Quoted 7 lines
testsuite/smokey/Makefile.am +2
-1@@ -80,7 +82,8 @@ DIST_SUBDIRS = \ tsc \ vdso-access \ xddp \ - y2038 + y2038 \ + alchemytests
I'm pushing these hook-ups to a closing patch so that we don't break the build while applying the series.
Jan
Quoted 521 lines
testsuite/smokey/Makefile.am +0
-0if XENO_X86 DIST_SUBDIRS += x86iotestsuite/smokey/alchemytests/Makefile.am new file +148
-0@@ -0,0 +1,148 @@ +testdir = @XENO_TEST_DIR@ +noinst_LIBRARIES = libalchemytests.a + +libalchemytests_a_SOURCES = alchemytests.c +libalchemytests_a_CPPFLAGS = \ + @XENO_USER_CFLAGS@ \ + -I$(top_srcdir) \ + -I$(top_srcdir)/include \ + -DXENO_TEST_DIR='"$(XENO_TEST_DIR)"' + +CCLD = $(top_srcdir)/scripts/wrap-link.sh $(CC) + +test_PROGRAMS = \ + alchemytests \ + alchemytests_alarm1 \ + alchemytests_buffer1 \ + alchemytests_event1 \ + alchemytests_heap1 \ + alchemytests_heap2 \ + alchemytests_mq1 \ + alchemytests_mq2 \ + alchemytests_mq3 \ + alchemytests_mutex1 \ + alchemytests_pipe1 \ + alchemytests_sem1 \ + alchemytests_sem2 \ + alchemytests_task1 \ + alchemytests_task2 \ + alchemytests_task3 \ + alchemytests_task4 \ + alchemytests_task5 \ + alchemytests_task6 \ + alchemytests_task7 \ + alchemytests_task8 \ + alchemytests_task9 \ + alchemytests_task10 + +alchemycppflags = \ + $(XENO_USER_CFLAGS) \ + -I$(top_srcdir)/include + +alchemyldadd = \ + ../../../lib/alchemy/libalchemy@[email protected] \ + ../../../lib/copperplate/libcopperplate@[email protected] \ + @XENO_CORE_LDADD@ \ + @XENO_USER_LDADD@ \ + -lpthread -lrt -lm + +alchemytests_SOURCES = alchemytests_driver.c +alchemytests_CPPFLAGS = \ + $(XENO_USER_CFLAGS) \ + -I$(top_srcdir)/include +alchemytests_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_LDADD = \ + ../../../lib/smokey/libsmokey@[email protected] \ + @XENO_CORE_LDADD@ \ + @XENO_USER_LDADD@ \ + -lpthread -lrt + +alchemytests_alarm1_SOURCES = alarm-1.c +alchemytests_alarm1_CPPFLAGS = $(alchemycppflags) +alchemytests_alarm1_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_alarm1_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_event1_SOURCES = event-1.c +alchemytests_event1_CPPFLAGS = $(alchemycppflags) +alchemytests_event1_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_event1_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_heap1_SOURCES = heap-1.c +alchemytests_heap1_CPPFLAGS = $(alchemycppflags) +alchemytests_heap1_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_heap1_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_heap2_SOURCES = heap-2.c +alchemytests_heap2_CPPFLAGS = $(alchemycppflags) +alchemytests_heap2_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_heap2_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_buffer1_SOURCES = buffer-1.c +alchemytests_buffer1_CPPFLAGS = $(alchemycppflags) +alchemytests_buffer1_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_buffer1_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_mutex1_SOURCES = mutex-1.c +alchemytests_mutex1_CPPFLAGS = $(alchemycppflags) +alchemytests_mutex1_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_mutex1_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_pipe1_SOURCES = pipe-1.c +alchemytests_pipe1_CPPFLAGS = $(alchemycppflags) +alchemytests_pipe1_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_pipe1_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_mq1_SOURCES = mq-1.c +alchemytests_mq1_CPPFLAGS = $(alchemycppflags) +alchemytests_mq1_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_mq1_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_mq2_SOURCES = mq-2.c +alchemytests_mq2_CPPFLAGS = $(alchemycppflags) +alchemytests_mq2_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_mq2_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_mq3_SOURCES = mq-3.c +alchemytests_mq3_CPPFLAGS = $(alchemycppflags) +alchemytests_mq3_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_mq3_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_sem1_SOURCES = sem-1.c +alchemytests_sem1_CPPFLAGS = $(alchemycppflags) +alchemytests_sem1_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_sem1_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_sem2_SOURCES = sem-2.c +alchemytests_sem2_CPPFLAGS = $(alchemycppflags) +alchemytests_sem2_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_sem2_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_task1_SOURCES = task-1.c +alchemytests_task1_CPPFLAGS = $(alchemycppflags) +alchemytests_task1_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_task1_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_task2_SOURCES = task-2.c +alchemytests_task2_CPPFLAGS = $(alchemycppflags) +alchemytests_task2_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_task2_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_task3_SOURCES = task-3.c +alchemytests_task3_CPPFLAGS = $(alchemycppflags) +alchemytests_task3_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_task3_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_task4_SOURCES = task-4.c +alchemytests_task4_CPPFLAGS = $(alchemycppflags) +alchemytests_task4_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_task4_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_task5_SOURCES = task-5.c +alchemytests_task5_CPPFLAGS = $(alchemycppflags) +alchemytests_task5_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_task5_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_task6_SOURCES = task-6.c +alchemytests_task6_CPPFLAGS = $(alchemycppflags) +alchemytests_task6_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_task6_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_task7_SOURCES = task-7.c +alchemytests_task7_CPPFLAGS = $(alchemycppflags) +alchemytests_task7_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_task7_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_task8_SOURCES = task-8.c +alchemytests_task8_CPPFLAGS = $(alchemycppflags) +alchemytests_task8_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_task8_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_task9_SOURCES = task-9.c +alchemytests_task9_CPPFLAGS = $(alchemycppflags) +alchemytests_task9_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_task9_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +alchemytests_task10_SOURCES = task-10.c +alchemytests_task10_CPPFLAGS = $(alchemycppflags) +alchemytests_task10_LDADD = $(alchemyldadd) -lpthread -lrt -lm +alchemytests_task10_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +testsuite/smokey/alchemytests/alarm-1.c renamed from lib/alchemy/testsuite/alarm-1.c +1
-0@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h> testsuite/smokey/alchemytests/alchemytests.c new file +56
-0@@ -0,0 +1,56 @@ +// SPDX-License-Identifier: GPL-2.0 +#include <error.h> +#include <libgen.h> +#include <smokey/smokey.h> +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> + +#define TEST (name) \ + smokey_test_plugin(name, SMOKEY_NOARGS, "Run external test"); \ + static int run_##name(struct smokey_test *t, int argc, char *const argv[]) \ + { \ + return __run_extprog(t, argc, argv); \ + } + +static int __run_extprog (struct smokey_test *t,int argc,char *const argv[]) +{ +int ret; +char *tst_path; + + ret =asprintf (&tst_path,"%s/%s --cpu-affinity=0" ,XENO_TEST_DIR , t->name); +if (ret ==-1 ) +return -ENOMEM ; + + ret =system (tst_path); +free (tst_path); + +return ret; +} + +TEST(alchemytests) +TEST(alchemytests_alarm1) +TEST(alchemytests_buffer1) +TEST(alchemytests_event1) +TEST(alchemytests_heap1) +TEST(alchemytests_heap2) +TEST(alchemytests_mq1) +TEST(alchemytests_mq2) +TEST(alchemytests_mq3) +TEST(alchemytests_mutex1) +TEST(alchemytests_pipe1) +TEST(alchemytests_sem1) +TEST(alchemytests_sem2) +TEST(alchemytests_task1) +TEST(alchemytests_task2) +TEST(alchemytests_task3) +TEST(alchemytests_task4) +TEST(alchemytests_task5) +TEST(alchemytests_task6) +TEST(alchemytests_task7) +TEST(alchemytests_task8) +TEST(alchemytests_task9) +TEST(alchemytests_task10) +testsuite/smokey/alchemytests/alchemytests_driver.c new file +33
-0@@ -0,0 +1,33 @@ +// SPDX-License-Identifier: GPL-2.0 +#include <error.h> +#include <libgen.h> +#include <smokey/smokey.h> +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> + +int main (int argc,char *const argv[]) +{ +struct smokey_test *t; +int ret, fails =0 ; + +if (pvlist_empty (&smokey_test_list)) +return 0 ; + +for_each_smokey_test (t) { + ret = t->run (t, argc, argv); +if (ret) { + fails++; +if (smokey_keep_going) +continue ; +if (smokey_verbose_mode) +error (1 , -ret,"test %s failed" , t->name); +return 1 ; + } +smokey_note ("%s OK" , t->name); + } + +return fails !=0 ; +}testsuite/smokey/alchemytests/buffer-1.c renamed from lib/alchemy/testsuite/buffer-1.c +1
-0@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <memory.h> testsuite/smokey/alchemytests/event-1.c renamed from lib/alchemy/testsuite/event-1.c +1
-0@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h> testsuite/smokey/alchemytests/heap-1.c renamed from lib/alchemy/testsuite/heap-1.c +1
-0@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h> testsuite/smokey/alchemytests/heap-2.c renamed from lib/alchemy/testsuite/heap-2.c +1
-0@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h> testsuite/smokey/alchemytests/mq-1.c renamed from lib/alchemy/testsuite/mq-1.c +1
-0@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h> testsuite/smokey/alchemytests/mq-2.c renamed from lib/alchemy/testsuite/mq-2.c +1
-0@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h> testsuite/smokey/alchemytests/mq-3.c renamed from lib/alchemy/testsuite/mq-3.c +1
-0@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h> testsuite/smokey/alchemytests/mutex-1.c renamed from lib/alchemy/testsuite/mutex-1.c +1
-0@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h> testsuite/smokey/alchemytests/pipe-1.c renamed from lib/alchemy/testsuite/pipe-1.c +1
-0@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <fcntl.h> testsuite/smokey/alchemytests/sem-1.c renamed from lib/alchemy/testsuite/sem-1.c +1
-0@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h> testsuite/smokey/alchemytests/sem-2.c renamed from lib/alchemy/testsuite/sem-2.c +1
-0@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h> testsuite/smokey/alchemytests/task-1.c renamed from lib/alchemy/testsuite/task-1.c +1
-0@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h> testsuite/smokey/alchemytests/task-10.c renamed from lib/alchemy/testsuite/task-10.c +1
-0@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h> testsuite/smokey/alchemytests/task-2.c renamed from lib/alchemy/testsuite/task-2.c +1
-0@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h> testsuite/smokey/alchemytests/task-3.c renamed from lib/alchemy/testsuite/task-3.c +1
-0@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h> testsuite/smokey/alchemytests/task-4.c renamed from lib/alchemy/testsuite/task-4.c +1
-0@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h> testsuite/smokey/alchemytests/task-5.c renamed from lib/alchemy/testsuite/task-5.c +1
-0@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h> testsuite/smokey/alchemytests/task-6.c renamed from lib/alchemy/testsuite/task-6.c +1
-0@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h> testsuite/smokey/alchemytests/task-7.c renamed from lib/alchemy/testsuite/task-7.c +1
-0@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h> testsuite/smokey/alchemytests/task-8.c renamed from lib/alchemy/testsuite/task-8.c +1
-0@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h> testsuite/smokey/alchemytests/task-9.c renamed from lib/alchemy/testsuite/task-9.c +1
-0@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <signal.h>
Signature · 2 lines
Siemens AG, Technology Linux Expert Center
PATCH v7 1/10 testsuite: Fully integrate alchemytests into smokey
In reply to Aaron MarcherFrom: Aaron Marcher <[email protected]>
This is the very first step to have the alchemy tests embedded into our testsuite.
Build them using Xenomai's build system and hook them up using Smokey. Every test binary has it's own respective testcase in the testsuite.
---
configure.ac | 7 +-
testsuite/smokey/alchemytests/Makefile.am | 147 ++++++++++++++++++
.../smokey/alchemytests}/alarm-1.c | 1 +
testsuite/smokey/alchemytests/alchemytests.c | 55 +++++++
.../smokey/alchemytests/alchemytests_driver.c | 33 ++++
.../smokey/alchemytests}/buffer-1.c | 1 +
.../smokey/alchemytests}/event-1.c | 1 +
.../smokey/alchemytests}/heap-1.c | 1 +
.../smokey/alchemytests}/heap-2.c | 1 +
.../smokey/alchemytests}/mq-1.c | 1 +
.../smokey/alchemytests}/mq-2.c | 1 +
.../smokey/alchemytests}/mq-3.c | 1 +
.../smokey/alchemytests}/mutex-1.c | 1 +
.../smokey/alchemytests}/pipe-1.c | 1 +
.../smokey/alchemytests}/sem-1.c | 1 +
.../smokey/alchemytests}/sem-2.c | 1 +
.../smokey/alchemytests}/task-1.c | 1 +
.../smokey/alchemytests}/task-10.c | 1 +
.../smokey/alchemytests}/task-2.c | 1 +
.../smokey/alchemytests}/task-3.c | 1 +
.../smokey/alchemytests}/task-4.c | 1 +
.../smokey/alchemytests}/task-5.c | 1 +
.../smokey/alchemytests}/task-6.c | 1 +
.../smokey/alchemytests}/task-7.c | 1 +
.../smokey/alchemytests}/task-8.c | 1 +
.../smokey/alchemytests}/task-9.c | 1 +
26 files changed, 262 insertions(+), 2 deletions(-)
create mode 100644 testsuite/smokey/alchemytests/Makefile.am
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/alarm-1.c (97%)
create mode 100644 testsuite/smokey/alchemytests/alchemytests.c
create mode 100644 testsuite/smokey/alchemytests/alchemytests_driver.c
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/buffer-1.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/event-1.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/heap-1.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/heap-2.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mq-1.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mq-2.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mq-3.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mutex-1.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/pipe-1.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/sem-1.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/sem-2.c (97%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-1.c (94%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-10.c (97%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-2.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-3.c (97%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-4.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-5.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-6.c (97%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-7.c (98%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-8.c (97%)
rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-9.c (97%)configure.ac +5 -2
@@ -1041,10 +1041,13 @@ AC_CONFIG_FILES([ \ testsuite/smokey/cpu-affinity/Makefile \ testsuite/smokey/gdb/Makefile \ testsuite/smokey/y2038/Makefile \ - testsuite/smokey/can/Makefile - testsuite/smokey/x86io/Makefile + testsuite/smokey/can/Makefile \ + testsuite/smokey/x86io/Makefile \ + testsuite/smokey/alchemytests/Makefile \ testsuite/clocktest/Makefile \ testsuite/xeno-test/Makefile \ + testsuite/psostests/Makefile \ + testsuite/vxworkstests/Makefile \ utils/Makefile \ utils/hdb/Makefile \ utils/can/Makefile \
testsuite/smokey/alchemytests/Makefile.am new file +147 -0
147 lines not on this page · raw message
testsuite/smokey/alchemytests/alarm-1.c renamed from lib/alchemy/testsuite/alarm-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/alchemytests.c new file +55 -0
55 lines not on this page · raw message
testsuite/smokey/alchemytests/alchemytests_driver.c new file +33 -0
@@ -0,0 +1,33 @@ +// SPDX-License-Identifier: GPL-2.0 +#include <error.h> +#include <libgen.h> +#include <smokey/smokey.h> +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> + +int main (int argc,char *const argv[]) +{ +struct smokey_test *t; +int ret, fails =0 ; + +if (pvlist_empty (&smokey_test_list)) +return 0 ; + +for_each_smokey_test (t) { + ret = t->run (t, argc, argv); +if (ret) { + fails++; +if (smokey_keep_going) +continue ; +if (smokey_verbose_mode) +error (1 , -ret,"test %s failed" , t->name); +return 1 ; + } +smokey_note ("%s OK" , t->name); + } + +return fails !=0 ; +}
testsuite/smokey/alchemytests/buffer-1.c renamed from lib/alchemy/testsuite/buffer-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <memory.h>
testsuite/smokey/alchemytests/event-1.c renamed from lib/alchemy/testsuite/event-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/heap-1.c renamed from lib/alchemy/testsuite/heap-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/heap-2.c renamed from lib/alchemy/testsuite/heap-2.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/mq-1.c renamed from lib/alchemy/testsuite/mq-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/mq-2.c renamed from lib/alchemy/testsuite/mq-2.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/mq-3.c renamed from lib/alchemy/testsuite/mq-3.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/mutex-1.c renamed from lib/alchemy/testsuite/mutex-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/pipe-1.c renamed from lib/alchemy/testsuite/pipe-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <fcntl.h>
testsuite/smokey/alchemytests/sem-1.c renamed from lib/alchemy/testsuite/sem-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/sem-2.c renamed from lib/alchemy/testsuite/sem-2.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/task-1.c renamed from lib/alchemy/testsuite/task-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/task-10.c renamed from lib/alchemy/testsuite/task-10.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/task-2.c renamed from lib/alchemy/testsuite/task-2.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/task-3.c renamed from lib/alchemy/testsuite/task-3.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/task-4.c renamed from lib/alchemy/testsuite/task-4.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/task-5.c renamed from lib/alchemy/testsuite/task-5.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/task-6.c renamed from lib/alchemy/testsuite/task-6.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/task-7.c renamed from lib/alchemy/testsuite/task-7.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/task-8.c renamed from lib/alchemy/testsuite/task-8.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/alchemytests/task-9.c renamed from lib/alchemy/testsuite/task-9.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <signal.h>
Signature · 1 line
2.35.3
PATCH v4 2/10 testsuite: Fully integrate psostests into smokey
In reply to Aaron MarcherJust like for alchemytests, integrate them into our testsuite.
---
configure.ac | 2 +-
lib/psos/testsuite/Makefile | 49 ------
testsuite/Makefile.am | 2 -
testsuite/smokey/Makefile.am | 9 +-
testsuite/smokey/psostests/Makefile.am | 148 ++++++++++++++++++
.../smokey/psostests}/mq-1.c | 1 +
.../smokey/psostests}/mq-2.c | 1 +
.../smokey/psostests}/mq-3.c | 1 +
testsuite/smokey/psostests/psostests.c | 57 +++++++
testsuite/smokey/psostests/psostests_driver.c | 34 ++++
.../smokey/psostests}/pt-1.c | 1 +
.../smokey/psostests}/rn-1.c | 1 +
.../smokey/psostests}/sem-1.c | 1 +
.../smokey/psostests}/sem-2.c | 1 +
.../smokey/psostests}/task-1.c | 1 +
.../smokey/psostests}/task-2.c | 1 +
.../smokey/psostests}/task-3.c | 1 +
.../smokey/psostests}/task-4.c | 1 +
.../smokey/psostests}/task-5.c | 1 +
.../smokey/psostests}/task-6.c | 1 +
.../smokey/psostests}/task-7.c | 1 +
.../smokey/psostests}/task-8.c | 1 +
.../smokey/psostests}/task-9.c | 1 +
.../smokey/psostests}/tm-1.c | 1 +
.../smokey/psostests}/tm-2.c | 1 +
.../smokey/psostests}/tm-3.c | 1 +
.../smokey/psostests}/tm-4.c | 1 +
.../smokey/psostests}/tm-5.c | 1 +
.../smokey/psostests}/tm-6.c | 1 +
.../smokey/psostests}/tm-7.c | 1 +
30 files changed, 269 insertions(+), 55 deletions(-)
delete mode 100644 lib/psos/testsuite/Makefile
create mode 100644 testsuite/smokey/psostests/Makefile.am
rename {lib/psos/testsuite => testsuite/smokey/psostests}/mq-1.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/mq-2.c (98%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/mq-3.c (98%)
create mode 100644 testsuite/smokey/psostests/psostests.c
create mode 100644 testsuite/smokey/psostests/psostests_driver.c
rename {lib/psos/testsuite => testsuite/smokey/psostests}/pt-1.c (96%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/rn-1.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/sem-1.c (98%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/sem-2.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-1.c (95%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-2.c (98%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-3.c (96%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-4.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-5.c (98%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-6.c (98%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-7.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-8.c (98%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-9.c (98%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-1.c (95%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-2.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-3.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-4.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-5.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-6.c (95%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-7.c (95%)configure.ac +1 -1
@@ -1044,9 +1044,9 @@ AC_CONFIG_FILES([ \ testsuite/smokey/can/Makefile \ testsuite/smokey/x86io/Makefile \ testsuite/smokey/alchemytests/Makefile \ + testsuite/smokey/psostests/Makefile \ testsuite/clocktest/Makefile \ testsuite/xeno-test/Makefile \ - testsuite/psostests/Makefile \ testsuite/vxworkstests/Makefile \ utils/Makefile \ utils/hdb/Makefile \
lib/psos/testsuite/Makefile deleted +0 -49
49 lines not on this page · raw message
testsuite/Makefile.am +0 -2
@@ -8,7 +8,6 @@ SUBDIRS += \ spitest \ switchtest \ xeno-test \ - psostests \ vxworkstests endif
@@ -21,5 +20,4 @@ DIST_SUBDIRS = \ spitest \ switchtest \ xeno-test \ - psostests \ vxworkstests
testsuite/smokey/Makefile.am +6 -3
@@ -41,13 +41,15 @@ COBALT_SUBDIRS = \ vdso-access \ xddp \ y2038 \ - alchemytests + alchemytests \ + psostests MERCURY_SUBDIRS = \ memory-heapmem \ memory-tlsf \ memcheck \ - alchemytests + alchemytests \ + psostests DIST_SUBDIRS = \ arith \
@@ -83,7 +85,8 @@ DIST_SUBDIRS = \ vdso-access \ xddp \ y2038 \ - alchemytests + alchemytests \ + psostests if XENO_X86 DIST_SUBDIRS += x86io
testsuite/smokey/psostests/Makefile.am new file +148 -0
148 lines not on this page · raw message
testsuite/smokey/psostests/mq-1.c renamed from lib/psos/testsuite/mq-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/mq-2.c renamed from lib/psos/testsuite/mq-2.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/mq-3.c renamed from lib/psos/testsuite/mq-3.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/psostests.c new file +57 -0
57 lines not on this page · raw message
testsuite/smokey/psostests/psostests_driver.c new file +34 -0
@@ -0,0 +1,34 @@ +// SPDX-License-Identifier: GPL-2.0 +#include <error.h> +#include <libgen.h> +#include <smokey/smokey.h> +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> + +int main (int argc,char *const argv[]) +{ +struct smokey_test *t; +int ret, fails =0 ; + +if (pvlist_empty (&smokey_test_list)) +return 0 ; + +for_each_smokey_test (t) { + ret = t->run (t, argc, argv); +if (ret) { + fails++; +if (smokey_keep_going) +continue ; +if (smokey_verbose_mode) +error (1 , -ret,"test %s failed" , t->name); +return 1 ; + } +smokey_note ("%s OK" , t->name); + } + +return fails !=0 ; +} +
testsuite/smokey/psostests/pt-1.c renamed from lib/psos/testsuite/pt-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <memory.h>
testsuite/smokey/psostests/rn-1.c renamed from lib/psos/testsuite/rn-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <memory.h>
testsuite/smokey/psostests/sem-1.c renamed from lib/psos/testsuite/sem-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/sem-2.c renamed from lib/psos/testsuite/sem-2.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/task-1.c renamed from lib/psos/testsuite/task-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/task-2.c renamed from lib/psos/testsuite/task-2.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/task-3.c renamed from lib/psos/testsuite/task-3.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/task-4.c renamed from lib/psos/testsuite/task-4.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/task-5.c renamed from lib/psos/testsuite/task-5.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/task-6.c renamed from lib/psos/testsuite/task-6.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/task-7.c renamed from lib/psos/testsuite/task-7.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/task-8.c renamed from lib/psos/testsuite/task-8.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <xeno_config.h>
testsuite/smokey/psostests/task-9.c renamed from lib/psos/testsuite/task-9.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/tm-1.c renamed from lib/psos/testsuite/tm-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/tm-2.c renamed from lib/psos/testsuite/tm-2.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/tm-3.c renamed from lib/psos/testsuite/tm-3.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/tm-4.c renamed from lib/psos/testsuite/tm-4.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/tm-5.c renamed from lib/psos/testsuite/tm-5.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/tm-6.c renamed from lib/psos/testsuite/tm-6.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/tm-7.c renamed from lib/psos/testsuite/tm-7.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
Signature · 1 line
2.35.3
PATCH v7 2/10 testsuite: Fully integrate psostests into smokey
From: Aaron Marcher <[email protected]>
Just like for alchemytests, integrate them into our testsuite.
---
configure.ac | 2 +-
lib/psos/testsuite/Makefile | 49 ------
testsuite/smokey/psostests/Makefile.am | 151 ++++++++++++++++++
.../smokey/psostests}/mq-1.c | 1 +
.../smokey/psostests}/mq-2.c | 1 +
.../smokey/psostests}/mq-3.c | 1 +
testsuite/smokey/psostests/psostests.c | 56 +++++++
testsuite/smokey/psostests/psostests_driver.c | 33 ++++
.../smokey/psostests}/pt-1.c | 1 +
.../smokey/psostests}/rn-1.c | 1 +
.../smokey/psostests}/sem-1.c | 1 +
.../smokey/psostests}/sem-2.c | 1 +
.../smokey/psostests}/task-1.c | 1 +
.../smokey/psostests}/task-2.c | 1 +
.../smokey/psostests}/task-3.c | 1 +
.../smokey/psostests}/task-4.c | 1 +
.../smokey/psostests}/task-5.c | 1 +
.../smokey/psostests}/task-6.c | 1 +
.../smokey/psostests}/task-7.c | 1 +
.../smokey/psostests}/task-8.c | 1 +
.../smokey/psostests}/task-9.c | 1 +
.../smokey/psostests}/tm-1.c | 1 +
.../smokey/psostests}/tm-2.c | 1 +
.../smokey/psostests}/tm-3.c | 1 +
.../smokey/psostests}/tm-4.c | 1 +
.../smokey/psostests}/tm-5.c | 1 +
.../smokey/psostests}/tm-6.c | 1 +
.../smokey/psostests}/tm-7.c | 1 +
28 files changed, 264 insertions(+), 50 deletions(-)
delete mode 100644 lib/psos/testsuite/Makefile
create mode 100644 testsuite/smokey/psostests/Makefile.am
rename {lib/psos/testsuite => testsuite/smokey/psostests}/mq-1.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/mq-2.c (98%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/mq-3.c (98%)
create mode 100644 testsuite/smokey/psostests/psostests.c
create mode 100644 testsuite/smokey/psostests/psostests_driver.c
rename {lib/psos/testsuite => testsuite/smokey/psostests}/pt-1.c (96%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/rn-1.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/sem-1.c (98%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/sem-2.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-1.c (95%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-2.c (98%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-3.c (96%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-4.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-5.c (98%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-6.c (98%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-7.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-8.c (98%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-9.c (98%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-1.c (95%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-2.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-3.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-4.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-5.c (97%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-6.c (95%)
rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-7.c (95%)configure.ac +1 -1
@@ -1044,9 +1044,9 @@ AC_CONFIG_FILES([ \ testsuite/smokey/can/Makefile \ testsuite/smokey/x86io/Makefile \ testsuite/smokey/alchemytests/Makefile \ + testsuite/smokey/psostests/Makefile \ testsuite/clocktest/Makefile \ testsuite/xeno-test/Makefile \ - testsuite/psostests/Makefile \ testsuite/vxworkstests/Makefile \ utils/Makefile \ utils/hdb/Makefile \
lib/psos/testsuite/Makefile deleted +0 -49
49 lines not on this page · raw message
testsuite/smokey/psostests/Makefile.am new file +151 -0
151 lines not on this page · raw message
testsuite/smokey/psostests/mq-1.c renamed from lib/psos/testsuite/mq-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/mq-2.c renamed from lib/psos/testsuite/mq-2.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/mq-3.c renamed from lib/psos/testsuite/mq-3.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/psostests.c new file +56 -0
56 lines not on this page · raw message
testsuite/smokey/psostests/psostests_driver.c new file +33 -0
@@ -0,0 +1,33 @@ +// SPDX-License-Identifier: GPL-2.0 +#include <error.h> +#include <libgen.h> +#include <smokey/smokey.h> +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> + +int main (int argc,char *const argv[]) +{ +struct smokey_test *t; +int ret, fails =0 ; + +if (pvlist_empty (&smokey_test_list)) +return 0 ; + +for_each_smokey_test (t) { + ret = t->run (t, argc, argv); +if (ret) { + fails++; +if (smokey_keep_going) +continue ; +if (smokey_verbose_mode) +error (1 , -ret,"test %s failed" , t->name); +return 1 ; + } +smokey_note ("%s OK" , t->name); + } + +return fails !=0 ; +}
testsuite/smokey/psostests/pt-1.c renamed from lib/psos/testsuite/pt-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <memory.h>
testsuite/smokey/psostests/rn-1.c renamed from lib/psos/testsuite/rn-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <memory.h>
testsuite/smokey/psostests/sem-1.c renamed from lib/psos/testsuite/sem-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/sem-2.c renamed from lib/psos/testsuite/sem-2.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/task-1.c renamed from lib/psos/testsuite/task-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/task-2.c renamed from lib/psos/testsuite/task-2.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/task-3.c renamed from lib/psos/testsuite/task-3.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/task-4.c renamed from lib/psos/testsuite/task-4.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/task-5.c renamed from lib/psos/testsuite/task-5.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/task-6.c renamed from lib/psos/testsuite/task-6.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/task-7.c renamed from lib/psos/testsuite/task-7.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/task-8.c renamed from lib/psos/testsuite/task-8.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <xeno_config.h>
testsuite/smokey/psostests/task-9.c renamed from lib/psos/testsuite/task-9.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/tm-1.c renamed from lib/psos/testsuite/tm-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/tm-2.c renamed from lib/psos/testsuite/tm-2.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/tm-3.c renamed from lib/psos/testsuite/tm-3.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/tm-4.c renamed from lib/psos/testsuite/tm-4.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/tm-5.c renamed from lib/psos/testsuite/tm-5.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/tm-6.c renamed from lib/psos/testsuite/tm-6.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/psostests/tm-7.c renamed from lib/psos/testsuite/tm-7.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
Signature · 1 line
2.35.3
PATCH v4 3/10 testsuite: Fully integrate vwworkstests into smokey
In reply to Aaron MarcherSame as for alchemytests and psostests.
---
configure.ac | 2 +-
lib/vxworks/testsuite/Makefile | 43 ---------
testsuite/Makefile.am | 6 +-
testsuite/smokey/Makefile.am | 3 +
testsuite/smokey/vxworkstests/Makefile.am | 94 +++++++++++++++++++
.../smokey/vxworkstests}/lst-1.c | 1 +
.../smokey/vxworkstests}/msgQ-1.c | 1 +
.../smokey/vxworkstests}/msgQ-2.c | 1 +
.../smokey/vxworkstests}/msgQ-3.c | 1 +
.../smokey/vxworkstests}/rng-1.c | 1 +
.../smokey/vxworkstests}/sem-1.c | 1 +
.../smokey/vxworkstests}/sem-2.c | 1 +
.../smokey/vxworkstests}/sem-3.c | 1 +
.../smokey/vxworkstests}/sem-4.c | 1 +
.../smokey/vxworkstests}/task-1.c | 1 +
.../smokey/vxworkstests}/task-2.c | 1 +
testsuite/smokey/vxworkstests/vxworkstests.c | 46 +++++++++
.../smokey/vxworkstests/vxworkstests_driver.c | 33 +++++++
.../smokey/vxworkstests}/wd-1.c | 1 +
19 files changed, 191 insertions(+), 48 deletions(-)
delete mode 100644 lib/vxworks/testsuite/Makefile
create mode 100644 testsuite/smokey/vxworkstests/Makefile.am
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/lst-1.c (99%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/msgQ-1.c (98%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/msgQ-2.c (98%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/msgQ-3.c (98%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/rng-1.c (99%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-1.c (98%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-2.c (98%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-3.c (97%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-4.c (98%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/task-1.c (96%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/task-2.c (98%)
create mode 100644 testsuite/smokey/vxworkstests/vxworkstests.c
create mode 100644 testsuite/smokey/vxworkstests/vxworkstests_driver.c
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/wd-1.c (97%)configure.ac +1 -1
@@ -1045,9 +1045,9 @@ AC_CONFIG_FILES([ \ testsuite/smokey/x86io/Makefile \ testsuite/smokey/alchemytests/Makefile \ testsuite/smokey/psostests/Makefile \ + testsuite/smokey/vxworkstests/Makefile \ testsuite/clocktest/Makefile \ testsuite/xeno-test/Makefile \ - testsuite/vxworkstests/Makefile \ utils/Makefile \ utils/hdb/Makefile \ utils/can/Makefile \
lib/vxworks/testsuite/Makefile deleted +0 -43
43 lines not on this page · raw message
testsuite/Makefile.am +2 -4
@@ -7,8 +7,7 @@ SUBDIRS += \ gpiotest \ spitest \ switchtest \ - xeno-test \ - vxworkstests + xeno-test endif DIST_SUBDIRS = \
@@ -19,5 +18,4 @@ DIST_SUBDIRS = \ smokey \ spitest \ switchtest \ - xeno-test \ - vxworkstests + xeno-test
testsuite/smokey/Makefile.am +3 -0
@@ -42,6 +42,7 @@ COBALT_SUBDIRS = \ xddp \ y2038 \ alchemytests \ + vxworkstests \ psostests MERCURY_SUBDIRS = \
@@ -49,6 +50,7 @@ MERCURY_SUBDIRS = \ memory-tlsf \ memcheck \ alchemytests \ + vxworkstests \ psostests DIST_SUBDIRS = \
@@ -86,6 +88,7 @@ DIST_SUBDIRS = \ xddp \ y2038 \ alchemytests \ + vxworkstests \ psostests if XENO_X86
testsuite/smokey/vxworkstests/Makefile.am new file +94 -0
94 lines not on this page · raw message
testsuite/smokey/vxworkstests/lst-1.c renamed from lib/vxworks/testsuite/lst-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/vxworkstests/msgQ-1.c renamed from lib/vxworks/testsuite/msgQ-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/vxworkstests/msgQ-2.c renamed from lib/vxworks/testsuite/msgQ-2.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/vxworkstests/msgQ-3.c renamed from lib/vxworks/testsuite/msgQ-3.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/vxworkstests/rng-1.c renamed from lib/vxworks/testsuite/rng-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdlib.h> #include <string.h> #include <stdio.h>
testsuite/smokey/vxworkstests/sem-1.c renamed from lib/vxworks/testsuite/sem-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/vxworkstests/sem-2.c renamed from lib/vxworks/testsuite/sem-2.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/vxworkstests/sem-3.c renamed from lib/vxworks/testsuite/sem-3.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/vxworkstests/sem-4.c renamed from lib/vxworks/testsuite/sem-4.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/vxworkstests/task-1.c renamed from lib/vxworks/testsuite/task-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/vxworkstests/task-2.c renamed from lib/vxworks/testsuite/task-2.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <unistd.h>
testsuite/smokey/vxworkstests/vxworkstests.c new file +46 -0
46 lines not on this page · raw message
testsuite/smokey/vxworkstests/vxworkstests_driver.c new file +33 -0
@@ -0,0 +1,33 @@ +// SPDX-License-Identifier: GPL-2.0 +#include <error.h> +#include <libgen.h> +#include <smokey/smokey.h> +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> + +int main (int argc,char *const argv[]) +{ +struct smokey_test *t; +int ret, fails =0 ; + +if (pvlist_empty (&smokey_test_list)) +return 0 ; + +for_each_smokey_test (t) { + ret = t->run (t, argc, argv); +if (ret) { + fails++; +if (smokey_keep_going) +continue ; +if (smokey_verbose_mode) +error (1 , -ret,"test %s failed" , t->name); +return 1 ; + } +smokey_note ("%s OK" , t->name); + } + +return fails !=0 ; +}
testsuite/smokey/vxworkstests/wd-1.c renamed from lib/vxworks/testsuite/wd-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
Signature · 1 line
2.35.3
PATCH v7 3/10 testsuite: Fully integrate vwworkstests into smokey
From: Aaron Marcher <[email protected]>
Same as for alchemytests and psostests.
---
configure.ac | 2 +-
lib/vxworks/testsuite/Makefile | 43 ---------
testsuite/smokey/vxworkstests/Makefile.am | 95 +++++++++++++++++++
.../smokey/vxworkstests}/lst-1.c | 1 +
.../smokey/vxworkstests}/msgQ-1.c | 1 +
.../smokey/vxworkstests}/msgQ-2.c | 1 +
.../smokey/vxworkstests}/msgQ-3.c | 1 +
.../smokey/vxworkstests}/rng-1.c | 1 +
.../smokey/vxworkstests}/sem-1.c | 1 +
.../smokey/vxworkstests}/sem-2.c | 1 +
.../smokey/vxworkstests}/sem-3.c | 1 +
.../smokey/vxworkstests}/sem-4.c | 1 +
.../smokey/vxworkstests}/task-1.c | 1 +
.../smokey/vxworkstests}/task-2.c | 1 +
testsuite/smokey/vxworkstests/vxworkstests.c | 45 +++++++++
.../smokey/vxworkstests/vxworkstests_driver.c | 33 +++++++
.../smokey/vxworkstests}/wd-1.c | 1 +
17 files changed, 186 insertions(+), 44 deletions(-)
delete mode 100644 lib/vxworks/testsuite/Makefile
create mode 100644 testsuite/smokey/vxworkstests/Makefile.am
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/lst-1.c (99%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/msgQ-1.c (98%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/msgQ-2.c (98%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/msgQ-3.c (98%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/rng-1.c (99%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-1.c (98%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-2.c (98%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-3.c (97%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-4.c (98%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/task-1.c (96%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/task-2.c (98%)
create mode 100644 testsuite/smokey/vxworkstests/vxworkstests.c
create mode 100644 testsuite/smokey/vxworkstests/vxworkstests_driver.c
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/wd-1.c (97%)configure.ac +1 -1
@@ -1045,9 +1045,9 @@ AC_CONFIG_FILES([ \ testsuite/smokey/x86io/Makefile \ testsuite/smokey/alchemytests/Makefile \ testsuite/smokey/psostests/Makefile \ + testsuite/smokey/vxworkstests/Makefile \ testsuite/clocktest/Makefile \ testsuite/xeno-test/Makefile \ - testsuite/vxworkstests/Makefile \ utils/Makefile \ utils/hdb/Makefile \ utils/can/Makefile \
lib/vxworks/testsuite/Makefile deleted +0 -43
43 lines not on this page · raw message
testsuite/smokey/vxworkstests/Makefile.am new file +95 -0
95 lines not on this page · raw message
testsuite/smokey/vxworkstests/lst-1.c renamed from lib/vxworks/testsuite/lst-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/vxworkstests/msgQ-1.c renamed from lib/vxworks/testsuite/msgQ-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/vxworkstests/msgQ-2.c renamed from lib/vxworks/testsuite/msgQ-2.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/vxworkstests/msgQ-3.c renamed from lib/vxworks/testsuite/msgQ-3.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/vxworkstests/rng-1.c renamed from lib/vxworks/testsuite/rng-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdlib.h> #include <string.h> #include <stdio.h>
testsuite/smokey/vxworkstests/sem-1.c renamed from lib/vxworks/testsuite/sem-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/vxworkstests/sem-2.c renamed from lib/vxworks/testsuite/sem-2.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/vxworkstests/sem-3.c renamed from lib/vxworks/testsuite/sem-3.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/vxworkstests/sem-4.c renamed from lib/vxworks/testsuite/sem-4.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/vxworkstests/task-1.c renamed from lib/vxworks/testsuite/task-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
testsuite/smokey/vxworkstests/task-2.c renamed from lib/vxworks/testsuite/task-2.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <unistd.h>
testsuite/smokey/vxworkstests/vxworkstests.c new file +45 -0
45 lines not on this page · raw message
testsuite/smokey/vxworkstests/vxworkstests_driver.c new file +33 -0
@@ -0,0 +1,33 @@ +// SPDX-License-Identifier: GPL-2.0 +#include <error.h> +#include <libgen.h> +#include <smokey/smokey.h> +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> + +int main (int argc,char *const argv[]) +{ +struct smokey_test *t; +int ret, fails =0 ; + +if (pvlist_empty (&smokey_test_list)) +return 0 ; + +for_each_smokey_test (t) { + ret = t->run (t, argc, argv); +if (ret) { + fails++; +if (smokey_keep_going) +continue ; +if (smokey_verbose_mode) +error (1 , -ret,"test %s failed" , t->name); +return 1 ; + } +smokey_note ("%s OK" , t->name); + } + +return fails !=0 ; +}
testsuite/smokey/vxworkstests/wd-1.c renamed from lib/vxworks/testsuite/wd-1.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h>
Signature · 1 line
2.35.3
Re: [PATCH v7 03/10] testsuite: Fully integrate vwworkstests into smokey
Quoted 337 lines · Jan Kiszka
From: Aaron Marcher <[email protected]>
Same as for alchemytests and psostests.
Signed-off-by Richard Weinberger <[email protected]>Signed-off-by Aaron Marcher <[email protected]>[Jan: fix whitespace issues, clean up makefile, do not hook into automake yet]Signed-off-by Jan Kiszka <[email protected]>--- configure.ac | 2 +- lib/vxworks/testsuite/Makefile | 43 --------- testsuite/smokey/vxworkstests/Makefile.am | 95 +++++++++++++++++++ .../smokey/vxworkstests}/lst-1.c | 1 + .../smokey/vxworkstests}/msgQ-1.c | 1 + .../smokey/vxworkstests}/msgQ-2.c | 1 + .../smokey/vxworkstests}/msgQ-3.c | 1 + .../smokey/vxworkstests}/rng-1.c | 1 + .../smokey/vxworkstests}/sem-1.c | 1 + .../smokey/vxworkstests}/sem-2.c | 1 + .../smokey/vxworkstests}/sem-3.c | 1 + .../smokey/vxworkstests}/sem-4.c | 1 + .../smokey/vxworkstests}/task-1.c | 1 + .../smokey/vxworkstests}/task-2.c | 1 + testsuite/smokey/vxworkstests/vxworkstests.c | 45 +++++++++ .../smokey/vxworkstests/vxworkstests_driver.c | 33 +++++++ .../smokey/vxworkstests}/wd-1.c | 1 + 17 files changed, 186 insertions(+), 44 deletions(-) delete mode 100644 lib/vxworks/testsuite/Makefile create mode 100644 testsuite/smokey/vxworkstests/Makefile.am rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/lst-1.c (99%) rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/msgQ-1.c (98%) rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/msgQ-2.c (98%) rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/msgQ-3.c (98%) rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/rng-1.c (99%) rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-1.c (98%) rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-2.c (98%) rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-3.c (97%) rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-4.c (98%) rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/task-1.c (96%) rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/task-2.c (98%) create mode 100644 testsuite/smokey/vxworkstests/vxworkstests.c create mode 100644 testsuite/smokey/vxworkstests/vxworkstests_driver.c rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/wd-1.c (97%)configure.ac +1
-1@@ -1045,9 +1045,9 @@ AC_CONFIG_FILES([ \ testsuite/smokey/x86io/Makefile \ testsuite/smokey/alchemytests/Makefile \ testsuite/smokey/psostests/Makefile \ + testsuite/smokey/vxworkstests/Makefile \ testsuite/clocktest/Makefile \ testsuite/xeno-test/Makefile \ - testsuite/vxworkstests/Makefile \ utils/Makefile \ utils/hdb/Makefile \ utils/can/Makefile \lib/vxworks/testsuite/Makefile deleted +0
-43@@ -1,43 +0,0 @@ -ifeq ($(DESTDIR),) -XENO_CONFIG=xeno-config -else -XENO_CONFIG=$(DESTDIR)/bin/xeno-config -endif - -prefix := $(shell DESTDIR=$(DESTDIR) $(XENO_CONFIG) --prefix) -solibs := $(shell DESTDIR=$(DESTDIR) $(XENO_CONFIG) --libdir) - -ifeq ($(prefix),) -$(error Please add <xenomai-install-path>/bin to your PATH variable or specify DESTDIR) -endif - -TESTS := task-1 task-2 msgQ-1 msgQ-2 msgQ-3 wd-1 sem-1 sem-2 sem-3 sem-4 lst-1 rng-1 - -CFLAGS := $(shell DESTDIR=$(DESTDIR) $(XENO_CONFIG) --skin=vxworks --cflags) -g -LDFLAGS := $(shell DESTDIR=$(DESTDIR) $(XENO_CONFIG) --skin=vxworks --ldflags) -CC = $(shell DESTDIR=$(DESTDIR) $(XENO_CONFIG) --cc) - -all: $(TESTS) - -%: %.c - $(CC) -o $@ $< $(CFLAGS) $(LDFLAGS) - -install: all - install -d $(prefix)/testsuite/vxworks - install -t $(prefix)/testsuite/vxworks $(TESTS) - -clean: - $(RM) $(TESTS) *~ - -# Run the test suite. We pin all tests to CPU #0, so that SMP does not -# alter the execution sequence we expect from them. -test: all - @for t in $(TESTS); do \ - echo -n $$t...; \ - sudo LD_LIBRARY_PATH=$(solibs) $(VALGRIND) ./$$t --cpu-affinity=0 --silent && echo ok || echo BAD; \ - done - -test/%: % - sudo LD_LIBRARY_PATH=$(solibs) $(VALGRIND) ./$(@F) --cpu-affinity=0 --silent && echo ok || echo BAD - -.PHONY: clean testtestsuite/smokey/vxworkstests/Makefile.am new file +95
-0@@ -0,0 +1,95 @@ +testdir = @XENO_TEST_DIR@ +noinst_LIBRARIES = libvxworkstests.a + +libvxworkstests_a_SOURCES = vxworkstests.c +libvxworkstests_a_CPPFLAGS = \ + @XENO_USER_CFLAGS@ \ + -I$(top_srcdir) \ + -I$(top_srcdir)/include \ + -DXENO_TEST_DIR='"$(XENO_TEST_DIR)"' + +CCLD = $(top_srcdir)/scripts/wrap-link.sh $(CC) + +test_PROGRAMS = \ + vxworkstests \ + vxworkstests_lst1 \ + vxworkstests_msgQ1 \ + vxworkstests_msgQ2 \ + vxworkstests_msgQ3 \ + vxworkstests_rng1 \ + vxworkstests_sem1 \ + vxworkstests_sem2 \ + vxworkstests_sem3 \ + vxworkstests_sem4 \ + vxworkstests_wd1 \ + vxworkstests_task1 \ + vxworkstests_task2 + +vxworkscppflags = \ + @XENO_USER_CFLAGS@ \ + -I$(top_srcdir)/include + +vxworksldadd = \ + ../../../lib/vxworks/libvxworks@[email protected] \ + ../../../lib/copperplate/libcopperplate@[email protected] \ + @XENO_CORE_LDADD@ \ + @XENO_USER_LDADD@ \ + -lpthread -lrt -lm + +vxworkstests_SOURCES = vxworkstests_driver.c +vxworkstests_CPPFLAGS = $(vxworkscppflags) +vxworkstests_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ $(XENO_POSIX_WRAPPERS) +vxworkstests_LDADD = \ + ../../../lib/smokey/libsmokey@[email protected] \ + @XENO_CORE_LDADD@ \ + @XENO_USER_LDADD@ \ + -lpthread -lrt + +vxworkstests_lst1_SOURCES = lst-1.c +vxworkstests_lst1_CPPFLAGS = $(vxworkscppflags) +vxworkstests_lst1_LDADD = $(vxworksldadd) +vxworkstests_lst1_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +vxworkstests_task1_SOURCES = task-1.c +vxworkstests_task1_CPPFLAGS = $(vxworkscppflags) +vxworkstests_task1_LDADD = $(vxworksldadd) +vxworkstests_task1_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +vxworkstests_task2_SOURCES = task-2.c +vxworkstests_task2_CPPFLAGS = $(vxworkscppflags) +vxworkstests_task2_LDADD = $(vxworksldadd) +vxworkstests_task2_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +vxworkstests_msgQ1_SOURCES = msgQ-1.c +vxworkstests_msgQ1_CPPFLAGS = $(vxworkscppflags) +vxworkstests_msgQ1_LDADD = $(vxworksldadd) +vxworkstests_msgQ1_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +vxworkstests_msgQ2_SOURCES = msgQ-2.c +vxworkstests_msgQ2_CPPFLAGS = $(vxworkscppflags) +vxworkstests_msgQ2_LDADD = $(vxworksldadd) +vxworkstests_msgQ2_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +vxworkstests_msgQ3_SOURCES = msgQ-3.c +vxworkstests_msgQ3_CPPFLAGS = $(vxworkscppflags) +vxworkstests_msgQ3_LDADD = $(vxworksldadd) +vxworkstests_msgQ3_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +vxworkstests_rng1_SOURCES = rng-1.c +vxworkstests_rng1_CPPFLAGS = $(vxworkscppflags) +vxworkstests_rng1_LDADD = $(vxworksldadd) +vxworkstests_rng1_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +vxworkstests_sem1_SOURCES = sem-1.c +vxworkstests_sem1_CPPFLAGS = $(vxworkscppflags) +vxworkstests_sem1_LDADD = $(vxworksldadd) +vxworkstests_sem1_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +vxworkstests_sem2_SOURCES = sem-2.c +vxworkstests_sem2_CPPFLAGS = $(vxworkscppflags) +vxworkstests_sem2_LDADD = $(vxworksldadd) +vxworkstests_sem2_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +vxworkstests_sem3_SOURCES = sem-3.c +vxworkstests_sem3_CPPFLAGS = $(vxworkscppflags) +vxworkstests_sem3_LDADD = $(vxworksldadd) +vxworkstests_sem3_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +vxworkstests_sem4_SOURCES = sem-4.c +vxworkstests_sem4_CPPFLAGS = $(vxworkscppflags) +vxworkstests_sem4_LDADD = $(vxworksldadd) +vxworkstests_sem4_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +vxworkstests_wd1_SOURCES = wd-1.c +vxworkstests_wd1_CPPFLAGS = $(vxworkscppflags) +vxworkstests_wd1_LDADD = $(vxworksldadd) +vxworkstests_wd1_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@testsuite/smokey/vxworkstests/lst-1.c renamed from lib/vxworks/testsuite/lst-1.c +1
-0@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h> testsuite/smokey/vxworkstests/msgQ-1.c renamed from lib/vxworks/testsuite/msgQ-1.c +1
-0@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h> testsuite/smokey/vxworkstests/msgQ-2.c renamed from lib/vxworks/testsuite/msgQ-2.c +1
-0@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h> testsuite/smokey/vxworkstests/msgQ-3.c renamed from lib/vxworks/testsuite/msgQ-3.c +1
-0@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h> testsuite/smokey/vxworkstests/rng-1.c renamed from lib/vxworks/testsuite/rng-1.c +1
-0@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdlib.h> #include <string.h> #include <stdio.h> testsuite/smokey/vxworkstests/sem-1.c renamed from lib/vxworks/testsuite/sem-1.c +1
-0@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h> testsuite/smokey/vxworkstests/sem-2.c renamed from lib/vxworks/testsuite/sem-2.c +1
-0@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h> testsuite/smokey/vxworkstests/sem-3.c renamed from lib/vxworks/testsuite/sem-3.c +1
-0@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h> testsuite/smokey/vxworkstests/sem-4.c renamed from lib/vxworks/testsuite/sem-4.c +1
-0@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h> testsuite/smokey/vxworkstests/task-1.c renamed from lib/vxworks/testsuite/task-1.c +1
-0@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <copperplate/traceobj.h> testsuite/smokey/vxworkstests/task-2.c renamed from lib/vxworks/testsuite/task-2.c +0
-0
testsuite/smokey/vxworkstests/task-2.c line 4
Quoted 4 lines
testsuite/smokey/vxworkstests/task-2.c renamed from lib/vxworks/testsuite/task-2.c +1
-0@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <unistd.h>
We still have failures with this one, see
https://source.denx.de/Xenomai/xenomai-images/-/jobs/672278
2023-08-09T22:41:46 vxworkstests_task1 OK 2023-08-09T22:41:46 [8] at task-2.c:86 2023-08-09T22:41:46 [1] at task-2.c:33 2023-08-09T22:41:46 [9] at task-2.c:92 2023-08-09T22:41:46 [4] at task-2.c:58 2023-08-09T22:41:46 [10] at task-2.c:98 2023-08-09T22:41:46 [5] at task-2.c:63 2023-08-09T22:41:46 [11] at task-2.c:104 2023-08-09T22:41:46 [2] at task-2.c:38 2023-08-09T22:41:46 [12] at task-2.c:110 2023-08-09T22:41:46 [6] at task-2.c:67 2023-08-09T22:41:46 0\"009.525| BUG in __traceobj_assert_failed(): [foregroundTask] trace assertion failed: 2023-08-09T22:41:46 task-2.c:70 => \"ret == 0\"
Seems like taskSuspend is failing. Please examine - or let me know if we should disable this test for now as well.
Jan
Signature · 2 lines
Siemens AG, Technology Linux Expert Center
PATCH v4 4/10 testsuite: Remove old alchemytests Makefile
In reply to Aaron MarcherFrom: Richard Weinberger <[email protected]>
--- lib/alchemy/testsuite/Makefile | 70 ---------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 lib/alchemy/testsuite/Makefile
lib/alchemy/testsuite/Makefile deleted +0 -70
@@ -1,70 +0,0 @@ -ifeq ($(DESTDIR),) -XENO_CONFIG=xeno-config -else -XENO_CONFIG=$(DESTDIR)/bin/xeno-config -endif - -prefix := $(shell DESTDIR=$(DESTDIR) $(XENO_CONFIG) --prefix) -solibs := $(shell DESTDIR=$(DESTDIR) $(XENO_CONFIG) --libdir) -core := $(shell DESTDIR=$(DESTDIR) $(XENO_CONFIG) --core) - -ifeq ($(prefix),) -$(error Please add <xenomai-install-path>/bin to your PATH variable or specify DESTDIR) -endif - -cobalt-only := pipe-1 -mercury-only := -core-specific = $($(core)-only) - -TESTS := \ - task-1 \ - task-2 \ - task-3 \ - task-4 \ - task-5 \ - task-6 \ - task-7 \ - task-8 \ - task-9 \ - task-10 \ - mq-1 \ - mq-2 \ - mq-3 \ - alarm-1 \ - sem-1 \ - sem-2 \ - mutex-1 \ - event-1 \ - heap-1 \ - heap-2 \ - buffer-1 \ - $(core-specific) - -CFLAGS := $(shell DESTDIR=$(DESTDIR) $(XENO_CONFIG) --skin=alchemy --cflags) -g -LDFLAGS := $(shell DESTDIR=$(DESTDIR) $(XENO_CONFIG) --skin=alchemy --ldflags) -CC = $(shell DESTDIR=$(DESTDIR) $(XENO_CONFIG) --cc) - -all: $(TESTS) - -%: %.c - $(CC) -o $@ $< $(CFLAGS) $(LDFLAGS) - -install: all - install -d $(prefix)/testsuite/alchemy - install -t $(prefix)/testsuite/alchemy $(TESTS) - -clean: - $(RM) $(TESTS) *~ - -# Run the test suite. We pin all tests to CPU #0, so that SMP does not -# alter the execution sequence we expect from them. -test: all - @for t in $(TESTS); do \ - echo -n $$t...; \ - sudo LD_LIBRARY_PATH=$(solibs) $(VALGRIND) ./$$t --cpu-affinity=0 --silent && echo ok || echo BAD; \ - done - -test/%: % - sudo LD_LIBRARY_PATH=$(solibs) $(VALGRIND) ./$(@F) --cpu-affinity=0 --silent && echo ok || echo BAD - -.PHONY: clean test
Signature · 1 line
2.35.3
PATCH v4 5/10 alchemytests: Fix gcc warning in buffer-1
In reply to Aaron MarcherFrom: Richard Weinberger <[email protected]>
Make n an unsigned integer, such that gcc realizes that "%.2d" cannot become negative and will fit into our 3 bytes buffer.
Fixes:
buffer-1.c:64:15: error: ‘%.2d’ directive writing between 2 and 10 bytes into a region of size 3 [-Werror=format-overflow=]
sprintf(s, "%.2d", 11 * n);
^~~~--- testsuite/smokey/alchemytests/buffer-1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
testsuite/smokey/alchemytests/buffer-1.c +1 -1
@@ -50,7 +50,7 @@ static void background_task(void *arg) {char c ='A' , s[3 ];ssize_t ret; -int n =0 ; +unsigned int n =0 ;traceobj_enter (&trobj);
Signature · 1 line
2.35.3
PATCH v4 6/10 alchemytests: Fix gcc warning in task-9
In reply to Aaron MarcherFrom: Richard Weinberger <[email protected]>
Make it static, no prototype needed anymore.
Fixes:
task-9.c:13:6: error: no previous prototype for ‘sighandler’ [-Werror=missing-prototypes]
void sighandler(int sig)
--- testsuite/smokey/alchemytests/task-9.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
testsuite/smokey/alchemytests/task-9.c +1 -1
@@ -11,7 +11,7 @@ static RT_TASK t_test;#define ONE_SECOND 1000000000ULL -void sighandler (int sig) +static void sighandler (int sig) {/* nop */ }
Signature · 1 line
2.35.3
PATCH v4 7/10 alchemytests: Check pipe-1 asprintf ret value
In reply to Aaron Marcher--- testsuite/smokey/alchemytests/pipe-1.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
testsuite/smokey/alchemytests/pipe-1.c +4 -2
@@ -49,11 +49,13 @@ static void realtime_task(void *arg)static void *regular_thread (void *arg) {struct pipe_message m; -int fd, seq =0 ; +int fd, res, seq =0 ;ssize_t ret;char *rtp; -asprintf (&rtp,"/dev/rtp%d" , minor); + res =asprintf (&rtp,"/dev/rtp%d" , minor); +if (res <0 ) +return NULL ; fd =open (rtp,O_RDWR );free (rtp);
Signature · 1 line
2.35.3
PATCH v4 8/10 alchemytests: Fix task-2
In reply to Aaron Marchertask-2 seems to suffer from modern gcc, changes to safety and count are dead stores. Uses a compiler barrier to mitigate this behaviour.
https://lore.kernel.org/xenomai/[email protected]/
--- testsuite/smokey/alchemytests/task-2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
testsuite/smokey/alchemytests/task-2.c +3 -1
@@ -29,8 +29,10 @@ static void background_task(void *arg)traceobj_mark (&trobj,2 ); -while (--safety >0 ) +while (--safety >0 ) { +compiler_barrier (); count++; + }traceobj_exit (&trobj); }
Signature · 1 line
2.35.3
PATCH v4 9/10 alchemytests: Fix task-5 logic
In reply to Aaron MarcherSemaphore call in wrong logical order, so that on the second rt_task_set_priority call the task doesn't exist anymore and thus the call fails with EINVAL.
This commit fixes the order so that the test passes again.
--- testsuite/smokey/alchemytests/task-5.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
testsuite/smokey/alchemytests/task-5.c +5 -5
@@ -45,17 +45,17 @@ static void foreground_task(void *arg)traceobj_mark (&trobj,4 ); - ret =rt_sem_v (&sem); -traceobj_check (&trobj, ret,0 ); + ret =rt_task_inquire (NULL , &info); +traceobj_assert (&trobj, ret ==0 && info.prio ==21 );traceobj_mark (&trobj,5 ); - ret =rt_task_inquire (NULL , &info); -traceobj_assert (&trobj, ret ==0 && info.prio ==21 ); + ret =rt_task_set_priority (&t_bgnd, info.prio); +traceobj_check (&trobj, ret,0 );traceobj_mark (&trobj,6 ); - ret =rt_task_set_priority (&t_bgnd, info.prio); + ret =rt_sem_v (&sem);traceobj_check (&trobj, ret,0 );traceobj_mark (&trobj,7 );
Signature · 1 line
2.35.3
PATCH v4 10/10 testsuite: disable broken tests
In reply to Aaron Marcheras discussed on the mailing list, disable broken tests (for now)
--- testsuite/smokey/psostests/psostests.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-)
testsuite/smokey/psostests/psostests.c +17 -5
@@ -35,18 +35,30 @@ TEST(psostests_mq1) TEST(psostests_mq2) TEST(psostests_mq3) TEST(psostests_pt1) -TEST(psostests_rn1) +// 0"000.679| BUG in __traceobj_assert_failed(): [rn1] trace assertion failed: +// testsuite/psostests/rn-1.c:46 +// => "ret == 0" +//TEST(psostests_rn1) TEST(psostests_sem1) TEST(psostests_sem2) TEST(psostests_task1) -TEST(psostests_task2) +// 0"014.452| BUG in __traceobj_assert_failed(): [FGND] trace assertion failed: +// ../../../../../../../../../workspace/sources/xenomai/testsuite/smokey/psostests/task-2.c:56 => "ret == 0" +//TEST(psostests_task2) TEST(psostests_task3) TEST(psostests_task4) TEST(psostests_task5) -TEST(psostests_task6) +// 0"011.370| BUG in __traceobj_assert_failed(): [FGND] trace assertion failed: +// testsuite/psostests/task-6.c:62 +// => "ret == 0 && oldprio == myprio" +// TEST(psostests_task6) TEST(psostests_task7) -TEST(psostests_task8) -TEST(psostests_task9) +// runs forever (100% CPU) +//TEST(psostests_task8) +// 0"002.198| WARNING: [main] lack of resources for core thread, EBUSY +// 0"003.421| BUG in __traceobj_assert_failed(): [root] trace assertion failed: +// ../../../../../../../../../workspace/sources/xenomai/testsuite/smokey/psostests/task-9.c:29 => "ret == 0" +//TEST(psostests_task9) TEST(psostests_tm1) TEST(psostests_tm2) TEST(psostests_tm3)
Signature · 1 line
2.35.3
Quoted 16 lines · Aaron Marcher
This patch series fully integrates the currently abandoned alchemy, pSOS and VxWorks tests into Xenomai's testsuite.
For each test, a Smokey testcase is hooked up.Changes since v5:
- Improved task-2 fix commit messageAaron Marcher (7):
testsuite: Fully integrate alchemytests into smokey
testsuite: Fully integrate psostests into smokey
testsuite: Fully integrate vwworkstests into smokey
alchemytests: Check pipe-1 asprintf ret value
alchemytests: Fix task-2
alchemytests: Fix task-5 logic
testsuite: disable broken tests
Quoted 5 lines
Richard Weinberger (3):
testsuite: Remove old alchemytestsMakefile
alchemytests: Fix gcc warning in buffer-1
alchemytests: Fix gcc warning in task-9
Feel free to add "Updates" or "Closes" tags for the following gitlab issue that is tracking your activities here.
Something like
Updates https://gitlab.com/Xenomai/xenomai-hacker-space/-/issues/32
in the commit message should be enough.
Quoted 154 lines · Aaron Marcher
This patch series fully integrates the currently abandoned alchemy, pSOS and VxWorks tests into Xenomai's testsuite.
For each test, a Smokey testcase is hooked up.Changes since v5:
- Improved task-2 fix commit messageAaron Marcher (7):
testsuite: Fully integrate alchemytests into smokey
testsuite: Fully integrate psostests into smokey
testsuite: Fully integrate vwworkstests into smokey
alchemytests: Check pipe-1 asprintf ret value
alchemytests: Fix task-2
alchemytests: Fix task-5 logic
testsuite: disable broken testsRichard Weinberger (3):
testsuite: Remove old alchemytestsMakefile
alchemytests: Fix gcc warning in buffer-1
alchemytests: Fix gcc warning in task-9configure.ac | 7 +- lib/alchemy/testsuite/Makefile | 70 --------- lib/psos/testsuite/Makefile | 49 ------ lib/vxworks/testsuite/Makefile | 43 ----- testsuite/smokey/Makefile.am | 15 +- testsuite/smokey/alchemytests/Makefile.am | 148 ++++++++++++++++++ .../smokey/alchemytests}/alarm-1.c | 1 + testsuite/smokey/alchemytests/alchemytests.c | 56 +++++++ .../smokey/alchemytests/alchemytests_driver.c | 33 ++++ .../smokey/alchemytests}/buffer-1.c | 3 +- .../smokey/alchemytests}/event-1.c | 1 + .../smokey/alchemytests}/heap-1.c | 1 + .../smokey/alchemytests}/heap-2.c | 1 + .../smokey/alchemytests}/mq-1.c | 1 + .../smokey/alchemytests}/mq-2.c | 1 + .../smokey/alchemytests}/mq-3.c | 1 + .../smokey/alchemytests}/mutex-1.c | 1 + .../smokey/alchemytests}/pipe-1.c | 7 +- .../smokey/alchemytests}/sem-1.c | 1 + .../smokey/alchemytests}/sem-2.c | 1 + .../smokey/alchemytests}/task-1.c | 1 + .../smokey/alchemytests}/task-10.c | 1 + .../smokey/alchemytests}/task-2.c | 5 +- .../smokey/alchemytests}/task-3.c | 1 + .../smokey/alchemytests}/task-4.c | 1 + .../smokey/alchemytests}/task-5.c | 11 +- .../smokey/alchemytests}/task-6.c | 1 + .../smokey/alchemytests}/task-7.c | 1 + .../smokey/alchemytests}/task-8.c | 1 + .../smokey/alchemytests}/task-9.c | 3 +- testsuite/smokey/psostests/Makefile.am | 148 ++++++++++++++++++ .../smokey/psostests}/mq-1.c | 1 + .../smokey/psostests}/mq-2.c | 1 + .../smokey/psostests}/mq-3.c | 1 + testsuite/smokey/psostests/psostests.c | 69 ++++++++ testsuite/smokey/psostests/psostests_driver.c | 34 ++++ .../smokey/psostests}/pt-1.c | 1 + .../smokey/psostests}/rn-1.c | 1 + .../smokey/psostests}/sem-1.c | 1 + .../smokey/psostests}/sem-2.c | 1 + .../smokey/psostests}/task-1.c | 1 + .../smokey/psostests}/task-2.c | 1 + .../smokey/psostests}/task-3.c | 1 + .../smokey/psostests}/task-4.c | 1 + .../smokey/psostests}/task-5.c | 1 + .../smokey/psostests}/task-6.c | 1 + .../smokey/psostests}/task-7.c | 1 + .../smokey/psostests}/task-8.c | 1 + .../smokey/psostests}/task-9.c | 1 + .../smokey/psostests}/tm-1.c | 1 + .../smokey/psostests}/tm-2.c | 1 + .../smokey/psostests}/tm-3.c | 1 + .../smokey/psostests}/tm-4.c | 1 + .../smokey/psostests}/tm-5.c | 1 + .../smokey/psostests}/tm-6.c | 1 + .../smokey/psostests}/tm-7.c | 1 + testsuite/smokey/vxworkstests/Makefile.am | 94 +++++++++++ .../smokey/vxworkstests}/lst-1.c | 1 + .../smokey/vxworkstests}/msgQ-1.c | 1 + .../smokey/vxworkstests}/msgQ-2.c | 1 + .../smokey/vxworkstests}/msgQ-3.c | 1 + .../smokey/vxworkstests}/rng-1.c | 1 + .../smokey/vxworkstests}/sem-1.c | 1 + .../smokey/vxworkstests}/sem-2.c | 1 + .../smokey/vxworkstests}/sem-3.c | 1 + .../smokey/vxworkstests}/sem-4.c | 1 + .../smokey/vxworkstests}/task-1.c | 1 + .../smokey/vxworkstests}/task-2.c | 1 + testsuite/smokey/vxworkstests/vxworkstests.c | 46 ++++++ .../smokey/vxworkstests/vxworkstests_driver.c | 33 ++++ .../smokey/vxworkstests}/wd-1.c | 1 + 71 files changed, 749 insertions(+), 177 deletions(-) delete mode 100644 lib/alchemy/testsuite/Makefile delete mode 100644 lib/psos/testsuite/Makefile delete mode 100644 lib/vxworks/testsuite/Makefile create mode 100644 testsuite/smokey/alchemytests/Makefile.am rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/alarm-1.c (97%) create mode 100644 testsuite/smokey/alchemytests/alchemytests.c create mode 100644 testsuite/smokey/alchemytests/alchemytests_driver.c rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/buffer-1.c (97%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/event-1.c (98%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/heap-1.c (98%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/heap-2.c (98%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mq-1.c (98%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mq-2.c (98%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mq-3.c (98%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mutex-1.c (98%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/pipe-1.c (96%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/sem-1.c (98%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/sem-2.c (97%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-1.c (94%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-10.c (97%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-2.c (95%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-3.c (97%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-4.c (98%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-5.c (98%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-6.c (97%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-7.c (98%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-8.c (97%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-9.c (94%) create mode 100644 testsuite/smokey/psostests/Makefile.am rename {lib/psos/testsuite => testsuite/smokey/psostests}/mq-1.c (97%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/mq-2.c (98%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/mq-3.c (98%) create mode 100644 testsuite/smokey/psostests/psostests.c create mode 100644 testsuite/smokey/psostests/psostests_driver.c rename {lib/psos/testsuite => testsuite/smokey/psostests}/pt-1.c (96%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/rn-1.c (97%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/sem-1.c (98%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/sem-2.c (97%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-1.c (95%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-2.c (98%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-3.c (96%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-4.c (97%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-5.c (98%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-6.c (98%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-7.c (97%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-8.c (98%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-9.c (98%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-1.c (95%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-2.c (97%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-3.c (97%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-4.c (97%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-5.c (97%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-6.c (95%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-7.c (95%) create mode 100644 testsuite/smokey/vxworkstests/Makefile.am rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/lst-1.c (99%) rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/msgQ-1.c (98%) rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/msgQ-2.c (98%) rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/msgQ-3.c (98%) rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/rng-1.c (99%) rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-1.c (98%)
Quoted 9 lines
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-2.c (98%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-3.c (97%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-4.c (98%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/task-1.c (96%)
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/task-2.c (98%)
create mode 100644 testsuite/smokey/vxworkstests/vxworkstests.c
create mode 100644 testsuite/smokey/vxworkstests/vxworkstests_driver.c
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/wd-1.c (97%)All applied, just with some whitespace massaging and a reordering of when the build system is actually updated. See next branch for the result.
Thanks,
Jan
Signature · 2 lines
Siemens AG, Technology Linux Expert Center
Quoted 165 lines · Jan Kiszka
Quoted 154 lines · Aaron Marcher
This patch series fully integrates the currently abandoned alchemy, pSOS and VxWorks tests into Xenomai's testsuite.
For each test, a Smokey testcase is hooked up.Changes since v5:
- Improved task-2 fix commit messageAaron Marcher (7):
testsuite: Fully integrate alchemytests into smokey
testsuite: Fully integrate psostests into smokey
testsuite: Fully integrate vwworkstests into smokey
alchemytests: Check pipe-1 asprintf ret value
alchemytests: Fix task-2
alchemytests: Fix task-5 logic
testsuite: disable broken testsRichard Weinberger (3):
testsuite: Remove old alchemytestsMakefile
alchemytests: Fix gcc warning in buffer-1
alchemytests: Fix gcc warning in task-9configure.ac | 7 +- lib/alchemy/testsuite/Makefile | 70 --------- lib/psos/testsuite/Makefile | 49 ------ lib/vxworks/testsuite/Makefile | 43 ----- testsuite/smokey/Makefile.am | 15 +- testsuite/smokey/alchemytests/Makefile.am | 148 ++++++++++++++++++ .../smokey/alchemytests}/alarm-1.c | 1 + testsuite/smokey/alchemytests/alchemytests.c | 56 +++++++ .../smokey/alchemytests/alchemytests_driver.c | 33 ++++ .../smokey/alchemytests}/buffer-1.c | 3 +- .../smokey/alchemytests}/event-1.c | 1 + .../smokey/alchemytests}/heap-1.c | 1 + .../smokey/alchemytests}/heap-2.c | 1 + .../smokey/alchemytests}/mq-1.c | 1 + .../smokey/alchemytests}/mq-2.c | 1 + .../smokey/alchemytests}/mq-3.c | 1 + .../smokey/alchemytests}/mutex-1.c | 1 + .../smokey/alchemytests}/pipe-1.c | 7 +- .../smokey/alchemytests}/sem-1.c | 1 + .../smokey/alchemytests}/sem-2.c | 1 + .../smokey/alchemytests}/task-1.c | 1 + .../smokey/alchemytests}/task-10.c | 1 + .../smokey/alchemytests}/task-2.c | 5 +- .../smokey/alchemytests}/task-3.c | 1 + .../smokey/alchemytests}/task-4.c | 1 + .../smokey/alchemytests}/task-5.c | 11 +- .../smokey/alchemytests}/task-6.c | 1 + .../smokey/alchemytests}/task-7.c | 1 + .../smokey/alchemytests}/task-8.c | 1 + .../smokey/alchemytests}/task-9.c | 3 +- testsuite/smokey/psostests/Makefile.am | 148 ++++++++++++++++++ .../smokey/psostests}/mq-1.c | 1 + .../smokey/psostests}/mq-2.c | 1 + .../smokey/psostests}/mq-3.c | 1 + testsuite/smokey/psostests/psostests.c | 69 ++++++++ testsuite/smokey/psostests/psostests_driver.c | 34 ++++ .../smokey/psostests}/pt-1.c | 1 + .../smokey/psostests}/rn-1.c | 1 + .../smokey/psostests}/sem-1.c | 1 + .../smokey/psostests}/sem-2.c | 1 + .../smokey/psostests}/task-1.c | 1 + .../smokey/psostests}/task-2.c | 1 + .../smokey/psostests}/task-3.c | 1 + .../smokey/psostests}/task-4.c | 1 + .../smokey/psostests}/task-5.c | 1 + .../smokey/psostests}/task-6.c | 1 + .../smokey/psostests}/task-7.c | 1 + .../smokey/psostests}/task-8.c | 1 + .../smokey/psostests}/task-9.c | 1 + .../smokey/psostests}/tm-1.c | 1 + .../smokey/psostests}/tm-2.c | 1 + .../smokey/psostests}/tm-3.c | 1 + .../smokey/psostests}/tm-4.c | 1 + .../smokey/psostests}/tm-5.c | 1 + .../smokey/psostests}/tm-6.c | 1 + .../smokey/psostests}/tm-7.c | 1 + testsuite/smokey/vxworkstests/Makefile.am | 94 +++++++++++ .../smokey/vxworkstests}/lst-1.c | 1 + .../smokey/vxworkstests}/msgQ-1.c | 1 + .../smokey/vxworkstests}/msgQ-2.c | 1 + .../smokey/vxworkstests}/msgQ-3.c | 1 + .../smokey/vxworkstests}/rng-1.c | 1 + .../smokey/vxworkstests}/sem-1.c | 1 + .../smokey/vxworkstests}/sem-2.c | 1 + .../smokey/vxworkstests}/sem-3.c | 1 + .../smokey/vxworkstests}/sem-4.c | 1 + .../smokey/vxworkstests}/task-1.c | 1 + .../smokey/vxworkstests}/task-2.c | 1 + testsuite/smokey/vxworkstests/vxworkstests.c | 46 ++++++ .../smokey/vxworkstests/vxworkstests_driver.c | 33 ++++ .../smokey/vxworkstests}/wd-1.c | 1 + 71 files changed, 749 insertions(+), 177 deletions(-) delete mode 100644 lib/alchemy/testsuite/Makefile delete mode 100644 lib/psos/testsuite/Makefile delete mode 100644 lib/vxworks/testsuite/Makefile create mode 100644 testsuite/smokey/alchemytests/Makefile.am rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/alarm-1.c (97%) create mode 100644 testsuite/smokey/alchemytests/alchemytests.c create mode 100644 testsuite/smokey/alchemytests/alchemytests_driver.c rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/buffer-1.c (97%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/event-1.c (98%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/heap-1.c (98%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/heap-2.c (98%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mq-1.c (98%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mq-2.c (98%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mq-3.c (98%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/mutex-1.c (98%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/pipe-1.c (96%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/sem-1.c (98%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/sem-2.c (97%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-1.c (94%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-10.c (97%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-2.c (95%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-3.c (97%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-4.c (98%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-5.c (98%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-6.c (97%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-7.c (98%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-8.c (97%) rename {lib/alchemy/testsuite => testsuite/smokey/alchemytests}/task-9.c (94%) create mode 100644 testsuite/smokey/psostests/Makefile.am rename {lib/psos/testsuite => testsuite/smokey/psostests}/mq-1.c (97%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/mq-2.c (98%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/mq-3.c (98%) create mode 100644 testsuite/smokey/psostests/psostests.c create mode 100644 testsuite/smokey/psostests/psostests_driver.c rename {lib/psos/testsuite => testsuite/smokey/psostests}/pt-1.c (96%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/rn-1.c (97%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/sem-1.c (98%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/sem-2.c (97%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-1.c (95%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-2.c (98%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-3.c (96%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-4.c (97%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-5.c (98%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-6.c (98%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-7.c (97%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-8.c (98%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/task-9.c (98%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-1.c (95%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-2.c (97%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-3.c (97%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-4.c (97%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-5.c (97%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-6.c (95%) rename {lib/psos/testsuite => testsuite/smokey/psostests}/tm-7.c (95%) create mode 100644 testsuite/smokey/vxworkstests/Makefile.am rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/lst-1.c (99%) rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/msgQ-1.c (98%) rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/msgQ-2.c (98%) rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/msgQ-3.c (98%) rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/rng-1.c (99%) rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-1.c (98%)Quoted 9 lines
rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-2.c (98%) rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-3.c (97%) rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/sem-4.c (98%) rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/task-1.c (96%) rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/task-2.c (98%) create mode 100644 testsuite/smokey/vxworkstests/vxworkstests.c create mode 100644 testsuite/smokey/vxworkstests/vxworkstests_driver.c rename {lib/vxworks/testsuite => testsuite/smokey/vxworkstests}/wd-1.c (97%)
Quoted 3 lines
All applied, just with some whitespace massaging and a reordering of when the build system is actually updated. See next branch for the result.
There were also bugs in the makefiles, breaking vxworks and psos build on debian bullseye toolchain at least. Updated patches submitted.
Jan
Signature · 2 lines
Siemens AG, Technology Linux Expert Center