aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/ipc (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-01-05selftests: remove duplicated all and clean targetbamvor.zhangjian@huawei.com1-6/+1
Currently, kselftest use TEST_PROGS, TEST_PROGS_EXTENDED, TEST_FILES to indicate the test program, extended test program and test files. It is easy to understand the purpose of these files. But mix of compiled and uncompiled files lead to duplicated "all" and "clean" targets. In order to remove the duplicated targets, introduce TEST_GEN_PROGS, TEST_GEN_PROGS_EXTENDED, TEST_GEN_FILES to indicate the compiled objects. Also, the later patch will make use of TEST_GEN_XXX to redirect these files to output directory indicated by KBUILD_OUTPUT or O. And add this changes to "Contributing new tests(details)" of Documentation/kselftest.txt. Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2016-02-25selftests: add missing .gitignore file or entrySudeep Holla1-0/+1
Only IPC selftest is missing the .gitignore file, so add it. Also step_after_suspend_test is missing in breakpoints selftest .gitignore file Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2016-02-25selftests: create test-specific kconfig fragmentsBamvor Jian Zhang1-0/+2
Create the config file in each directory of testcase which need more kernel configuration than the default defconfig. User could use these configs with merge_config.sh script: Enable config for specific testcase: (export ARCH=xxx #for cross compiling) ./scripts/kconfig/merge_config.sh .config \ tools/testing/selftests/xxx/config Enable configs for all testcases: (export ARCH=xxx #for cross compiling) ./scripts/kconfig/merge_config.sh .config \ tools/testing/selftests/*/config Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org> Reviewed-by: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2015-04-02selftest/ipc: enable cross compilationTyler Baker1-5/+1
Use the CC variable instead of hard coding gcc. Signed-off-by: Tyler Baker <tyler.baker@linaro.org> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2015-03-13selftests: Introduce minimal shared logic for running testsMichael Ellerman1-2/+3
This adds a Make include file which most selftests can then include to get the run_tests logic. On its own this has the advantage of some reduction in repetition, and also means the pass/fail message is defined in fewer places. However the key advantage is it will allow us to implement install very simply in a subsequent patch. The default implementation just executes each program in $(TEST_PROGS). We use a variable to hold the default implementation of $(RUN_TESTS) because that gives us a clean way to override it if necessary, ie. using override. The mount, memory-hotplug and mqueue tests use that to provide a different implementation. Tests are not run via /bin/bash, so if they are scripts they must be executable, we add a+x to several. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2014-11-17selftests/ipc: change test to use ksft frameworkShuah Khan1-12/+14
Change ipc test to use kselftest framework to report test results. With this change this test exits with EXIT_FAIL instead of -errno. Changed print errno in test fail messages to not loose that information. Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2014-08-29tools: selftests: fix build issue with make kselftests targetPhong Tran1-3/+3
Fix the typo of ARCH when running 'make kselftests'. Change the 'X86' to 'x86'. Test by compilation. Signed-off-by: Phong Tran <tranmanphong@gmail.com> Cc: David Herrmann <dh.herrmann@gmail.com> Cc: Hugh Dickins <hughd@google.com> Cc: Shuah Khan <shuah.kh@samsung.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Michal Marek <mmarek@suse.cz> Cc: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-07-03tools/testing/selftests/ipc/msgque.c: improve error handling when not running as rootShuah Khan1-0/+5
The test fails in the middle when it is not run as root while accessing /proc/sys/kernel/msg_next_id. Changed it to check for root at the beginning of the test and exit if not root. Signed-off-by: Shuah Khan <shuah.kh@samsung.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Davidlohr Bueso <davidlohr@hp.com> Cc: Colin Ian King <colin.king@canonical.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-03-10tools/testing/selftests/ipc/msgque.c: handle msgget failure return correctlyColin Ian King1-0/+1
A failed msgget causes the test to return an uninitialised value in ret. Assign ret to -errno on error exit. Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Davidlohr Bueso <davidlohr@hp.com> Cc: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-01-04selftests: IPC message queue copy feature testStanislav Kinsbursky2-0/+271
This test can be used to check wheither kernel supports IPC message queue copy and restore features (required by CRIU project). Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Cc: Serge Hallyn <serge.hallyn@canonical.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Pavel Emelyanov <xemul@parallels.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Michael Kerrisk <mtk.manpages@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>