1. 22 11月, 2014 1 次提交
  2. 08 10月, 2014 2 次提交
  3. 20 9月, 2014 2 次提交
  4. 24 4月, 2014 6 次提交
  5. 19 1月, 2014 1 次提交
    • S
      ktest: Add BISECT_TRIES to bisect test · 961d9cac
      Steven Rostedt (Red Hat) 提交于
      For those cases that it takes several tries to hit a bug, it would be
      useful for ktest.pl to try a test multiple times before it considers
      the test as a pass. To accomplish this, BISECT_TRIES ktest config
      option has been added. It is default to one, as most of the time a
      bisect only needs to try a test once. But the user can now up this
      to make ktest run a given test multiple times. The first failure
      that is detected will set a bisect bad. It only repeats on success.
      
      Note, as with all race bugs, there's no guarantee that if it succeeds,
      it is really a good bisect. But it helps in case the bug is somewhat
      reliable.
      
      You can set BISECT_TRIES to zero, and all tests will be considered
      good, unless you also set BISECT_MANUAL.
      Suggested-by: N"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      961d9cac
  6. 12 12月, 2013 2 次提交
    • S
      ktest: Add eval '=~' command to modify variables in config file · c75d22d9
      Steven Rostedt (Red Hat) 提交于
      With the added variable ${KERNEL_VERSION}, it is useful to be
      able to use parts of it for other variables.
      
      For example, if you want to create a warnings file for each major
      kernel version to test sub versions against you can create
      your warnings file with like this:
      
        WARNINGS_FILE = warnings-file-${KERNEL_VERSION}
      
      But this may add 3.8.12 or something, and we want all 3.8.* to
      use the same file, and 3.10.* to use another file, and so on.
      With the eval command we can, by adding:
      
        WARNINGS_FILE =~ s/(-file-\d+\.\d+).*/$1/
      
      Which will chop off the extra characters after the 3.8.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      c75d22d9
    • S
      ktest: Add special variable ${KERNEL_VERSION} · 8e80bf05
      Steven Rostedt (Red Hat) 提交于
      Add a special variable that can be used in other variables called
      ${KERNEL_VERSION}. This will embed the current kernel version into
      the variable. For example:
      
      WARNINGS_FILE = ${OUTPUT_DIR}/warnings-${KERNEL_VERSION}
      
      If the current version is v3.8 then the WARNINGS_FILE will become
      
        ${OUTPUT_DIR}/warnings-v3.8
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      8e80bf05
  7. 04 12月, 2013 1 次提交
  8. 28 5月, 2013 1 次提交
  9. 25 4月, 2013 1 次提交
  10. 08 3月, 2013 1 次提交
    • S
      ktest: Allow tests to use different GRUB_MENUs · 752d9665
      Steven Rostedt (Red Hat) 提交于
      To save connecting and searching for a given grub menu for each test,
      ktest.pl will cache the grub number it found. The problem is that
      different tests might use a different grub menu, but ktest.pl will
      ignore it.
      
      Instead, have ktest.pl check if the grub menu it used to cache the
      content is the same as when it grabbed the menu. If not, grab it again,
      otherwise just return the cached value.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      752d9665
  11. 18 2月, 2013 1 次提交
  12. 05 2月, 2013 2 次提交
    • S
      ktest: Ignore warnings during reboot · 4c0b67a2
      Steven Rostedt (Red Hat) 提交于
      The reboot just wants to get to the next kernel. But if a warning (Call
      Trace) appears, the monitor will report an error, and the reboot will
      think something went wrong and power cycle the box, even though we
      successfully made it to the next kernel.
      
      Ignore warnings during the reboot until we get to the next kernel. It
      will still timeout if we never get to the next kernel and then a power
      cycle will happen. That's what we want it to do.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      4c0b67a2
    • S
      ktest: Search for linux banner for successful reboot · d6845536
      Steven Rostedt (Red Hat) 提交于
      Sometimes when a test kernel passed fine, but on reboot it crashed,
      ktest could get stuck and not proceed. This would be frustrating if you
      let a test run overnight to find out the next morning that it was stuck
      on the first test.
      
      To fix this, I made reboot check for the REBOOT_SUCCESS_LINE. If the
      line was not detected, then it would power cycle the box.
      
      What it didn't cover was if the REBOOT_SUCCESS_LINE wasn't defined or if
      a 'good' kernel did not display the line. Instead have it search for the
      Linux banner "Linux version". The reboot just needs to get to the start
      of the next kernel, it does not need to test if the next kernel makes it
      to a boot prompt.
      
      After we find the next kernel has booted, then we just wait for either
      the REBOOT_SUCCESS_LINE to appear or the timeout.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      d6845536
  13. 31 1月, 2013 4 次提交
    • S
      ktest: Add make_warnings_file and process full warnings · 4283b169
      Steven Rostedt (Red Hat) 提交于
      Although the patchcheck test checks for warnings in the files that were
      changed, this check does not catch warnings that were caused by header
      file changes and the warnings appear in C files not touched by the
      commit.
      
      Add a new option called WARNINGS_FILE. If this option is set, then the
      file it points to is read before bulid, and the file should contain a
      list of known warnings. If a warning appears in the build, this file is
      checked, and if the warning does not exist in this file, then it fails
      the build showing the new warning.
      
      If the WARNINGS_FILE points to a file that does not exist, this will
      cause any warning in the build to fail.
      
      A new test is also added called "make_warnings_file". This test will
      create do a build and record any warnings it finds into the
      WARNINGS_FILE. This test is something that can be run before other tests
      to build a warnings file of "known warnings", ie, warnings that were
      there before your changes.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      4283b169
    • S
      ktest: Allow a test option to use its default option · 04262be3
      Steven Rostedt (Red Hat) 提交于
      Options are allowed to use other options, for example:
      
        LOG_FILE = ${OUTPUT_DIR}/${MACHINE}.log
      
      where the option LOG_FILE used the options OUTPUT_DIR and MACHINE.
      
      But if a test option were to use a default option, it will not get
      substituted:
      
        OUTPUT_DIR = ${THIS_DIR}/${MACHINE}
      
        TEST_START
        OUTPUT_DIR = ${OUTPUT_DIR}/t1
      
      For the above test, OUTPUT_DIR will stay literally "${OUTPUT_DIR}/t1"
      and not be converted to "${THIS_DIR}/${MACHINE}/t1". When the test runs,
      it will pass the ${OUTPUT_DIR} to the shell, which would probaly
      interpret it as "", and the output directory will end up as "/t1".
      
      Change the code where if a test option has its own option name in
      its defined field, and a default option exists, then substitute the
      default option in its place.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      04262be3
    • S
      ktest: Strip off '\n' when reading which files were modified · 35275685
      Steven Rostedt (Red Hat) 提交于
      The patchcheck test looks at what files are modified for each patch it
      checks and makes sure that those files do not produce any warnings.
      
      Unfortunately, when it read the diffstat, the newlines were added on the
      files and this made compares miss warnings, and commits that should not
      have passed, ktest let pass.
      
      Fix this by using the perl command "chomp" that strips off whitespace at
      the end of lines.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      35275685
    • S
      ktest: Do not require CONSOLE for build or install bisects · 319ab14f
      Steven Rostedt (Red Hat) 提交于
      If the user is doing a build or install bisect, there's no reason to
      have them define CONSOLE, as the console does not need to be read. The
      console only needs to be read for boot tests.
      
      CONSOLE is not required for normal build or install tests, let's not
      require it for bisect tests with BISECT_TYPE of build or install.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      319ab14f
  14. 12 12月, 2012 4 次提交
    • S
      ktest: Test if target machine is up before install · e1a6c3d7
      Steven Rostedt 提交于
      Sometimes a test kernel will crash or hang on reboot (this is even more
      apparent when testing a config without CGROUPS on a box running
      systemd). When this happens, on the next iteration of installing a
      kernel, ktest will fail when it tries to install.
      
      Have ktest do a check to see if the target can be connected to via ssh
      before it tries to install. If it can't connect, then reboot again.
      This time the reboot will fail because it can't connect and will force a
      power cycle.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      e1a6c3d7
    • S
      ktest: Fix breakage from change of oldnoconfig to olddefconfig · 18925170
      Steven Rostedt 提交于
      Commit fb16d891 "kconfig: replace 'oldnoconfig' with 'olddefconfig', and
      keep the old name", changed ktest's default config update from
      oldnoconfig to olddefconfig without adding oldnoconfig as a backup.
      The make oldnoconfig works much better than its backup of:
         yes '' | make oldconfig
      
      But due to this change, and the fact that ktest is used to build lots of
      older kernels (and for bisects), it forgoes the oldnoconfig completely.
      
      Cc: Adam Lee <adam8157@gmail.com>
      Cc: Michal Marek <mmarek@suse.cz>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      18925170
    • S
      ktest: Add native support for syslinux boot loader · 7786954c
      Steven Rostedt 提交于
      I installed Fedora 17 which no longer supports grub v1. I worked
      with grub2 for a while, but there's so many issues with it and automated
      rebooting, that I decided to switch to syslinux. Instead of using
      the REBOOT_SCRIPT and add customized changes to get syslinux booted,
      I thought it better to make ktest aware of syslinux and add options
      to simplify the use of syslinux on a target test box.
      Acked-by: NH. Peter Anvin <hpa@zytor.com>
      Cc: John 'Warthog9' Hawley <warthog9@kernel.org>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      7786954c
    • S
      ktest: Sync before reboot · a4968722
      Steven Rostedt 提交于
      Before rebooting the target, run the sync command, as it seems that
      either Grub2 or systemd gets screwed up if you update to reboot a kernel
      once and do a reboot without doing a sync.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      a4968722
  15. 14 11月, 2012 1 次提交
    • S
      ktest: Add support for grub2 · a15ba913
      Steven Rostedt 提交于
      As only grub or 'script' is supported for rebooting to a new kernel,
      and Fedora 17 has dropped support for grub, I decided to add grub2
      support as well (I also plan on adding syslinux/extlinux support too).
      
      The options GRUB_FILE and GRUB_REBOOT were added to allow the user
      to specify where to find the grub.cfg and what tool to use to reboot
      into the next kernel respectively.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      a15ba913
  16. 26 10月, 2012 1 次提交
    • S
      ktest: Fix ktest confusion with CONFIG_MODULES_USE_ELF_RELA · 8bc5e4ea
      Steven Rostedt 提交于
      In order to decide if ktest should bother installing modules on the
      target box, it checks if the config file has CONFIG_MODULES=y. But it
      also checks if the '=y' part exists. It only will install modules if the
      config exists and is set with '=y'. But as the regex that was used
      tests:
      
        /^CONFIG_MODULES(=y)?/
      
      this will also match:
      
        CONFIG_MODULES_USE_ELF_RELA
      
      as the '=y' part was optional and it did not test the rest of the line.
      When this happens, ktest will stop checking the rest of the configs but
      it will also think that no modules are needed to be installed. What it
      should do is only jump out of the loop if it actually found a
      CONFIG_MODULES that is set to true.
      
      Otherwise, ktest wont install the necessary modules needed for proper
      booting of the test target.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      8bc5e4ea
  17. 28 9月, 2012 1 次提交
  18. 27 9月, 2012 1 次提交
    • S
      ktest: Fix ELSE IF statements · 95f57838
      Steven Rostedt 提交于
      The ELSE IF statements do not work as expected if another ELSE statement
      follows. This is because the $if_set is not set. If the ELSE IF
      condition is true, the following ELSE should be ignored. But because the
      $if_set is not set, the following ELSE will also be executed.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      95f57838
  19. 31 7月, 2012 2 次提交
  20. 21 7月, 2012 1 次提交
  21. 20 7月, 2012 4 次提交
    • S
      ktest: Add check for bug or panic during reboot · 8a80c727
      Steven Rostedt 提交于
      Usually the target is booted into a dependable kernel when a test
      starts. The test will install the test kernel and reboot the box. But
      there may be a time that the kernel is running an unreliable kernel and
      the reboot may crash.
      
      Have ktest detect crashes on a reboot and force a power-cycle instead.
      
      This can usually happen if a test kernel was installed to run manual
      tests, but the user forgot to reboot to the known good kernel.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      8a80c727
    • S
      ktest: Add MAX_MONITOR_WAIT option · 407b95b7
      Steven Rostedt 提交于
      If the console is constantly outputting content, this can cause ktest
      to get stuck waiting on the monitor to settle down.
      
      The option MAX_MONITOR_WAIT is the maximum time (in seconds) for ktest
      to wait for the console to flush.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      407b95b7
    • S
      ktest: Fix config bisect with how make oldnoconfig works · cf79fab6
      Steven Rostedt 提交于
      With a name like 'oldnoconfig' one may think that the config generated
      would disable all configs that were not defined (selecting "no" for all
      options). But this is not the case. It selects the default. If a config
      has a 'default y', then it is added if not specified.
      
      This broke the config bisect, because options not specified by a config
      will just use the default, where it expected to turn off. This caused an
      option to be enabled that disabled an option that would break the build.
      The end result was that we never found the bad config at the end of the
      test.
      
      Instead of using 'make oldnoconfig', ktest now builds the options it
      expects enabled and disabled. When it turns off an option, it will no
      longer remove it, but actually set it to:
      
       # CONFIG_FOO is not set.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      cf79fab6
    • S
      ktest: Add CONFIG_BISECT_CHECK option · b0918612
      Steven Rostedt 提交于
      The config-bisect can take a bad config and bisect it down to find out
      what config actually breaks the config. But as all tests will apply a
      minconfig (defined by a user) to apply before booting, it is possible
      that the minconfig could actually make the bad config work (minconfigs
      can disable configs). The end result is that the config bisect test will
      not find a config that breaks. This can be rather frustrating to the
      user.
      
      The CONFIG_BISECT_CHECK option, when set to 1, will make sure that the
      bad config (with the minconfig applied) still fails before trying to
      bisect.
      
      And yes, I did get burned by this.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      b0918612