- 18 6月, 2015 1 次提交
-
-
由 Kees Cook 提交于
This imports the existing seccomp test suite into the kernel's selftests tree. It contains extensive testing of seccomp features and corner cases. There remain additional tests to move into the kernel tree, but they have not yet been ported to all the architectures seccomp supports: https://github.com/redpig/seccomp/tree/master/testsSigned-off-by: NKees Cook <keescook@chromium.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
- 27 5月, 2015 17 次提交
-
-
由 Martin Kelly 提交于
The current comment indicates it's checking for a 32-bit build environment, but it actually checks for a 64-bit environment. Fix this. Signed-off-by: NMartin Kelly <martkell@amazon.com> Acked-by: NAndy Lutomirski <luto@kernel.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Arnaldo Carvalho de Melo 提交于
Make 3.81 doesn't have the 'undefine' command. Using undefine to clear LDFLAGS fails when make version 3.81 is used. Fix it to use override to clear LDFLAGS. Tested-by: NShuah Khan <shuahkh@osg.samsung.com> Cc: David Ahern <dsahern@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Michael Ellerman <mpe@ellerman.id.au> Link: http://lkml.kernel.org/r/20150514151225.GH23588@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Darren Hart 提交于
Add the futex/functional targets to .gitignore. Cc: Shuah Khan <shuahkh@osg.samsung.com> Cc: linux-api@vger.kernel.org Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Davidlohr Bueso <dave@stgolabs.net> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Darren Hart 提交于
Define the exit codes with KSFT_PASS and similar so tests can use these directly if they choose. Also enable harnesses and other tooling to use the defines instead of hardcoding the return codes. Cc: Shuah Khan <shuahkh@osg.samsung.com> Cc: linux-api@vger.kernel.org Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Davidlohr Bueso <dave@stgolabs.net> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Darren Hart 提交于
Enable futex tests to be built and run with the make kselftest and associated targets. Most of the tests require escalated privileges. These return ERROR, and run.sh continues. Cc: Shuah Khan <shuahkh@osg.samsung.com> Cc: linux-api@vger.kernel.org Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Davidlohr Bueso <dave@stgolabs.net> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Darren Hart 提交于
Add kselftest.h to logging.h and increment the pass and fail counters as part of the print_result routine which is called by all futex tests. Cc: Shuah Khan <shuahkh@osg.samsung.com> Cc: linux-api@vger.kernel.org Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Davidlohr Bueso <dave@stgolabs.net> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Darren Hart 提交于
Adapt the futextest Makefiles to use lib.mk macros for RUN_TESTS and EMIT_TESTS. For now, we reuse the run.sh mechanism provided by futextest. This doesn't provide the standard selftests: [PASS|FAIL] format, but the tests provide very similar output already. This results in the run_kselftest.sh script for futexes including a single line: ./run.sh Cc: Shuah Khan <shuahkh@osg.samsung.com> Cc: linux-api@vger.kernel.org Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Davidlohr Bueso <dave@stgolabs.net> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Darren Hart 提交于
The futextest testsuite [1] provides functional, stress, and performance tests for the various futex op codes. Those tests will be of more use to futex developers if they are included with the kernel source. Copy the core infrastructure and the functional tests into selftests, but adapt them for inclusion in the kernel: - Update the Makefile to include the run_tests target, remove reference to the performance and stress tests from the contributed sources. - Replace my dead IBM email address with my current Intel email address. - Remove the warrantee and write-to paragraphs from the license blurbs. - Remove the NAME section as the filename is easily determined. ;-) - Make the whitespace usage consistent in a couple of places. - Cleanup various CodingStyle violations. A future effort will explore moving the performance and stress tests into the kernel. 1. http://git.kernel.org/cgit/linux/kernel/git/dvhart/futextest.git Cc: Shuah Khan <shuahkh@osg.samsung.com> Cc: linux-api@vger.kernel.org Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Davidlohr Bueso <dave@stgolabs.net> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 John Stultz 提交于
It was reported that the alarmtimer-suspend test hangs on older systems that don't support _ALARM clockids. This is due to the fact that we don't check if the timer_create fails, and thus when we suspend, the system will not programatically resume. Fix this by checking the timer_create call for errors. Cc: Shuah Khan <shuahkh@osg.samsung.com> Cc: Prarit Bhargava <prarit@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Richard Cochran <richardcochran@gmail.com> Signed-off-by: NJohn Stultz <john.stultz@linaro.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 John Stultz 提交于
On the hardware I have, resume latency from an alarm is often 2-3 seconds (with a fair amount of variability due to the RTC's single second granularity). Having four seconds be the pass/fail bar is maybe a little too tight, so extend this to 5 seconds. Cc: Shuah Khan <shuahkh@osg.samsung.com> Cc: Prarit Bhargava <prarit@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Richard Cochran <richardcochran@gmail.com> Signed-off-by: NJohn Stultz <john.stultz@linaro.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 John Stultz 提交于
When testing on some hardware, waiting only a second before re-triggering suspend can keep TCP connections from re-establishing which after a number of cycles can cause TCP connections to close while the test is running. So extend the delay between suspend calls to 3 seconds to let the connections stay alive. Cc: Shuah Khan <shuahkh@osg.samsung.com> Cc: Prarit Bhargava <prarit@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Richard Cochran <richardcochran@gmail.com> Signed-off-by: NJohn Stultz <john.stultz@linaro.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Tyler Baker 提交于
Remove subdir from DEPS as it is already created at runtime. Without this, make install fails. Acked-by: NMichael Ellerman <mpe@ellerman.id.au> Signed-off-by: NTyler Baker <tyler.baker@linaro.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Tyler Baker 提交于
The ftrace test requires the directory test.d and all of it's contents to be present during execution. Use TEST_DIRS to ensure this is copied to the INSTALL_PATH. Acked-by: NMichael Ellerman <mpe@ellerman.id.au> Signed-off-by: NTyler Baker <tyler.baker@linaro.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Tyler Baker 提交于
Loop over all TEST_DIRS and recursively copy them to the INSTALL_PATH. Tests such as ftrace require a directory and all of it's contents to execute the test properly, thus these directories and files need to be copied when we perform an install. Acked-by: NMichael Ellerman <mpe@ellerman.id.au> Signed-off-by: NTyler Baker <tyler.baker@linaro.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Sri Jayaramappa 提交于
Commit commit 5bbe3547 ("mm: allow compaction of unevictable pages") introduced a sysctl that allows userspace to enable scanning of locked pages for compaction. This patch introduces a new test which fragments main memory and attempts to allocate a number of huge pages to exercise this compaction logic. Tested on machines with up to 32 GB RAM. With the patch a much larger number of huge pages can be allocated than on the kernel without the patch. Example output: On a machine with 16 GB RAM: sudo make run_tests vm ... ----------------------- running compaction_test ----------------------- No of huge pages allocated = 3834 [PASS] ... Signed-off-by: NSri Jayaramappa <sjayaram@akamai.com> Cc: linux-kernel@vger.kernel.org Cc: linux-api@vger.kernel.org Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Eric B Munson <emunson@akamai.com> Reviewed-by: NEric B Munson <emunson@akamai.com> Acked-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Zhang Zhen 提交于
If /proc/self/uid_map doesn't exist, mount test case exits wthout any warning. Fix it to print a warning that the test is skipped because /proc/self/uid_map doesn't exist. Signed-off-by: NZhang Zhen <zhenzhang.zhang@huawei.com> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Zhang Zhen 提交于
This patch includes the timers test binaries into the .gitignore file listing in their respective directories. This will make sure that git ignores all of these test binaries when displaying status. Signed-off-by: NZhang Zhen <zhenzhang.zhang@huawei.com> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
- 13 5月, 2015 5 次提交
-
-
由 Andy Lutomirski 提交于
We currently fail to build on a non-multilib x86_64 target. We print a helpful error, but it's nicer to allow the build to succeed. Fix it and improve cross-compilation support by detecting architecture support directly and building only the relevant tests. Signed-off-by: NAndy Lutomirski <luto@kernel.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Andy Lutomirski 提交于
Now that selftests/x86 uses the kselftest infrastructure, the run_x86_tests.sh mechanism is just in the way. Signed-off-by: NAndy Lutomirski <luto@kernel.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Tyler Baker 提交于
Include lib.mk and set TEST_PROGS where appropriate. Cc: Andy Lutomirski <luto@amacapital.net> Signed-off-by: NTyler Baker <tyler.baker@linaro.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Tyler Baker 提交于
If the CROSS_COMPILE is set remove all's dependency on all_32 and all_64. Cc: Andy Lutomirski <luto@amacapital.net> Acked-by: NAndy Lutomirski <luto@kernel.org> Signed-off-by: NTyler Baker <tyler.baker@linaro.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Tyler Baker 提交于
Using uname with the processor flag option in some cases can yield 'unknown' so lets use the machine flag option as it is deterministic. Add a dependency for all_32 when building on a x86 64 bit host so that both bitnesses are built in this case. Cc: Andy Lutomirski <luto@amacapital.net> Acked-by: NAndy Lutomirski <luto@kernel.org> Signed-off-by: NTyler Baker <tyler.baker@linaro.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
- 01 5月, 2015 1 次提交
-
-
由 Michael Ellerman 提交于
My patch to add install support for the powerpc selftests had a typo, leading to the three tests in the pmu directory itself not being installed. Fixes: 6faeeea4 ("selftests: Add install support for the powerpc tests") Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
-
- 30 4月, 2015 1 次提交
-
-
由 Michael Ellerman 提交于
This reverts commit feba4036. Although the principle of this change is good, the implementation has a few issues. Firstly we can sometimes fail to abort a syscall because r12 may have been clobbered by C code if we went down the virtual CPU accounting path, or if syscall tracing was enabled. Secondly we have decided that it is safer to abort the syscall even earlier in the syscall entry path, so that we avoid the syscall tracing path when we are transactional. So that we have time to thoroughly test those changes we have decided to revert this for this merge window and will merge the fixed version in the next window. NB. Rather than reverting the selftest we just drop tm-syscall from TEST_PROGS so that it's not run by default. Fixes: feba4036 ("powerpc/tm: Abort syscalls in active transactions") Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
-
- 16 4月, 2015 2 次提交
-
-
由 Andy Lutomirski 提交于
This is a very simple test that makes system calls with TF set. This test currently fails when running the 32-bit build on a 64-bit kernel on an Intel CPU. This bug will be fixed by the next commit. Signed-off-by: NAndy Lutomirski <luto@kernel.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Denys Vlasenko <vda.linux@googlemail.com> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Shuah Khan <shuah.kh@samsung.com> Link: http://lkml.kernel.org/r/20e68021155f6ab5c60590dcad81d37c68ea2c4f.1429139075.git.luto@kernel.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
-
由 David Rientjes 提交于
When MAP_HUGETLB memory is unmapped, the length must be hugepage aligned, otherwise it fails with -EINVAL. All tests currently behave correctly, but it's better to explcitly test the return value for completeness and document the requirement, especially if users copy map_hugetlb.c as a sample implementation. Signed-off-by: NDavid Rientjes <rientjes@google.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Davide Libenzi <davidel@xmailserver.org> Cc: Luiz Capitulino <lcapitulino@redhat.com> Cc: Shuah Khan <shuahkh@osg.samsung.com> Cc: Hugh Dickins <hughd@google.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Joern Engel <joern@logfs.org> Cc: Jianguo Wu <wujianguo@huawei.com> Cc: Eric B Munson <emunson@akamai.com> Acked-by: NMichael Ellerman <mpe@ellerman.id.au> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 11 4月, 2015 2 次提交
-
-
由 Sam bobroff 提交于
Check that a syscall made during an active transaction will fail with the correct failure code and that one made during a suspended transaction will succeed. Signed-off-by: NSam Bobroff <sam.bobroff@au1.ibm.com> Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
-
由 Sam bobroff 提交于
Move get_auxv_entry() from pmu/lib.c up to harness.c in order to make it available to other tests. Signed-off-by: NSam Bobroff <sam.bobroff@au1.ibm.com> Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
-
- 08 4月, 2015 1 次提交
-
-
由 Andy Lutomirski 提交于
This is my sigreturn test, added mostly unchanged from its old home. It exercises the sigreturn(2) syscall, specifically focusing on its interactions with various IRET corner cases. It tests for correct behavior in several areas that were historically dangerously buggy. For example, it exercises espfix on kernels of both bitnesses under various conditions, and it contains testcases for several now-fixed bugs in IRET error handling. If you run it on older kernels without the fixes, your system will crash. It probably won't eat your data in the process. There is no released kernel on which the sigreturn_64 test will pass, but it passes on tip:x86/asm. I plan to switch to lib.mk for Linux 4.2. I'm not using the ksft_ helpers at all yet. I can do that later. Signed-off-by: NAndy Lutomirski <luto@kernel.org> Acked-by: NShuah Khan <shuahkh@osg.samsung.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: Denys Vlasenko <vda.linux@googlemail.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Shuah Khan <shuah.kh@samsung.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/89d10b76b92c7202d8123654dc8d36701c017b3d.1428386971.git.luto@kernel.org [ Fixed empty format string GCC build warning in trivial_32bit_program.c ] Signed-off-by: NIngo Molnar <mingo@kernel.org>
-
- 03 4月, 2015 7 次提交
-
-
由 Namhyung Kim 提交于
The usleep is only provided on distros from Redhat so running ftracetest on other distro resulted in failures due to the missing usleep. The reason of using [u]sleep in the test was to generate (scheduler) events. It can be done various ways like this: yield() { ping localhost -c 1 || sleep .001 || usleep 1 || sleep 1; } For more information to the history of this patch, please refer to: Link: http://lkml.kernel.org/r/1427329943-16896-1-git-send-email-namhyung@kernel.orgReported-by: NMichael Ellerman <mpe@ellerman.id.au> Reported-by: NDave Jones <davej@codemonkey.org.uk> Reported-by: NLuis Henriques <luis.henriques@canonical.com> Suggested-by: NPádraig Brady <P@draigBrady.com> Acked-by: NSteven Rostedt <rostedt@goodmis.org> Acked-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Signed-off-by: NNamhyung Kim <namhyung@kernel.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Tyler Baker 提交于
Use the CC variable instead of hard coding gcc. Also clean up the compiler options by creating a CFLAGS variable. Signed-off-by: NTyler Baker <tyler.baker@linaro.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Tyler Baker 提交于
Use the CC variable instead of hard coding gcc. Signed-off-by: NTyler Baker <tyler.baker@linaro.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Tyler Baker 提交于
Include the default path for INSTALL_HDR_PATH to make it less intrusive when cross building. Signed-off-by: NTyler Baker <tyler.baker@linaro.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Tyler Baker 提交于
Use the CC variable instead of hard coding gcc. Also clean up the compiler options by creating a CFLAGS variable. Signed-off-by: NTyler Baker <tyler.baker@linaro.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Tyler Baker 提交于
Use the CC variable instead of hard coding gcc. Also clean up the compiler options by creating a CFLAGS variable. Signed-off-by: NTyler Baker <tyler.baker@linaro.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 John Stultz 提交于
The set-timer-lat test fails when testing CLOCK_BOOTTIME_ALARM or CLOCK_REALTIME_ALARM when the user isn't running as root or with CAP_WAKE_ALARM. So this patch improves the error checking so we report the issue more clearly and continue rather then reporting a failure. Cc: Shuah Khan <shuahkh@osg.samsung.com> Cc: Prarit Bhargava <prarit@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Richard Cochran <richardcochran@gmail.com> Signed-off-by: NJohn Stultz <john.stultz@linaro.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
- 02 4月, 2015 2 次提交
-
-
由 Shuah Khan 提交于
cpu and memory hotplug scripts use the same name. Change memory on-off-test.sh to mem-on-off-test.sh. Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com> Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Shuah Khan 提交于
cpu and memory hotplug scripts use the same name. Change cpu on-off-test.sh to cpu-on-off-test.sh. Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com> Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 01 4月, 2015 1 次提交
-
-
由 Zhang Zhen 提交于
This patch includes the mount test binaries into the .gitignore file listing in their respective directories. This will make sure that git ignores all of these test binaries when displaying status. Signed-off-by: NZhang Zhen <zhenzhang.zhang@huawei.com> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-