- 01 7月, 2017 9 次提交
-
-
由 Paul Elder 提交于
Make the ksft_* output functions variadic to allow string formatting directly in these functions. Signed-off-by: NPaul Elder <paul.elder@pitt.edu> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Andy Lutomirski 提交于
test_execve does rather odd mount manipulations to safely create temporary setuid and setgid executables that aren't visible to the rest of the system. Those executables end up in the test's cwd, but that cwd is MNT_DETACHed. The core namespace code considers MNT_DETACHed trees to belong to no mount namespace at all and, in general, MNT_DETACHed trees are only barely function. This interacted with commit 380cf5ba ("fs: Treat foreign mounts as nosuid") to cause all MNT_DETACHed trees to act as though they're nosuid, breaking the test. Fix it by just not detaching the tree. It's still in a private mount namespace and is therefore still invisible to the rest of the system (except via /proc, and the same nosuid logic will protect all other programs on the system from believing in test_execve's setuid bits). While we're at it, fix some blatant whitespace problems. Reported-by: NNaresh Kamboju <naresh.kamboju@linaro.org> Fixes: 380cf5ba ("fs: Treat foreign mounts as nosuid") Cc: stable@vger.kernel.org Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Kees Cook <keescook@chromium.org> Cc: Shuah Khan <shuahkh@osg.samsung.com> Cc: Greg KH <greg@kroah.com> Cc: linux-kselftest@vger.kernel.org Signed-off-by: NAndy Lutomirski <luto@kernel.org> Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Shuah Khan 提交于
Add .gitignore for generated files. Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Po-Hsu Lin 提交于
In the memory offline test, the $ration was used with RANDOM as the possibility to get it offlined, correct it to become the portion of available removable memory blocks. Also ask the tool to try to offline the next available memory block if the attempt is unsuccessful. It will only fail if all removable memory blocks are busy. A nice example: $ sudo ./test.sh Test scope: 10% hotplug memory online all hot-pluggable memory in offline state: SKIPPED - no hot-pluggable memory in offline state offline 10% hot-pluggable memory in online state trying to offline 3 out of 28 memory block(s): online->offline memory1 online->offline memory10 ./test.sh: line 74: echo: write error: Resource temporarily unavailable offline_memory_expect_success 10: unexpected fail online->offline memory100 online->offline memory101 online all hot-pluggable memory in offline state: offline->online memory1 offline->online memory100 offline->online memory101 skip extra tests: debugfs is not mounted $ echo $? 0 Signed-off-by: NPo-Hsu Lin <po-hsu.lin@canonical.com> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Po-Hsu Lin 提交于
There is no prompt for testing memory notifier error injection, added with the same echo format of other tests above. Signed-off-by: NPo-Hsu Lin <po-hsu.lin@canonical.com> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Po-Hsu Lin 提交于
Check the precentage range for -r flag in memory-hotplug test. Signed-off-by: NPo-Hsu Lin <po-hsu.lin@canonical.com> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Po-Hsu Lin 提交于
Check for hot-pluggable memory availability in prerequisite() of the memory-hotplug test. Signed-off-by: NPo-Hsu Lin <po-hsu.lin@canonical.com> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Po-Hsu Lin 提交于
Typo fixed for hotpluggable_offline_memory() in memory-hotplug test. Signed-off-by: NPo-Hsu Lin <po-hsu.lin@canonical.com> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Masami Hiramatsu 提交于
Use md5sum so that it takes less time of checking trace logs update. Since busybox tail/cat takes too long time to read the trace log, this uses md5sum to check whether trace log is updated or not. Signed-off-by: NMasami Hiramatsu <mhiramat@kernel.org> Acked-by: NSteven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
- 28 6月, 2017 1 次提交
-
-
由 Orson Zhai 提交于
Sysctl test will fail in some items if the value of /proc/sys/kernel /sysctrl_writes_strict is 0 as the default value in kernel older than v4.5. Make this test more robus and compatible with older kernel by checking and update writes_strict value and restore it when test is done. Signed-off-by: NOrson Zhai <orson.zhai@linaro.org> Reviewed-by: NSumit Semwal <sumit.semwal@linaro.org> Tested-by: NSumit Semwal <sumit.semwal@linaro.org> Reviewed-by: NKees Cook <keescook@chromium.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
- 27 6月, 2017 1 次提交
-
-
由 Mauro Carvalho Chehab 提交于
Do some minor adjustments after ReST conversion: - On most documents, we use prepend a "$ " before command line arguments; - Prefer to use :: on the preceding line; - Split a multi-paragraph description as such. Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com> Acked-by: NJonathan Corbet <corbet@lwn.net> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
- 24 6月, 2017 3 次提交
-
-
由 SeongJae Park 提交于
After commit a8ba798b ("selftests: enable O and KBUILD_OUTPUT"), net selftest build fails because it points output file without $(OUTPUT) yet. This commit fixes the error. Signed-off-by: NSeongJae Park <sj38.park@gmail.com> Fixes: a8ba798b ("selftests: enable O and KBUILD_OUTPUT") Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 SeongJae Park 提交于
Build of aperf fails as below: ``` gcc -Wall -D_GNU_SOURCE -lm aperf.c -o /tools/testing/selftests/intel_pstate/aperf /tmp/ccKf3GF6.o: In function `main': aperf.c:(.text+0x278): undefined reference to `sqrt' collect2: error: ld returned 1 exit status ``` The faulure occurs because -lm was defined as LDFLAGS and implicit rule of make places LDFLAGS before source file. This commit fixes the problem by using LDLIBS instead of LDFLAGS. Signed-off-by: NSeongJae Park <sj38.park@gmail.com> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 SeongJae Park 提交于
Selftest for memfd shows build error as below: ``` gcc -D_FILE_OFFSET_BITS=64 -I../../../../include/uapi/ -I../../../../include/ -I../../../../usr/include/ fuse_mnt.c -o /home/sjpark/linux/tools/testing/selftests/memfd/fuse_mnt /tmp/cc6NHdwJ.o: In function `main': fuse_mnt.c:(.text+0x249): undefined reference to `fuse_main_real' collect2: error: ld returned 1 exit status ``` The build fails because output file is specified without $(OUTPUT) and LDFLAGS is used though Makefile implicit rule is used. This commit fixes the error by specifying output file path with $(OUTPUT) and using LDLIBS instead of LDFLAGS. Signed-off-by: NSeongJae Park <sj38.park@gmail.com> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
- 23 6月, 2017 1 次提交
-
-
由 Sumit Semwal 提交于
With older kernels, printf.sh and bitmap.sh fail because they can't find the respective test modules they are looking for. Use modprobe dry run to check for missing test_XXX module. Error out with the same error code as prime_numbers.sh. Signed-off-by: NSumit Semwal <sumit.semwal@linaro.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
- 16 6月, 2017 3 次提交
-
-
由 Alice Ferrazzi 提交于
Make membarrier test names more informative. Signed-off-by: NAlice Ferrazzi <alice.ferrazzi@gmail.com> Signed-off-by: NPaul Elder <paul.elder@pitt.edu> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Paul Elder 提交于
Make the three tests that did use the old ksft_ext_skip() (breakpoints/breakpoint_test_arm64, breakpoints/step_after_suspend_test, and membarrier_test) use the new one, with an output for the reason for skipping all the tests. Signed-off-by: NPaul Elder <paul.elder@pitt.edu> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Paul Elder 提交于
Make ksft_exit_skip() input an optional message string as the reason for skipping all the tests and outputs it prior to exiting. Signed-off-by: NPaul Elder <paul.elder@pitt.edu> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
- 15 6月, 2017 1 次提交
-
-
由 Tim Bird 提交于
1. Add the TAP13 header 2. remove variable data from the test description line 3. move the plan count to the end of the file, for consistency with other kselftests 4. convert memory data from diagnostic (comment) format, to a YAML block Signed-off-by: NTim Bird <tim.bird@sony.com> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
- 14 6月, 2017 4 次提交
-
-
由 Paul Elder 提交于
Make the step_after_suspend test output in the TAP13 format by using the TAP13 output functions defined in kselftest.h Signed-off-by: NPaul Elder <paul.elder@pitt.edu> Signed-off-by: NAlice Ferrazzi <alice.ferrazzi@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Paul Elder 提交于
Make the breakpoints test output in the TAP13 format by using the TAP13 output functions defined in kselftest.h Signed-off-by: NPaul Elder <paul.elder@pitt.edu> Signed-off-by: NAlice Ferrazzi <alice.ferrazzi@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Paul Elder 提交于
Make the membarrier test output in the TAP13 format by using the TAP13 output functions defined in kselftest.h Signed-off-by: NPaul Elder <paul.elder@pitt.edu> Signed-off-by: NAlice Ferrazzi <alice.ferrazzi@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Paul Elder 提交于
Add TAP13 conformat output functions to kselftest.h. Also add exit functions that output TAP13 exiting text, as well as functions to keep track of testing progress. Signed-off-by: NPaul Elder <paul.elder@pitt.edu> Signed-off-by: NAlice Ferrazzi <alice.ferrazzi@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
- 13 6月, 2017 3 次提交
-
-
由 Mickaël Salaün 提交于
Do not confuse the compiler with a semicolon preceding a block. Replace the semicolon with an empty block to avoid a warning: gcc -Wl,-no-as-needed -Wall -lpthread seccomp_bpf.c -o /.../linux/tools/testing/selftests/seccomp/seccomp_bpf In file included from seccomp_bpf.c:40:0: seccomp_bpf.c: In function ‘change_syscall’: ../kselftest_harness.h:558:2: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] for (; _metadata->trigger; _metadata->trigger = __bail(_assert)) ^ ../kselftest_harness.h:574:14: note: in expansion of macro ‘OPTIONAL_HANDLER’ } while (0); OPTIONAL_HANDLER(_assert) ^~~~~~~~~~~~~~~~ ../kselftest_harness.h:440:2: note: in expansion of macro ‘__EXPECT’ __EXPECT(expected, seen, ==, 0) ^~~~~~~~ seccomp_bpf.c:1313:2: note: in expansion of macro ‘EXPECT_EQ’ EXPECT_EQ(0, ret); ^~~~~~~~~ seccomp_bpf.c:1317:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘for’ { ^ Signed-off-by: NMickaël Salaün <mic@digikod.net> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Kees Cook <keescook@chromium.org> Cc: Shuah Khan <shuahkh@osg.samsung.com> Cc: Will Drewry <wad@chromium.org> Acked-by: NKees Cook <keescook@chromium.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Shuah Khan 提交于
Add missing trailing slash to tools/testing/selftests to cover all files and directories below. Add kselftest documentation files. Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Greg Kroah-Hartman 提交于
There is a few more subdirectories needed in the git tree path for the linux-kselftest url in order to be able to properly clone it. Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
- 08 6月, 2017 14 次提交
-
-
由 Masami Hiramatsu 提交于
Return unsupported if the kernel is too old to support instance independent ftrace filter for some testcases. Signed-off-by: NMasami Hiramatsu <mhiramat@kernel.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Masami Hiramatsu 提交于
Use top-level available_filter_function if the test case is running under an instance. Signed-off-by: NMasami Hiramatsu <mhiramat@kernel.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Masami Hiramatsu 提交于
Add instance test indication in test log too. Current ftracetest shows instance test indication on the list of test, but not in the log for each test. This adds instance test indication on the top of each log, like below; execute (instance) : /ftrace/test.d/ftrace/func_set_ftrace_file.tc Signed-off-by: NMasami Hiramatsu <mhiramat@kernel.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Masami Hiramatsu 提交于
Since older kernel didn't support separated instance of set_ftrace_filter, if the test case set the filter in an instance, it will propagate to top-level instance. This means that the filter setting remains even if we remove the instance, and will cause other tests failure. To avoid this issue, reset the ftrace filter if we detect the propagation. Signed-off-by: NMasami Hiramatsu <mhiramat@kernel.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Masami Hiramatsu 提交于
Check the kretprobe maxactive is supported by kprobe_events interface. To ensure the kernel feature, this changes ftrace README to describe it. Signed-off-by: NMasami Hiramatsu <mhiramat@kernel.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Masami Hiramatsu 提交于
Current event/toplevel-enable.tc checking the trace buffer by dumping all events while recording events. However, this makes system very busy. To reduce this overhead comes from reading trace buffer and recording trace buffer, use head instead of cat and stop tracing while reading. Signed-off-by: NMasami Hiramatsu <mhiramat@kernel.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Masami Hiramatsu 提交于
Skip a part of ftrace filter test related to full-glob matching if we are sure that the testing kernel is so old that it does not support full-glob-matching yet. Signed-off-by: NMasami Hiramatsu <mhiramat@kernel.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Mickaël Salaün 提交于
Rebuild the seccomp tests when kselftest_harness.h is updated. Signed-off-by: NMickaël Salaün <mic@digikod.net> Acked-by: NKees Cook <keescook@chromium.org> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Shuah Khan <shuah@kernel.org> Cc: Will Drewry <wad@chromium.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Mickaël Salaün 提交于
Add ReST metadata to kselftest_harness.h to be able to include the comments in the Sphinx documentation. Signed-off-by: NMickaël Salaün <mic@digikod.net> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Kees Cook <keescook@chromium.org> Cc: Shuah Khan <shuah@kernel.org> Cc: Will Drewry <wad@chromium.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Mickaël Salaün 提交于
Remove the TEST_API() wrapper to expose the underlying macro arguments to the documentation tools. Signed-off-by: NMickaël Salaün <mic@digikod.net> Acked-by: NKees Cook <keescook@chromium.org> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Kees Cook <keescook@chromium.org> Cc: Shuah Khan <shuah@kernel.org> Cc: Will Drewry <wad@chromium.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Mickaël Salaün 提交于
Include and convert kselftest to the Sphinx format. Signed-off-by: NMickaël Salaün <mic@digikod.net> Acked-by: NKees Cook <keescook@chromium.org> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Mickaël Salaün 提交于
Move kselftest.txt to dev-tools/kselftest.rst . Signed-off-by: NMickaël Salaün <mic@digikod.net> Acked-by: NKees Cook <keescook@chromium.org> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Mickaël Salaün 提交于
Keep the content consistent with the new name. Signed-off-by: NMickaël Salaün <mic@digikod.net> Acked-by: NKees Cook <keescook@chromium.org> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Shuah Khan <shuah@kernel.org> Cc: Will Drewry <wad@chromium.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Mickaël Salaün 提交于
The seccomp/test_harness.h file contains useful helpers to build tests. Moving it to the selftest directory should benefit to other test components. Keep seccomp maintainers for this file. Signed-off-by: NMickaël Salaün <mic@digikod.net> Acked-by: NKees Cook <keescook@chromium.org> Acked-by: NWill Drewry <wad@chromium.org> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Shuah Khan <shuah@kernel.org> Link: https://lkml.kernel.org/r/CAGXu5j+8CVz8vL51DRYXqOY=xc3zuKFf=PTENe88XYHzFYidUQ@mail.gmail.comSigned-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-