1. 28 1月, 2015 1 次提交
  2. 24 11月, 2014 1 次提交
  3. 22 11月, 2014 4 次提交
    • S
      ktest: Add name to running title · 18656c70
      Steven 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: NSteven Rostedt <rostedt@goodmis.org>
      18656c70
    • S
      ktest: Allow tests to undefine default options · 22c37a9a
      Steven 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: NSteven Rostedt <rostedt@goodmis.org>
      22c37a9a
    • S
      ktest: Fix make_min_config to handle new assign_configs call · 9972fc0b
      Steven Rostedt (Red Hat) 提交于
      Commit 6071c22e "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: NSteven Rostedt <rostedt@goodmis.org>
      9972fc0b
    • M
      ktest: Use make -s kernelrelease · 52d21580
      Michal Marek 提交于
      The previous tail -1 broke with commit 7ff52571 ("kbuild: fake the
      "Entering directory ..." message more simply")
      
      Link: http://lkml.kernel.org/r/20141022194408.GA20989@pobox.suse.czReported-by: NSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      52d21580
  4. 08 10月, 2014 2 次提交
  5. 20 9月, 2014 2 次提交
  6. 24 4月, 2014 6 次提交
  7. 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
  8. 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
  9. 04 12月, 2013 1 次提交
  10. 28 5月, 2013 1 次提交
  11. 25 4月, 2013 1 次提交
  12. 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
  13. 18 2月, 2013 1 次提交
  14. 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
  15. 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
  16. 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
  17. 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
  18. 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
  19. 28 9月, 2012 1 次提交
  20. 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
  21. 31 7月, 2012 2 次提交