1. 20 7月, 2012 2 次提交
  2. 01 6月, 2012 3 次提交
    • C
      syscalls, x86: add __NR_kcmp syscall · d97b46a6
      Cyrill Gorcunov 提交于
      While doing the checkpoint-restore in the user space one need to determine
      whether various kernel objects (like mm_struct-s of file_struct-s) are
      shared between tasks and restore this state.
      
      The 2nd step can be solved by using appropriate CLONE_ flags and the
      unshare syscall, while there's currently no ways for solving the 1st one.
      
      One of the ways for checking whether two tasks share e.g.  mm_struct is to
      provide some mm_struct ID of a task to its proc file, but showing such
      info considered to be not that good for security reasons.
      
      Thus after some debates we end up in conclusion that using that named
      'comparison' syscall might be the best candidate.  So here is it --
      __NR_kcmp.
      
      It takes up to 5 arguments - the pids of the two tasks (which
      characteristics should be compared), the comparison type and (in case of
      comparison of files) two file descriptors.
      
      Lookups for pids are done in the caller's PID namespace only.
      
      At moment only x86 is supported and tested.
      
      [akpm@linux-foundation.org: fix up selftests, warnings]
      [akpm@linux-foundation.org: include errno.h]
      [akpm@linux-foundation.org: tweak comment text]
      Signed-off-by: NCyrill Gorcunov <gorcunov@openvz.org>
      Acked-by: N"Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Pavel Emelyanov <xemul@parallels.com>
      Cc: Andrey Vagin <avagin@openvz.org>
      Cc: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Glauber Costa <glommer@parallels.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Matt Helsley <matthltc@us.ibm.com>
      Cc: Pekka Enberg <penberg@kernel.org>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: Vasiliy Kulikov <segoon@openwall.com>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: Valdis.Kletnieks@vt.edu
      Cc: Michal Marek <mmarek@suse.cz>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d97b46a6
    • D
      tools/selftests: add mq_perf_tests · 7820b071
      Doug Ledford 提交于
      Add the mq_perf_tests tool I used when creating my mq performance patch.
      Also add a local .gitignore to keep the binaries from showing up in git
      status output.
      
      [akpm@linux-foundation.org: checkpatch fixes]
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Manfred Spraul <manfred@colorfullife.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Acked-by: NKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7820b071
    • D
      selftests: add mq_open_tests · 50069a58
      Doug Ledford 提交于
      Add a directory to house POSIX message queue subsystem specific tests.
      Add first test which checks the operation of mq_open() under various
      corner conditions.
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: Doug Ledford <dledford@redhat.com>
      Cc: Joe Korty <joe.korty@ccur.com>
      Cc: Amerigo Wang <amwang@redhat.com>
      Cc: Serge E. Hallyn <serue@us.ibm.com>
      Cc: Jiri Slaby <jslaby@suse.cz>
      Cc: Manfred Spraul <manfred@colorfullife.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      50069a58
  3. 23 5月, 2012 1 次提交
  4. 22 5月, 2012 7 次提交
  5. 19 5月, 2012 1 次提交
    • S
      ktest: Fix kernelrevision with POST_BUILD · 683a3e64
      Steven Rostedt 提交于
      The PRE_BUILD and POST_BUILD options of ktest are added to allow the
      user to add temporary patch to the system and remove it on builds. This
      is sometimes use to take a change from another git branch and add it to
      a series without the fix so that this series can be tested, when an
      unrelated bug exists in the series.
      
      The problem comes when a tagged commit is being used. For example, if
      v3.2 is being tested, and we add a patch to it, the kernelrelease for
      that commit will be 3.2.0+, but without the patch the version will be
      3.2.0. This can cause problems when the kernelrelease is determined for
      creating the /lib/modules directory. The kernel booting has the '+' but
      the module directory will not, and the modules will be missing for that
      boot, and may not allow the kernel to succeed.
      
      The fix is to put the creation of the kernelrelease in the POST_BUILD
      logic, before it applies the POST_BUILD operation. The POST_BUILD is
      where the patch may be removed, removing the '+' from the kernelrelease.
      
      The calculation of the kernelrelease will also stay in its current
      location but will be ignored if it was already calculated previously.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      683a3e64
  6. 01 5月, 2012 2 次提交
  7. 29 3月, 2012 3 次提交
  8. 21 3月, 2012 5 次提交
    • S
      ktest: Allow a test to override REBOOT_ON_SUCCESS · 648a182c
      Steven Rostedt 提交于
      The option REBOOT_ON_SUCCESS is global, and will have the machine reboot
      the the box if all tests are successful. But a test may not want the
      machine to reboot, and perhaps have the kernel it loaded be used to
      install the next kernel. Or the last test may set up a kernel that the
      user may want to look at. In this case, the user could have the global
      option REBOOT_ON_SUCCESS be true, but if a test is defined to run at the
      end, that test can override the global option and keep the kernel it
      installed for the user to log in with.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      648a182c
    • S
      ktest: Fix SWITCH_TO_GOOD to also reboot the machine · 769df641
      Steven Rostedt 提交于
      When the option SWITCH_TO_GOOD is set, it will be called when the system
      needs to reboot to the good server. But currently, this keeps the reboot
      from happening. The SWITCH_TO_GOOD is just a way to get to a new kernel,
      it may not mean to not reboot.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      769df641
    • S
      ktest: Add SCP_TO_TARGET_INSTALL option · 02ad2617
      Steven Rostedt 提交于
      Currently the option used to scp both the modules to the target as well
      as the kernel image are the same (SCP_TO_TARGET). But some embedded
      boards may require them to be different. The modules may need to be put
      directly on the board, but the kernel image may need to go to a
      tftpserver.
      
      Add the option SCP_TO_TARGET_INSTALL that will allow the user to change
      the config so that they may have the modules and image got to different
      machines.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      02ad2617
    • S
      ktest: Add warning when bugs are ignored · 6ca996cc
      Steven Rostedt 提交于
      When IGNORE_ERRORS is set, ktest will not fail a test if a backtrace
      is detected. But this can be an issue if the user added it in the
      config but forgot to remove it. They may be left wondering why their
      test did not fail, or even worse, why their bisect gave the wrong
      commit.
      
      Add a warning in the output if IGNORE_WARNINGS is set, and ktest detects
      a kernel error.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      6ca996cc
    • S
      ktest: Add INSTALL_MOD_STRIP=1 when installing modules · 627977d8
      Steven Rostedt 提交于
      To keep the modules from bloating the target's filesystem
      strip them during the install.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      627977d8
  9. 28 2月, 2012 1 次提交
    • S
      ktest: Fix make_min_config test when build fails · bf1c95ab
      Steven Rostedt 提交于
      The make_min_config does not take into account when the build fails,
      resulting in a invalid MIN_CONFIG .config file. When the build fails,
      it is ignored and the boot test is executed, using the previous built
      kernel. The configs that should be tested are not tested and they may
      be added or removed depending on the result of the last kernel that
      succeeded to be built.
      
      If the build fails, mark the current config as a failure and the
      configs that were disabled may still be needed.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      bf1c95ab
  10. 21 2月, 2012 1 次提交
  11. 13 1月, 2012 2 次提交
  12. 05 1月, 2012 2 次提交
    • S
      ktest: Add INGORE_ERRORS to ignore warnings in boot up · be405f95
      Steven Rostedt 提交于
      When testing a kernel that has warnings, ktest.pl will fail the test
      when it sees the warning. If you need to test the the kernel and want
      to ignore the errors that are produced, the option IGNORE_ERRORS has
      been added. When IGNORE_ERRORS is set to something other than 0, it will
      ignore call traces due to WARN_ON().
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      be405f95
    • S
      ktest: Still do reboot even for REBOOT_TYPE = script · 96f6a0df
      Steven Rostedt 提交于
      The REBOOT_TYPE may be either grub or script, if it is script
      it is expected that a REBOOT_SCRIPT is defined.
      
      With the SWITCH_TO_TEST which is the complement of SWITCH_TO_GOOD,
      which does basically the same thing as REBOOT_SCRIPT and but for
      both grub and script, the REBOOT_SCRIPT does not need to be mandatory
      anymore.
      
      Do not require the REBOOT_SCRIPT and always run the reboot code
      for both grub and script.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      96f6a0df
  13. 02 1月, 2012 1 次提交
  14. 23 12月, 2011 9 次提交
    • S
      ktest: Fix compare script to test if options are not documented · c2857cb4
      Steven Rostedt 提交于
      The compare script compare-ktest-sample.pl checks for options
      that are defined in ktest.pl and not documented in samples.conf,
      as well as samples in samples.conf that are not used in ktest.pl.
      
      With the switch to the hash format to initialize the ktest variables
      the compare script needs to be updated to handle the change.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      c2857cb4
    • S
      ktest: Detect typos in option names · 9cc9e091
      Steven Rostedt 提交于
      It becomes quite annoying when you go to run a test and then
      realize that you typed an option name wrong, and the test starts
      doing the default action and not what you expected it to do.
      
      It is even more annoying when you wake up the next day after
      running the test over night when you discover this.
      
      By testing if all options specified in a config file are
      used by either ktest or were used in one of the option's values
      we can see if there are any dangling options that were not used.
      In such a case, show the user the options that were not used
      and ask them if they want to continue or not.
      
      The option IGNORE_UNUSED was also added to allow the user to
      override this feature.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      9cc9e091
    • S
      ktest: Have all values be set by defaults · b5f4aea6
      Steven Rostedt 提交于
      Currently the patchcheck, bisect, and config_bisect variables
      are only able to be set per test. You can not set a default
      value for them.
      
      By letting default values be set, it makes some config files
      a bit easier, and also makes it easier to find typos in the
      option names.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      b5f4aea6
    • S
      ktest: Change initialization of defaults hash to perl format · 4f43e0dc
      Steven Rostedt 提交于
      Initializing each default value by specifying the hash name is
      ugly. This is one of the rare cases that the "perl way" is actually
      much cleaner and easier to read.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      4f43e0dc
    • S
      ktest: Add options SWITCH_TO_GOOD and SWITCH_TO_TEST · bc7c5803
      Steven Rostedt 提交于
      For machines that do no use grub, it may be needed to update an
      external image (tftp) before doing a reboot into either the
      test image or the known good image.
      
      The option SWITCH_TO_GOOD is added, where if it is defined, the
      command that is specified as its value will be executed before
      doing a reboot into a known good image.
      
      The option SWITCH_TO_TEST is added, where if it is defined, the
      command that is specified as its value will be executed before
      doing a reboot into the test image.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      bc7c5803
    • S
      ktest: Allow overriding bisect test results · c5dacb88
      Steven Rostedt 提交于
      When running the ktest git bisect test, if the BISECT_TYPE is "test",
      the bisect is determined to be good or bad based off of the error
      code of the test that is run. Currently, if the test returns 0,
      it is considered a pass (good), a non-zero is considered a fail (bad).
      
      But it has been requested to add more options, and also change
      the meanings of the error codes of the test. For example, one may
      want the test to detect if the commit is not good or bad,
      (maybe the bisect came to a point where the code in question
      does not exist). The test could report an error code that should tell
      ktest to skip the commit.
      
      Also, a test could detect that something is horribly wrong and the
      biscet should just be aborted.
      
      The new options:
      
       BISECT_RET_GOOD
       BISECT_RET_BAD
       BISECT_RET_SKIP
       BISECT_RET_ABORT
       BISECT_RET_DEFAULT
      
      have been added. The first 4 take an integer value that will
      represent if the test should be considered a pass, fail, neither
      good nor bad, or abort respectively.
      
      The BISECT_RET_DEFAULT will bo whatever is not defined by the
      above codes. If only BISECT_RET_DEFAULT is defined, then all tests
      will do the default.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      c5dacb88
    • S
      ktest: Evaluate options before processing them · cad96669
      Steven Rostedt 提交于
      All options can take variables "${var}". Before doing any processing
      or decision making on the content of an option, evaluate it incase
      there are variables that may change the outcome.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      cad96669
    • S
      ktest: Evaluate $KERNEL_VERSION in both install and post install · 2b29b2f8
      Steven Rostedt 提交于
      The install process may also need to know what the kernel version
      is, to add it to the name. Evaluate it for both install and
      post install.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      2b29b2f8
    • S
      ktest: Only ask options needed for install · 165708b2
      Steven Rostedt 提交于
      If all the tests are only for build or install, do not ask
      for options not needed to do the install, if the options do
      not exist.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      165708b2