1. 31 1月, 2013 2 次提交
  2. 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
  3. 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
  4. 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
  5. 28 9月, 2012 1 次提交
  6. 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
  7. 31 7月, 2012 2 次提交
  8. 21 7月, 2012 1 次提交
  9. 20 7月, 2012 7 次提交
    • 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
    • S
      ktest: Add PRE_INSTALL option · e5c2ec11
      Steven Rostedt 提交于
      Add the PRE_INSTALL option that will allow a user to specify a shell
      command to be executed before the install operation executes.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      e5c2ec11
    • S
      ktest: Add PRE/POST_KTEST and TEST options · 921ed4c7
      Steven Rostedt 提交于
      In order to let the user add commands before and after ktest runs, the
      PRE_KTEST and POST_KTEST options are defined. They hold shell commands
      that will execute befor ktest runs its first test, as well as when it
      completed its last test.
      
      The PRE_TEST and POST_TEST will be run befor and after (respectively)
      for a given test. They can either be global (done for all tests) or
      defined by a single test.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      921ed4c7
    • S
      ktest: Remove commented exit · 958d8435
      Steven Rostedt 提交于
      A debug 'exit' was left in ktest.pl. Remove it.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      958d8435
  10. 22 5月, 2012 2 次提交
    • S
      ktest: Add USE_OUTPUT_MIN_CONFIG to avoid prompt on make_min_config · 43de3316
      Steven Rostedt 提交于
      If the file that OUTPUT_MIN_CONFIG exists then ktest.pl will prompt the
      user and ask them if the OUTPUT_MIN_CONFIG should be used as the
      starting point for make_min_config instead of MIN_CONFIG.
      
      This is usually the case, and to allow the user to do so, which is
      helpful if the user is creating different min configs based on tests,
      and they know one is a superset of another test, they can set
      USE_OUTPUT_MIN_CONFIG to one, which will prevent kest.pl from prompting
      to use the OUTPUT_MIN_CONFIG and it will just use it.
      
      If USE_OUTPUT_MIN_CONIFG is set to zero, then ktest.pl will continue to
      use MIN_CONFIG instead.
      
      The default is that USE_OUTPUT_MIN_CONFIG is undefined.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      43de3316
    • S
      ktest: Add MIN_CONFIG_TYPE to allow making a minum .config that has network · ccc513b6
      Steven Rostedt 提交于
      Add a MIN_CONFIG_TYPE that can be set to 'test' or 'boot'. The default
      is 'boot' which is what make_min_config has done previously: makes a
      config file that is the minimum needed to boot the target.
      
      But when MIN_CONFIG_TYPE is set to 'test', not only must the target
      boot, but it must also successfully run the TEST. This allows the
      creation of a config file that is the minimum to boot and also
      perform ssh to the target, or anything else a developer wants.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      ccc513b6
  11. 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
  12. 01 5月, 2012 2 次提交
  13. 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
  14. 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
  15. 21 2月, 2012 1 次提交
  16. 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
  17. 23 12月, 2011 6 次提交
    • 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