Hi,
This series separates tests using the RTC devices between the one
testing driver agnostic kernel facilities (timers) and the others that
are testing device drivers and hardware.
Then, rtctest is reworked to use the test harness and be much more
robust. Skipping tests is now easier and tests will not block
indefinitively.
I'm planning to send more improvements later this cycle.
Alexandre Belloni (4):
selftests: timers: move PIE tests out of rtctest
selftests: timers: rtcpie: restore previous PIE rate
selftests: move RTC tests to rtc subfolder
selftests: rtc: rework rtctest
MAINTAINERS | 2 +-
tools/testing/selftests/Makefile | 1 +
tools/testing/selftests/rtc/.gitignore | 2 +
tools/testing/selftests/rtc/Makefile | 9 +
tools/testing/selftests/rtc/rtctest.c | 238 +++++++++++
.../rtctest_setdate.c => rtc/setdate.c} | 0
tools/testing/selftests/timers/.gitignore | 3 +-
tools/testing/selftests/timers/Makefile | 4 +-
tools/testing/selftests/timers/rtcpie.c | 134 ++++++
tools/testing/selftests/timers/rtctest.c | 403 ------------------
10 files changed, 388 insertions(+), 408 deletions(-)
create mode 100644 tools/testing/selftests/rtc/.gitignore
create mode 100644 tools/testing/selftests/rtc/Makefile
create mode 100644 tools/testing/selftests/rtc/rtctest.c
rename tools/testing/selftests/{timers/rtctest_setdate.c => rtc/setdate.c} (100%)
create mode 100644 tools/testing/selftests/timers/rtcpie.c
delete mode 100644 tools/testing/selftests/timers/rtctest.c
--
2.17.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
I run into the following error
testing/selftests/kvm/dirty_log_test.c:285: undefined reference to `pthread_create'
testing/selftests/kvm/dirty_log_test.c:297: undefined reference to `pthread_join'
collect2: error: ld returned 1 exit status
my gcc version is gcc version 4.8.4
"-pthread" would work everywhere
Signed-off-by: Lei Yang <Lei.Yang(a)windriver.com>
---
tools/testing/selftests/kvm/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile
index 03b0f55..48c970c 100644
--- a/tools/testing/selftests/kvm/Makefile
+++ b/tools/testing/selftests/kvm/Makefile
@@ -20,7 +20,7 @@ INSTALL_HDR_PATH = $(top_srcdir)/usr
LINUX_HDR_PATH = $(INSTALL_HDR_PATH)/include/
LINUX_TOOL_INCLUDE = $(top_srcdir)tools/include
CFLAGS += -O2 -g -std=gnu99 -I$(LINUX_TOOL_INCLUDE) -I$(LINUX_HDR_PATH) -Iinclude -I$(<D) -I..
-LDFLAGS += -lpthread
+LDFLAGS += -pthread
# After inclusion, $(OUTPUT) is defined and
# $(TEST_GEN_PROGS) starts with $(OUTPUT)/
--
1.9.1
Config fragment files should be placed in
tools/testing/selftests/<testdir>/config
Signed-off-by: Anders Roxell <anders.roxell(a)linaro.org>
---
Documentation/dev-tools/kselftest.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/dev-tools/kselftest.rst b/Documentation/dev-tools/kselftest.rst
index 6f653acea248..dad1bb8711e2 100644
--- a/Documentation/dev-tools/kselftest.rst
+++ b/Documentation/dev-tools/kselftest.rst
@@ -159,7 +159,7 @@ Contributing new tests (details)
* If a test needs specific kernel config options enabled, add a config file in
the test directory to enable them.
- e.g: tools/testing/selftests/android/ion/config
+ e.g: tools/testing/selftests/android/config
Test Harness
============
--
2.11.0
v4:
* Add patches and 1 and 2, to make q_lock mandatory,
in other words, require output and capture locks to match.
* Add WARN_ON if the lock is not held in v4l2_m2m_try_schedule,
and also document the requirement.
* Add a comment explaining why the job is scheduled.
This series goal is to avoid drivers from having ad-hoc code
to call .device_run in non-atomic context. Currently, .device_run
can be called via v4l2_m2m_job_finish(), potentially running
in interrupt context.
This series will be useful for the upcoming Request API, where drivers
typically require .device_run to be called in non-atomic context for
v4l2_ctrl_request_setup() calls.
The solution is to add a per-device worker that is scheduled
by v4l2_m2m_job_finish, which replaces drivers having a threaded interrupt
or similar.
This change allows v4l2_m2m_job_finish() to be called in interrupt
context, separating .device_run and v4l2_m2m_job_finish() contexts.
It's worth mentioning that v4l2_m2m_cancel_job() doesn't need
to flush or cancel the new worker, because the job_spinlock
synchronizes both and also because the core prevents simultaneous
jobs. Either v4l2_m2m_cancel_job() will wait for the worker, or the
worker will be unable to run a new job.
Testing
-------
In order to test the change, and make sure no regressions are
introduced, a kselftest test is added to stress the mem2mem framework.
Note that this series rework the kselftest media_tests target.
Those tests that need hardware and human intervention are now
marked as _EXTENDED, and a frontend script is added to run those
tests that can run without hardware or human intervention.
This will allow the media_tests target to be included in
automatic regression testing setups.
Hopefully, we will be able to introduce more and more automatic
regression tests. Currently, our self-test run looks like:
$ make TARGETS=media_tests kselftest
make[1]: Entering directory '/home/zeta/repos/builds/virtme-x86_64'
make[3]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
make[3]: Nothing to be done for 'all'.
make[3]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
TAP version 13
selftests: media_tests: m2m_job_test.sh
========================================
-------------------
running media tests
-------------------
media_device : no video4linux drivers loaded, vim2m is needed
not ok 1..1 selftests: media_tests: m2m_job_test.sh [SKIP]
make[1]: Leaving directory '/home/zeta/repos/builds/virtme-x86_64'
Ezequiel Garcia (5):
mem2mem: Require capture and output mutexes to match
v4l2-ioctl.c: simplify locking for m2m devices
v4l2-mem2mem: Avoid v4l2_m2m_prepare_buf from scheduling a job
v4l2-mem2mem: Avoid calling .device_run in v4l2_m2m_job_finish
selftests: media_tests: Add a memory-to-memory concurrent stress test
Sakari Ailus (1):
v4l2-mem2mem: Simplify exiting the function in __v4l2_m2m_try_schedule
drivers/media/v4l2-core/v4l2-ioctl.c | 47 +--
drivers/media/v4l2-core/v4l2-mem2mem.c | 94 ++++--
.../testing/selftests/media_tests/.gitignore | 1 +
tools/testing/selftests/media_tests/Makefile | 5 +-
.../selftests/media_tests/m2m_job_test.c | 287 ++++++++++++++++++
.../selftests/media_tests/m2m_job_test.sh | 32 ++
6 files changed, 389 insertions(+), 77 deletions(-)
create mode 100644 tools/testing/selftests/media_tests/m2m_job_test.c
create mode 100755 tools/testing/selftests/media_tests/m2m_job_test.sh
--
2.18.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html