summaryrefslogtreecommitdiff
path: root/tools/testing
AgeCommit message (Collapse)Author
2015-03-19selftests: Fix build failures when invoked from kselftest targetShuah Khan
Several tests that rely on implicit build rules fail to build, when invoked from the main Makefile kselftest target. These failures are due to --no-builtin-rules and --no-builtin-variables options set in the inherited MAKEFLAGS. --no-builtin-rules eliminates the use of built-in implicit rules and --no-builtin-variables is for not defining built-in variables. These two options override the use of implicit rules resulting in build failures. In addition, inherited LDFLAGS result in build failures and there is no need to define LDFLAGS. Clear LDFLAGS and MAKEFLAG when make is invoked from the main Makefile kselftest target. Fixing this at selftests Makefile avoids changing the main Makefile and keeps this change self contained at selftests level. Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> Acked-by: Michael Ellerman <mpe@ellerman.id.au>
2015-03-11selftests/exec: Check if the syscall exists and bail if notMichael Ellerman
On systems which don't implement sys_execveat(), this test produces a lot of output. Add a check at the beginning to see if the syscall is present, and if not just note one error and return. When we run on a system that doesn't implement the syscall we will get ENOSYS back from the kernel, so change the logic that handles __NR_execveat not being defined to also use ENOSYS rather than -ENOSYS. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Acked-by: David Drysdale <drysdale@google.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2015-02-12Merge tag 'ktest-v3.20' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest Pull ktest updates from Steven Rostedt: "The following ktest updates were done: o Added timings to various parts of the test (build, install, boot, tests) and report them so that the users can keep track of changes. o Josh Poimboeuf fixed the console output to work better with virtual machine targets. o Various clean ups and fixes" * tag 'ktest-v3.20' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest: ktest: Place quotes around item variable ktest: Cleanup terminal on dodie() failure ktest: Print build,install,boot,test times at success and failure ktest: Enable user input to the console ktest: Give console process a dedicated tty ktest: Rename start_monitor_and_boot to start_monitor_and_install ktest: Show times for build, install, boot and test ktest: Restore tty settings after closing console ktest: Add timings for commands
2015-02-11Merge tag 'powerpc-3.20-1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux Pull powerpc updates from Michael Ellerman: - Update of all defconfigs - Addition of a bunch of config options to modernise our defconfigs - Some PS3 updates from Geoff - Optimised memcmp for 64 bit from Anton - Fix for kprobes that allows 'perf probe' to work from Naveen - Several cxl updates from Ian & Ryan - Expanded support for the '24x7' PMU from Cody & Sukadev - Freescale updates from Scott: "Highlights include 8xx optimizations, some more work on datapath device tree content, e300 machine check support, t1040 corenet error reporting, and various cleanups and fixes" * tag 'powerpc-3.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux: (102 commits) cxl: Add missing return statement after handling AFU errror cxl: Fail AFU initialisation if an invalid configuration record is found cxl: Export optional AFU configuration record in sysfs powerpc/mm: Warn on flushing tlb page in kernel context powerpc/powernv: Add OPAL soft-poweroff routine powerpc/perf/hv-24x7: Document sysfs event description entries powerpc/perf/hv-gpci: add the remaining gpci requests powerpc/perf/{hv-gpci, hv-common}: generate requests with counters annotated powerpc/perf/hv-24x7: parse catalog and populate sysfs with events perf: define EVENT_DEFINE_RANGE_FORMAT_LITE helper perf: add PMU_EVENT_ATTR_STRING() helper perf: provide sysfs_show for struct perf_pmu_events_attr powerpc/kernel: Avoid initializing device-tree pointer twice powerpc: Remove old compile time disabled syscall tracing code powerpc/kernel: Make syscall_exit a local label cxl: Fix device_node reference counting powerpc/mm: bail out early when flushing TLB page powerpc: defconfigs: add MTD_SPI_NOR (new dependency for M25P80) perf/powerpc: reset event hw state when adding it to the PMU powerpc/qe: Use strlcpy() ...
2015-02-03ktest: Place quotes around item variableSteven Rostedt (Red Hat)
Seems that some of the new console logic causes doprint to possibly get evaluated. When printing a commit message that contains parenthesis, it fails with a shell parsing error. This gets fixed when we add quotes around the $item variable, and prevent it from being evaluated by any shell commands. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2015-02-02ktest: Cleanup terminal on dodie() failureJosh Poimboeuf
If dodie() is called with the console open, restore the terminal's original settings before dying. Link: http://lkml.kernel.org/r/20150130025453.GB20952@treble.redhat.com Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2015-02-02ktest: Print build,install,boot,test times at success and failureSteven Rostedt (Red Hat)
Since both success and failure may shortcut and exit ktest, it is better to print the status times there too. Once times are printed, the values for the times are reset, so they will not print more than once. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2015-02-02ktest: Enable user input to the consoleJosh Poimboeuf
Allow the user to send input to the console by putting the terminal in cbreak mode (to allow reading stdin one character at a time) and copying all stdin data to the console's pty. Link: http://lkml.kernel.org/r/bb1bbe7d202c95a3ce7894cfffdd8c725875978e.1422473610.git.jpoimboe@redhat.com Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2015-02-02ktest: Give console process a dedicated ttyJosh Poimboeuf
Create a pseudoterminal (pty pair) to give the console a dedicated tty so it doesn't mess with ktest's terminal settings. Link: http://lkml.kernel.org/r/37b0127f9efad09ff4fc994334db998141e4f6ca.1422473610.git.jpoimboe@redhat.com Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2015-01-29ktest: Rename start_monitor_and_boot to start_monitor_and_installSteven Rostedt (Red Hat)
The function start_monitor_and_boot is a misnomer. It use to, but now it starts the monitor and installs. It does not boot. Rename it before I get confused by it again. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2015-01-29ktest: Show times for build, install, boot and testSteven Rostedt (Red Hat)
Seeing the times for how long a build, install, reboot and the test takes is helpful for analyzing the test process. Seeing how different changes affect the timings. Show the build, install, boot and test times when at the end of the test, or between each interval for tests that do those mulitple times (like bisect and patchcheck). Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2015-01-27ktest: Restore tty settings after closing consoleJosh Poimboeuf
When ktest runs the console program as a child process, the parent and child share the same tty for stdin and stderr. This is problematic when using a libvirt target. The "virsh console" program makes a lot of changes to the tty settings, making ktest's output hard to read (carriage returns don't work). After ktest exits, the terminal is unusable (CRs broken, stdin isn't echoed). I think the best way to fix this issue would be to create a pseudoterminal (pty pair) so the child process would have a dedicated tty, and then use pipes to connect the two ttys. I'm not sure if that's overkill, but it's far beyond my current Perl abilities. This patch is a much easier way to (partially) fix this issue. It saves the tty settings before opening the console and restores them after closing it. There are still a few places where ktest prints mangled output while the console is open, but the output is much more legible overall, and the terminal works just fine after ktest exits. Link: http://lkml.kernel.org/r/1bb89abc0025cf1d6da657c7ba58bbeb4381a515.1422382008.git.jpoimboe@redhat.com Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2015-01-27ktest: Add timings for commandsSteven Rostedt (Red Hat)
I find that I usually like to see how long a make or other command takes, and adding a start and end time and reporting how long each command runs (in seconds) is helpful. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2015-01-23selftests/powerpc: Add memcmp testcaseAnton Blanchard
Add a testcase for the new ppc64 memcmp. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2015-01-23selftests/powerpc: Add subpage protection self test.Paul Mackerras
Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> mpe: Fix compile errors and formatting. Add tempfile logic to Makefile. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2015-01-23selftests/powerpc: Make git ignore all binaries in powerpc test suiteAnshuman Khandual
This patch includes all of the powerpc 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: Anshuman Khandual <khandual@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2015-01-21Merge branch 'for-mingo' of ↵Ingo Molnar
git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu Pull RCU updates from Paul E. McKenney: - Documentation updates. - Miscellaneous fixes. - Preemptible-RCU fixes, including fixing an old bug in the interaction of RCU priority boosting and CPU hotplug. - SRCU updates. - RCU CPU stall-warning updates. - RCU torture-test updates. Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-01-15Merge branches 'doc.2015.01.07a', 'fixes.2015.01.15a', ↵Paul E. McKenney
'preempt.2015.01.06a', 'srcu.2015.01.06a', 'stall.2015.01.16a' and 'torture.2015.01.11a' into HEAD doc.2015.01.07a: Documentation updates. fixes.2015.01.15a: Miscellaneous fixes. preempt.2015.01.06a: Changes to handling of lists of preempted tasks. srcu.2015.01.06a: SRCU updates. stall.2015.01.16a: RCU CPU stall-warning updates and fixes. torture.2015.01.11a: RCU torture-test updates and fixes.
2015-01-10torture: Flag console.log file to prevent holdovers from earlier runsPaul E. McKenney
A system misconfiguration that prevents qemu from running at all (for example, a missing dynamically linked library) will keep the console.log file from the previous run. This can fool the developer into thinking that this failed run actually completed correctly. This commit therefore overwrites the console.log file just before launching qemu. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
2015-01-10torture: Add "-enable-kvm -soundhw pcspk" to qemu command linePaul E. McKenney
More recent qemu implementations really want "-enable-kvm", and the "-soundhw pcspk" makes the script a bit less dependent on odd audio libraries being installed. This commit therefore adds both to the default qemu command line. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
2015-01-10rcutorture: Handle different mpstat versionsPaul E. McKenney
The mpstat command recently added the %gnice column, which messes up the cpu2use.sh script's idle-CPU calculations. This commit therefore uses $NF instead of $12 to select the last (%idle) column. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
2015-01-10rcutorture: Make build-output parsing correctly flag RCU's warningsPaul E. McKenney
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
2015-01-10rcutorture: Issue warnings on close calls due to Reader Batch blowsPaul E. McKenney
Normal rcutorture checking overestimates grace periods somewhat due to the fact that there is a delay from a grace-period request until the start of the corresponding grace period and another delay from the end of that grace period to notification of the requestor. This means that rcutorture's detection of RCU bugs is less sensitive than it might be. It turns out that rcutorture also checks the underlying grace-period "completed" counter (displayed in Reader Batch output), which in theory allows rcutorture to do exact checks. In practice, memory misordering (by both compiler and CPU) can result in false positives. However, experience on x86 shows that these false positives are quite rare, occurring less than one time per 1,000 hours of testing. This commit therefore does the exact checking, giving a warning if any Reader Batch blows happen, and flagging an error if they happen more often than once every three hours in long tests. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
2015-01-08selftests/vm: fix link error for transhuge-stress testAndrey Skvortsov
add -lrt to fix undefined reference to `clock_gettime' error seen when the test is compiled using gcc 4.6.4. Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2015-01-06tools: testing: selftests: mq_perf_tests: Fix infinite loop on ARMdann frazier
We can't use a char type to check for a negative return value since char isn't guaranteed to be signed. Indeed, the char type tends to be unsigned on ARM. Signed-off-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2015-01-06selftests/exec: allow shell return code of 126David Drysdale
When the shell fails to invoke a script because its path name is too long (ENAMETOOLONG), most shells return 127 to indicate command not found. However, some systems report 126 (which POSIX suggests should indicate a non-executable file) for this case, so allow that too. Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: David Drysdale <drysdale@google.com> Tested-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2015-01-06rcutorture: Add checks for stall ending before dump startPaul E. McKenney
The current rcutorture scripting checks for actual stalls (via the "Call Trace:" check), but fails to spot the case where a stall ends just as it is being detected. This commit therefore adds a check for this case. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
2014-12-22selftests/exec: Use %zu to format size_tGeert Uytterhoeven
On 32-bit: execveat.c: In function 'check_execveat_pathmax': execveat.c:183: warning: format '%lu' expects type 'long unsigned int', but argument 3 has type 'size_t' execveat.c:187: warning: format '%lu' expects type 'long unsigned int', but argument 2 has type 'size_t' Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2014-12-18tools/testing/selftests/Makefile: alphasort the TARGETS listAndrew Morton
This list is supposed to be sorted, to reduce patch collisions. Cc: Shuah Khan <shuah.kh@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-12-17Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull user namespace related fixes from Eric Biederman: "As these are bug fixes almost all of thes changes are marked for backporting to stable. The first change (implicitly adding MNT_NODEV on remount) addresses a regression that was created when security issues with unprivileged remount were closed. I go on to update the remount test to make it easy to detect if this issue reoccurs. Then there are a handful of mount and umount related fixes. Then half of the changes deal with the a recently discovered design bug in the permission checks of gid_map. Unix since the beginning has allowed setting group permissions on files to less than the user and other permissions (aka ---rwx---rwx). As the unix permission checks stop as soon as a group matches, and setgroups allows setting groups that can not later be dropped, results in a situtation where it is possible to legitimately use a group to assign fewer privileges to a process. Which means dropping a group can increase a processes privileges. The fix I have adopted is that gid_map is now no longer writable without privilege unless the new file /proc/self/setgroups has been set to permanently disable setgroups. The bulk of user namespace using applications even the applications using applications using user namespaces without privilege remain unaffected by this change. Unfortunately this ix breaks a couple user space applications, that were relying on the problematic behavior (one of which was tools/selftests/mount/unprivileged-remount-test.c). To hopefully prevent needing a regression fix on top of my security fix I rounded folks who work with the container implementations mostly like to be affected and encouraged them to test the changes. > So far nothing broke on my libvirt-lxc test bed. :-) > Tested with openSUSE 13.2 and libvirt 1.2.9. > Tested-by: Richard Weinberger <richard@nod.at> > Tested on Fedora20 with libvirt 1.2.11, works fine. > Tested-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> > Ok, thanks - yes, unprivileged lxc is working fine with your kernels. > Just to be sure I was testing the right thing I also tested using > my unprivileged nsexec testcases, and they failed on setgroup/setgid > as now expected, and succeeded there without your patches. > Tested-by: Serge Hallyn <serge.hallyn@ubuntu.com> > I tested this with Sandstorm. It breaks as is and it works if I add > the setgroups thing. > Tested-by: Andy Lutomirski <luto@amacapital.net> # breaks things as designed :(" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: userns: Unbreak the unprivileged remount tests userns; Correct the comment in map_write userns: Allow setting gid_maps without privilege when setgroups is disabled userns: Add a knob to disable setgroups on a per user namespace basis userns: Rename id_map_mutex to userns_state_mutex userns: Only allow the creator of the userns unprivileged mappings userns: Check euid no fsuid when establishing an unprivileged uid mapping userns: Don't allow unprivileged creation of gid mappings userns: Don't allow setgroups until a gid mapping has been setablished userns: Document what the invariant required for safe unprivileged mappings. groups: Consolidate the setgroups permission checks mnt: Clear mnt_expire during pivot_root mnt: Carefully set CL_UNPRIVILEGED in clone_mnt mnt: Move the clear of MNT_LOCKED from copy_tree to it's callers. umount: Do not allow unmounting rootfs. umount: Disallow unprivileged mount force mnt: Update unprivileged remount test mnt: Implicitly add MNT_NODEV on remount when it was implicitly added by mount
2014-12-16Merge tag 'linux-kselftest-3.19-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest update from Shuah Khan: "kselftest updates for 3.19-rc1: - kcmp test include file cleanup - kcmp change to build on all architectures - A light weight kselftest framework that provides a set of interfaces for tests to use to report results. In addition, several tests are updated to use the framework. - A new runtime system size test that prints the amount of RAM that the currently running system is using" * tag 'linux-kselftest-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftest: size: Add size test for Linux kernel selftests/kcmp: Always try to build the test selftests/kcmp: Don't include kernel headers kcmp: Move kcmp.h into uapi selftests/timers: change test to use ksft framework selftests/kcmp: change test to use ksft framework selftests/ipc: change test to use ksft framework selftests/breakpoints: change test to use ksft framework selftests: add kselftest framework for uniform test reporting selftests/user: move test out of Makefile into a shell script selftests/net: move test out of Makefile into a shell script
2014-12-13Merge branch 'akpm' (second patch-bomb from Andrew)Linus Torvalds
Merge second patchbomb from Andrew Morton: - the rest of MM - misc fs fixes - add execveat() syscall - new ratelimit feature for fault-injection - decompressor updates - ipc/ updates - fallocate feature creep - fsnotify cleanups - a few other misc things * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (99 commits) cgroups: Documentation: fix trivial typos and wrong paragraph numberings parisc: percpu: update comments referring to __get_cpu_var percpu: update local_ops.txt to reflect this_cpu operations percpu: remove __get_cpu_var and __raw_get_cpu_var macros fsnotify: remove destroy_list from fsnotify_mark fsnotify: unify inode and mount marks handling fallocate: create FAN_MODIFY and IN_MODIFY events mm/cma: make kmemleak ignore CMA regions slub: fix cpuset check in get_any_partial slab: fix cpuset check in fallback_alloc shmdt: use i_size_read() instead of ->i_size ipc/shm.c: fix overly aggressive shmdt() when calls span multiple segments ipc/msg: increase MSGMNI, remove scaling ipc/sem.c: increase SEMMSL, SEMMNI, SEMOPM ipc/sem.c: change memory barrier in sem_lock() to smp_rmb() lib/decompress.c: consistency of compress formats for kernel image decompress_bunzip2: off by one in get_next_block() usr/Kconfig: make initrd compression algorithm selection not expert fault-inject: add ratelimit option ratelimit: add initialization macro ...
2014-12-13syscalls: add selftest for execveat(2)David Drysdale
Signed-off-by: David Drysdale <drysdale@google.com> Cc: Meredydd Luff <meredydd@senatehouse.org> Cc: Shuah Khan <shuah.kh@samsung.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Kees Cook <keescook@chromium.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Rich Felker <dalias@aerifal.cx> Cc: Christoph Hellwig <hch@infradead.org> 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>
2014-12-12Merge tag 'docs-for-linus' of git://git.lwn.net/linux-2.6Linus Torvalds
Pull documentation update from Jonathan Corbet: "Here's my set of accumulated documentation changes for 3.19. It includes a couple of additions to the coding style document, some fixes for minor build problems within the documentation tree, the relocation of the kselftest docs, and various tweaks and additions. A couple of changes reach outside of Documentation/; they only make trivial comment changes and I did my best to get the required acks. Complete with a shiny signed tag this time around" * tag 'docs-for-linus' of git://git.lwn.net/linux-2.6: kobject: grammar fix Input: xpad - update docs to reflect current state Documentation: Build mic/mpssd only for x86_64 cgroups: Documentation: fix wrong cgroupfs paths Documentation/email-clients.txt: add info about Claws Mail CodingStyle: add some more error handling guidelines kselftest: Move the docs to the Documentation dir Documentation: fix formatting to make 's' happy Documentation: power: Fix typo in Documentation/power Documentation: vm: Add 1GB large page support information ipv4: add kernel parameter tcpmhash_entries Documentation: Fix a typo in mailbox.txt treewide: Fix typo in Documentation/DocBook/device-drivers CodingStyle: Add a chapter on conditional compilation
2014-12-11userns: Unbreak the unprivileged remount testsEric W. Biederman
A security fix in caused the way the unprivileged remount tests were using user namespaces to break. Tweak the way user namespaces are being used so the test works again. Cc: stable@vger.kernel.org Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
2014-12-10Merge tag 'ktest-v3.19' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest Pull ktest changes from Steven Rostedt: "The following ktest updates were done: - Fix handling the make kernelrelease change - Fix make_min_config that was broken by new bisect_config changes - Allow tests to undefine default options (not just being able to override them) - Print name of test (if defined) to start of test output" * tag 'ktest-v3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest: ktest: Add back "tail -1" to kernelrelease make ktest: Add name to running title ktest: Allow tests to undefine default options ktest: Fix make_min_config to handle new assign_configs call ktest: Use make -s kernelrelease
2014-12-10Merge tag 'ftracetest-3.19' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull ftrace self-test updates from Steven Rostedt: "Updates for the ftrace self tests: - Added kprobes on ftrace testcase - Sort test cases - Add file to hold helper functions - Use logfile name supported by busybox's mktemp - Clear trace buffer after running kprobe test - Fix show descriptions when run on dash shell - Add --verbose option for showing echo output" * tag 'ftracetest-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: ftracetest: Add --verbose option for showing echo output ftracetest: Fix to show descriptions on dash ftracetest: Add basic event tracing test cases ftracetest: Clear trace buffer after running kprobe testcases ftracetest: Use logfile name supported by busybox's mktemp ftracetest: Add a couple of ftrace test cases ftracetest: Add functions file that holds helper functions ftracetest: Sort testcases ftracetest: Add kprobes on ftrace testcase
2014-12-04ftracetest: Add --verbose option for showing echo outputMasami Hiramatsu
Add --verbose/-v option for showing echo output in testcases. This is good for checking the progress of testcases which take a longer time to run. To implement this feature, all the testcase failures are captured in ftracetest and send signal to set SIG_RESULT=FAIL. Link: http://lkml.kernel.org/r/20141204194123.7376.22964.stgit@localhost.localdomain Suggested-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-12-04ftracetest: Fix to show descriptions on dashMasami Hiramatsu
The ftracetest doesn't show testcase's descriptions when it is executed on dash. This fixes that to show the descriptions on dash correctly by passing it via a variable instead of directly passing the grep command output. Link: http://lkml.kernel.org/r/20141204194116.7376.78940.stgit@localhost.localdomain Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-12-03selftest: size: Add size test for Linux kernelTim Bird
This test shows the amount of memory used by the system. Note that this is dependent on the user-space that is loaded when this program runs. Optimally, this program would be run as the init program itself. The program is optimized for size itself, to avoid conflating its own execution with that of the system software. The code is compiled statically, with no stdlibs. On my x86_64 system, this results in a statically linked binary of less than 5K. Signed-off-by: Tim Bird <tim.bird@sonymobile.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2014-12-02selftests/kcmp: Always try to build the testMichael Ellerman
Don't prevent the test building on non-x86. Just try and build it and let the chips fall where they may. Add support for CROSS_COMPILE while we're at it. Also we don't need a custom rule for building kcmp_test. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Reviewed-by: Christopher Covington <cov@codeaurora.org> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2014-12-02selftests/kcmp: Don't include kernel headersMichael Ellerman
The kcmp test mucks with the include path to bring in the kernel headers, and x86 headers too for reasons that are not clear. Now that kcmp.h is exported none of that should be necessary. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Acked-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2014-12-02mnt: Update unprivileged remount testEric W. Biederman
- MNT_NODEV should be irrelevant except when reading back mount flags, no longer specify MNT_NODEV on remount. - Test MNT_NODEV on devpts where it is meaningful even for unprivileged mounts. - Add a test to verify that remount of a prexisting mount with the same flags is allowed and does not change those flags. - Cleanup up the definitions of MS_REC, MS_RELATIME, MS_STRICTATIME that are used when the code is built in an environment without them. - Correct the test error messages when tests fail. There were not 5 tests that tested MS_RELATIME. Cc: stable@vger.kernel.org Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
2014-11-24kselftest: Move the docs to the Documentation dirTim Bird
Also, adjust the formatting a bit, and expand the section about using TARGETS= on the make command line. Signed-off-by: Tim Bird <tim.bird@sonymobile.com> Acked-by: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2014-11-23ktest: Add back "tail -1" to kernelrelease makeSteven Rostedt (Red Hat)
Commit 52d21580b362 "ktest: Use make -s kernelrelease" fixed commit 7ff525712acf "kbuild: fake the "Entering directory ..." message more simply" as that commit added output after the make kernelrelease. But there's still some build scripts that are used by ktest that has output before the make is executed, and requires that only the last line is printed. Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-11-21ktest: Add name to running titleSteven Rostedt (Red Hat)
Instead of just showing the test type of test in the start of the test, like this: RUNNING TEST 1 of 26 with option build defconfig Add the name (if it is defined) as well, like this: RUNNING TEST 1 of 26 (arm64 aarch64-linux) with option build defconfig Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-11-21ktest: Allow tests to undefine default optionsSteven Rostedt (Red Hat)
Tests can set options that override the default ones. But if a test tries to undefine a default option, it is simply ignored and the default option stays as is. For example, if you want to have a test that defines no MIN_CONFIG then the test should be able to do that with: TEST_START MIN_CONFIG = Which should make MIN_CONFIG not defined for that test. But the way the code currently works, undefined options in tests are dropped. This is because the NULL options are evaluated during the reading of the config file and since one can disable default options in the default section with this method, it is evaluated there (the option turns to a undef). But undef options in the test section mean to use the default option. To fix this, keep the empty string in the option during the reading of the config file, and then evaluate it when running the test. This will allow tests to null out default options. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-11-21ktest: Fix make_min_config to handle new assign_configs callSteven Rostedt (Red Hat)
Commit 6071c22e1755 "ktest: Rewrite the config-bisect to actually work" fixed the config-bisect to work nicely but in doing so it broke make_min_config by changing the way assign_configs works. The assign_configs function now adds the config to the hash even if it is disabled, but changes the hash value to be that of the line "# CONFIG_FOO is not set". Unfortunately, the make_min_config test only checks to see if the config is removed. It now needs to check if the config is in the hash and not set to be disabled. Cc: stable@vger.kernel.org # 3.17+ Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-11-21ktest: Use make -s kernelreleaseMichal Marek
The previous tail -1 broke with commit 7ff525712acf ("kbuild: fake the "Entering directory ..." message more simply") Link: http://lkml.kernel.org/r/20141022194408.GA20989@pobox.suse.cz Reported-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-11-20Merge branch 'rcu/next' of ↵Ingo Molnar
git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu Pull RCU updates from Paul E. McKenney: - Streamline RCU's use of per-CPU variables, shifting from "cpu" arguments to functions to "this_"-style per-CPU variable accessors. - Signal-handling RCU updates. - Real-time updates. - Torture-test updates. - Miscellaneous fixes. - Documentation updates. Signed-off-by: Ingo Molnar <mingo@kernel.org>