12 Dec, 2012

4 commits

  • 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: Steven Rostedt

    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
    Cc: Michal Marek
    Signed-off-by: Steven Rostedt

    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: H. Peter Anvin
    Cc: John 'Warthog9' Hawley
    Signed-off-by: Steven Rostedt

    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: Steven Rostedt

    Steven Rostedt
     

14 Nov, 2012

1 commit

  • 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: Steven Rostedt

    Steven Rostedt
     

26 Oct, 2012

1 commit

  • 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: Steven Rostedt

    Steven Rostedt
     

12 Oct, 2012

1 commit

  • Pull kconfig changes from Michal Marek:
    "kconfig in v3.7 is going to
    - initialize ncurses only once in menuconfig
    - be able to jump to a search result in menuconfig
    - change the misnomer oldnoconfig to a more meaningful name
    olddefconfig, keeping the old name as alias"

    * 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    kconfig: replace 'oldnoconfig' with 'olddefconfig', and keep the old name as an alias
    menuconfig: Assign jump keys per-page instead of globally
    menuconfig: Do not open code textbox scroll up/down
    menuconfig: Add jump keys to search results
    menuconfig: Extend dialog_textbox so that it can return to a scrolled position
    menuconfig: Extend dialog_textbox so that it can exit on arbitrary keypresses
    menuconfig: Remove superfluous conditionnal
    kconfig: document oldnoconfig to what it really does in conf.c
    kconfig/mconf.c: revision of curses initialization.

    Linus Torvalds
     

02 Oct, 2012

2 commits

  • Pull ktest fix from Steven Rostedt:
    "ktest has one fix needed for this merge window - fix parsing of ELSE
    IF in reading config file"

    * tag 'ktest-v3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest:
    ktest: Fix ELSE IF statements

    Linus Torvalds
     
  • Pull the trivial tree from Jiri Kosina:
    "Tiny usual fixes all over the place"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (34 commits)
    doc: fix old config name of kprobetrace
    fs/fs-writeback.c: cleanup riteback_sb_inodes kerneldoc
    btrfs: fix the commment for the action flags in delayed-ref.h
    btrfs: fix trivial typo for the comment of BTRFS_FREE_INO_OBJECTID
    vfs: fix kerneldoc for generic_fh_to_parent()
    treewide: fix comment/printk/variable typos
    ipr: fix small coding style issues
    doc: fix broken utf8 encoding
    nfs: comment fix
    platform/x86: fix asus_laptop.wled_type module parameter
    mfd: printk/comment fixes
    doc: getdelays.c: remember to close() socket on error in create_nl_socket()
    doc: aliasing-test: close fd on write error
    mmc: fix comment typos
    dma: fix comments
    spi: fix comment/printk typos in spi
    Coccinelle: fix typo in memdup_user.cocci
    tmiofb: missing NULL pointer checks
    tools: perf: Fix typo in tools/perf
    tools/testing: fix comment / output typos
    ...

    Linus Torvalds
     

28 Sep, 2012

1 commit

  • As 67d34a6a391369269a2e5dba8a5f42cc4cd50231 said, 'oldnoconfig' doesn't
    set new symbols to 'n', but instead sets it to their default values.

    So, this patch replaces 'oldnoconfig' with 'olddefconfig', stop making
    people confused, and keep the old name 'oldnoconfig' as an alias,
    because people already are dependent on its behavior with the
    counter-intuitive name.

    Signed-off-by: Adam Lee
    Signed-off-by: Michal Marek

    Adam Lee
     

27 Sep, 2012

1 commit

  • 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: Steven Rostedt

    Steven Rostedt
     

01 Sep, 2012

1 commit


31 Jul, 2012

2 commits


21 Jul, 2012

1 commit

  • The min configs are saved in a perl hash called force_configs, and this
    hash is used to add configs to the .config file. But it was not being
    reset between tests and a min config from a previous test would affect
    the min config of the next test causing undesirable results.

    Reset the force_config hash at the start of each test.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     

20 Jul, 2012

7 commits

  • 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: Steven Rostedt

    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: Steven Rostedt

    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: Steven Rostedt

    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: Steven Rostedt

    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: Steven Rostedt

    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: Steven Rostedt

    Steven Rostedt
     
  • A debug 'exit' was left in ktest.pl. Remove it.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     

23 May, 2012

1 commit


22 May, 2012

7 commits

  • Add a README that explains what the different example configs in the
    ktest example directory are about.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • I used the snowball.conf in a live demo that demonstrated how to use
    ktest.pl with a snowball ARM board. I've been asked to included that
    config in the ktest repository.

    Here it is.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • Add the config that I use to test several archs. I downloaded several
    cross compilers from:

    http://kernel.org/pub/tools/crosstool/files/bin/x86_64/

    and this config is an example to crosscompile several archs to make sure
    that your changes do not break archs that you are not working on.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • Add an example config that explains how to use ktest with a virtual
    guest as the target.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • I've been asked several times to provide more useful example configs for
    ktest.pl, as the sample.conf is too complex (because it explains all
    configs). This adds configs broken up by use case, and these configs are
    based on actual configs that I use on a daily basis.

    Signed-off-by: Steven Rostedt

    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: Steven Rostedt

    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: Steven Rostedt

    Steven Rostedt
     

19 May, 2012

1 commit

  • 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: Steven Rostedt

    Steven Rostedt
     

01 May, 2012

2 commits

  • The change to let individual tests decide to reboot the machine on
    success of the entire test also prevented errors from rebooting
    when an error was detected.

    The "no_reboot" variable was only cleared if the test had
    reboot_on_success set. But the no_reboot variable also prevents the test
    rebooting when an error was detected even when REBOOT_ON_ERROR was set.

    Add a new "reboot_success" variable that is used to determine if the
    test should reboot on success and not touch the no_reboot variable.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • When BISECT_REVERSE and BISECT_SKIP are used together with boot or test
    testing, build failures are treated as boot or test failures and
    'git bisect bad' is executed instead of 'git bisect skip'. This is because
    the $ret value of -1 is treated as a build failure, but the $reverse_bisect
    logic does not properly handle this.

    Simple fix, only invert it if it is positive.

    Link: http://lkml.kernel.org/r/1335235380-8509-1-git-send-email-Russ.Dill@ti.com

    Signed-off-by: Russ Dill
    Signed-off-by: Steven Rostedt

    Russ Dill
     

24 Mar, 2012

1 commit


21 Mar, 2012

6 commits

  • 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: Steven Rostedt

    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: Steven Rostedt

    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: Steven Rostedt

    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: Steven Rostedt

    Steven Rostedt
     
  • To keep the modules from bloating the target's filesystem
    strip them during the install.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • Pull trivial tree from Jiri Kosina:
    "It's indeed trivial -- mostly documentation updates and a bunch of
    typo fixes from Masanari.

    There are also several linux/version.h include removals from Jesper."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (101 commits)
    kcore: fix spelling in read_kcore() comment
    constify struct pci_dev * in obvious cases
    Revert "char: Fix typo in viotape.c"
    init: fix wording error in mm_init comment
    usb: gadget: Kconfig: fix typo for 'different'
    Revert "power, max8998: Include linux/module.h just once in drivers/power/max8998_charger.c"
    writeback: fix fn name in writeback_inodes_sb_nr_if_idle() comment header
    writeback: fix typo in the writeback_control comment
    Documentation: Fix multiple typo in Documentation
    tpm_tis: fix tis_lock with respect to RCU
    Revert "media: Fix typo in mixer_drv.c and hdmi_drv.c"
    Doc: Update numastat.txt
    qla4xxx: Add missing spaces to error messages
    compiler.h: Fix typo
    security: struct security_operations kerneldoc fix
    Documentation: broken URL in libata.tmpl
    Documentation: broken URL in filesystems.tmpl
    mtd: simplify return logic in do_map_probe()
    mm: fix comment typo of truncate_inode_pages_range
    power: bq27x00: Fix typos in comment
    ...

    Linus Torvalds