18 Dec, 2012

8 commits

  • I was curious why sys_kcmp wasn't working, which led me to the testcase.
    It turned out I hadn't enabled CHECKPOINT_RESTORE in the kernel I was
    testing. Add a decoding of errno to the testcase to make that obvious.

    Signed-off-by: Dave Jones
    Acked-by: Cyrill Gorcunov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Jones
     
  • In case breakpoint test exit non zero value it will cause make error.
    Better way is just print the test failure status.

    Signed-off-by: Dave Young
    Reviewed-by: Pekka Enberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Young
     
  • In case kcmp_test exit non zero value it will cause make error.
    Better way is just print the test failure status.

    Signed-off-by: Dave Young
    Reviewed-by: Pekka Enberg
    Cc: Cyrill Gorcunov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Young
     
  • make run_tests need the target is run_tests instead of run-tests
    Also gcc output should be kcmp_test. Fix these two issues.

    Signed-off-by: Dave Young
    Cc: Pekka Enberg
    Cc: Cyrill Gorcunov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Young
     
  • Original behavior:
    bash-4.1$ make -C memory-hotplug run_tests
    make: Entering directory `/home/dave/git/linux-2.6/tools/testing/selftests/memory-hotplug'
    ./on-off-test.sh
    make: execvp: ./on-off-test.sh: Permission denied
    make: *** [run_tests] Error 127
    make: Leaving directory `/home/dave/git/linux-2.6/tools/testing/selftests/memory-hotplug'

    After applying the patch:
    bash-4.1$ make -C memory-hotplug run_tests
    make: Entering directory `/home/dave/git/linux-2.6/tools/testing/selftests/memory-hotplug'
    /bin/sh: ./on-off-test.sh: Permission denied
    memory-hotplug selftests: [FAIL]
    make: Leaving directory `/home/dave/git/linux-2.6/tools/testing/selftests/memory-hotplug'

    Signed-off-by: Dave Young
    Reviewed-by: Pekka Enberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Young
     
  • Original behavior:
    bash-4.1$ make -C cpu-hotplug run_tests
    make: Entering directory `/home/dave/git/linux-2.6/tools/testing/selftests/cpu-hotplug'
    ./on-off-test.sh
    make: execvp: ./on-off-test.sh: Permission denied
    make: *** [run_tests] Error 127
    make: Leaving directory `/home/dave/git/linux-2.6/tools/testing/selftests/cpu-hotplug'

    After applying the patch:
    bash-4.1$ make -C cpu-hotplug run_tests
    make: Entering directory `/home/dave/git/linux-2.6/tools/testing/selftests/cpu-hotplug'
    /bin/sh: ./on-off-test.sh: Permission denied
    cpu-hotplug selftests: [FAIL]
    make: Leaving directory `/home/dave/git/linux-2.6/tools/testing/selftests/cpu-hotplug'

    Signed-off-by: Dave Young
    Reviewed-by: Pekka Enberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Young
     
  • Original behavior:
    bash-4.1$ make -C mqueue run_tests
    make: Entering directory `/home/dave/git/linux-2.6/tools/testing/selftests/mqueue'
    ./mq_open_tests /test1
    Not running as root, but almost all tests require root in order to modify
    system settings. Exiting.
    make: *** [run_tests] Error 1
    make: Leaving directory `/home/dave/git/linux-2.6/tools/testing/selftests/mqueue'

    After applying the patch:
    bash-4.1$ make -C mqueue run_tests
    make: Entering directory `/home/dave/git/linux-2.6/tools/testing/selftests/mqueue'
    Not running as root, but almost all tests require root in order to modify
    system settings. Exiting.
    mq_open_tests: [FAIL]
    Not running as root, but almost all tests require root in order to modify
    system settings. Exiting.
    mq_perf_tests: [FAIL]
    make: Leaving directory `/home/dave/git/linux-2.6/tools/testing/selftests/mqueue'

    Signed-off-by: Dave Young
    Reviewed-by: Pekka Enberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Young
     
  • Original behavior:
    bash-4.1$ make -C vm run_tests
    make: Entering directory `/home/dave/git/linux-2.6/tools/testing/selftests/vm'
    /bin/sh ./run_vmtests
    ./run_vmtests: line 24: /proc/sys/vm/nr_hugepages: Permission denied
    Please run this test as root
    make: *** [run_tests] Error 1
    make: Leaving directory `/home/dave/git/linux-2.6/tools/testing/selftests/vm'

    After applying the patch:
    bash-4.1$ make -C vm run_tests
    make: Entering directory `/home/dave/git/linux-2.6/tools/testing/selftests/vm'
    ./run_vmtests: line 24: /proc/sys/vm/nr_hugepages: Permission denied
    Please run this test as root
    vmtests: [FAIL]
    make: Leaving directory `/home/dave/git/linux-2.6/tools/testing/selftests/vm'

    Signed-off-by: Dave Young
    Cc: Pekka Enberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Young
     

14 Dec, 2012

1 commit


12 Dec, 2012

5 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
     
  • Also remove -Wextra because gcc-4.6 emits lots of irritating
    signed/unsigned comparison warnings.

    Signed-off-by: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • 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
     

09 Nov, 2012

1 commit

  • Revert commit 03a7beb55b9f ("epoll: support for disabling items, and a
    self-test app") pending resolution of the issues identified by Michael
    Kerrisk, copied below.

    We'll revisit this for 3.8.

    : I've taken a look at this patch as it currently stands in 3.7-rc1, and
    : done a bit of testing. (By the way, the test program
    : tools/testing/selftests/epoll/test_epoll.c does not compile...)
    :
    : There are one or two places where the behavior seems a little strange,
    : so I have a question or two at the end of this mail. But other than
    : that, I want to check my understanding so that the interface can be
    : correctly documented.
    :
    : Just to go though my understanding, the problem is the following
    : scenario in a multithreaded application:
    :
    : 1. Multiple threads are performing epoll_wait() operations,
    : and maintaining a user-space cache that contains information
    : corresponding to each file descriptor being monitored by
    : epoll_wait().
    :
    : 2. At some point, a thread wants to delete (EPOLL_CTL_DEL)
    : a file descriptor from the epoll interest list, and
    : delete the corresponding record from the user-space cache.
    :
    : 3. The problem with (2) is that some other thread may have
    : previously done an epoll_wait() that retrieved information
    : about the fd in question, and may be in the middle of using
    : information in the cache that relates to that fd. Thus,
    : there is a potential race.
    :
    : 4. The race can't solved purely in user space, because doing
    : so would require applying a mutex across the epoll_wait()
    : call, which would of course blow thread concurrency.
    :
    : Right?
    :
    : Your solution is the EPOLL_CTL_DISABLE operation. I want to
    : confirm my understanding about how to use this flag, since
    : the description that has accompanied the patches so far
    : has been a bit sparse
    :
    : 0. In the scenario you're concerned about, deleting a file
    : descriptor means (safely) doing the following:
    : (a) Deleting the file descriptor from the epoll interest list
    : using EPOLL_CTL_DEL
    : (b) Deleting the corresponding record in the user-space cache
    :
    : 1. It's only meaningful to use this EPOLL_CTL_DISABLE in
    : conjunction with EPOLLONESHOT.
    :
    : 2. Using EPOLL_CTL_DISABLE without using EPOLLONESHOT in
    : conjunction is a logical error.
    :
    : 3. The correct way to code multithreaded applications using
    : EPOLL_CTL_DISABLE and EPOLLONESHOT is as follows:
    :
    : a. All EPOLL_CTL_ADD and EPOLL_CTL_MOD operations should
    : should EPOLLONESHOT.
    :
    : b. When a thread wants to delete a file descriptor, it
    : should do the following:
    :
    : [1] Call epoll_ctl(EPOLL_CTL_DISABLE)
    : [2] If the return status from epoll_ctl(EPOLL_CTL_DISABLE)
    : was zero, then the file descriptor can be safely
    : deleted by the thread that made this call.
    : [3] If the epoll_ctl(EPOLL_CTL_DISABLE) fails with EBUSY,
    : then the descriptor is in use. In this case, the calling
    : thread should set a flag in the user-space cache to
    : indicate that the thread that is using the descriptor
    : should perform the deletion operation.
    :
    : Is all of the above correct?
    :
    : The implementation depends on checking on whether
    : (events & ~EP_PRIVATE_BITS) == 0
    : This replies on the fact that EPOLL_CTL_AD and EPOLL_CTL_MOD always
    : set EPOLLHUP and EPOLLERR in the 'events' mask, and EPOLLONESHOT
    : causes those flags (as well as all others in ~EP_PRIVATE_BITS) to be
    : cleared.
    :
    : A corollary to the previous paragraph is that using EPOLL_CTL_DISABLE
    : is only useful in conjunction with EPOLLONESHOT. However, as things
    : stand, one can use EPOLL_CTL_DISABLE on a file descriptor that does
    : not have EPOLLONESHOT set in 'events' This results in the following
    : (slightly surprising) behavior:
    :
    : (a) The first call to epoll_ctl(EPOLL_CTL_DISABLE) returns 0
    : (the indicator that the file descriptor can be safely deleted).
    : (b) The next call to epoll_ctl(EPOLL_CTL_DISABLE) fails with EBUSY.
    :
    : This doesn't seem particularly useful, and in fact is probably an
    : indication that the user made a logic error: they should only be using
    : epoll_ctl(EPOLL_CTL_DISABLE) on a file descriptor for which
    : EPOLLONESHOT was set in 'events'. If that is correct, then would it
    : not make sense to return an error to user space for this case?

    Cc: Michael Kerrisk
    Cc: "Paton J. Lewis"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

29 Oct, 2012

1 commit

  • Pull ktest confusion fix from Steven Rostedt:
    "With the v3.7-rc2 kernel, the network cards on my target boxes were
    not being brought up.

    I found that the modules for the network was not being installed.
    This was due to the config CONFIG_MODULES_USE_ELF_RELA that came
    before CONFIG_MODULES, and confused ktest in thinking that
    CONFIG_MODULES=y was not found.

    Ktest needs to test all configs and not just stop if something starts
    with CONFIG_MODULES."

    * tag 'ktest-v3.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest:
    ktest: Fix ktest confusion with CONFIG_MODULES_USE_ELF_RELA

    Linus Torvalds
     

26 Oct, 2012

2 commits

  • 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
     
  • Latest Linus head run of "make selftests" in the tools directory failed
    with references to undefined variables. Reference was to
    'write_thread_data' which is the name of a struct that is being used, not
    the variable itself. Change reference so it points to the variable.

    Signed-off-by: Daniel Hazelton
    Cc: "Paton J. Lewis"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Hazelton
     

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
     

06 Oct, 2012

1 commit

  • Enhanced epoll_ctl to support EPOLL_CTL_DISABLE, which disables an epoll
    item. If epoll_ctl doesn't return -EBUSY in this case, it is then safe to
    delete the epoll item in a multi-threaded environment. Also added a new
    test_epoll self- test app to both demonstrate the need for this feature
    and test it.

    Signed-off-by: Paton J. Lewis
    Cc: Alexander Viro
    Cc: Jason Baron
    Cc: Paul Holland
    Cc: Davide Libenzi
    Cc: Michael Kerrisk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paton J. Lewis
     

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


01 Aug, 2012

1 commit

  • "fault-injection: add tool to run command with failslab or
    fail_page_alloc" added tools/testing/fault-injection/failcmd.sh to make it
    easier to inject slab/page allocation failures by fault injection.

    failcmd.sh prints the following warning when running with arguments
    for command.

    # ./failcmd.sh echo aaa
    failcmd.sh: line 209: [: echo: binary operator expected
    aaa

    This warning is caused by an improper check whether at least one
    parameter is left after parsing command options.

    Fix it by testing the length of $1 instead of $@

    Signed-off-by: Akinobu Mita
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     

31 Jul, 2012

5 commits

  • Merge Andrew's first set of patches:
    "Non-MM patches:

    - lots of misc bits

    - tree-wide have_clk() cleanups

    - quite a lot of printk tweaks. I draw your attention to "printk:
    convert the format for KERN_ to a 2 byte pattern" which
    looks a bit scary. But afaict it's solid.

    - backlight updates

    - lib/ feature work (notably the addition and use of memweight())

    - checkpatch updates

    - rtc updates

    - nilfs updates

    - fatfs updates (partial, still waiting for acks)

    - kdump, proc, fork, IPC, sysctl, taskstats, pps, etc

    - new fault-injection feature work"

    * Merge emailed patches from Andrew Morton : (128 commits)
    drivers/misc/lkdtm.c: fix missing allocation failure check
    lib/scatterlist: do not re-write gfp_flags in __sg_alloc_table()
    fault-injection: add tool to run command with failslab or fail_page_alloc
    fault-injection: add selftests for cpu and memory hotplug
    powerpc: pSeries reconfig notifier error injection module
    memory: memory notifier error injection module
    PM: PM notifier error injection module
    cpu: rewrite cpu-notifier-error-inject module
    fault-injection: notifier error injection
    c/r: fcntl: add F_GETOWNER_UIDS option
    resource: make sure requested range is included in the root range
    include/linux/aio.h: cpp->C conversions
    fs: cachefiles: add support for large files in filesystem caching
    pps: return PTR_ERR on error in device_create
    taskstats: check nla_reserve() return
    sysctl: suppress kmemleak messages
    ipc: use Kconfig options for __ARCH_WANT_[COMPAT_]IPC_PARSE_VERSION
    ipc: compat: use signed size_t types for msgsnd and msgrcv
    ipc: allow compat IPC version field parsing if !ARCH_WANT_OLD_COMPAT_IPC
    ipc: add COMPAT_SHMLBA support
    ...

    Linus Torvalds
     
  • This adds tools/testing/fault-injection/failcmd.sh to run a command while
    injecting slab/page allocation failures via fault injection.

    Example:

    Run a command "make -C tools/testing/selftests/ run_tests" with
    injecting slab allocation failure.

    # ./tools/testing/fault-injection/failcmd.sh \
    -- make -C tools/testing/selftests/ run_tests

    Same as above except to specify 100 times failures at most instead of
    one time at most by default.

    # ./tools/testing/fault-injection/failcmd.sh --times=100 \
    -- make -C tools/testing/selftests/ run_tests

    Same as above except to inject page allocation failure instead of slab
    allocation failure.

    # env FAILCMD_TYPE=fail_page_alloc \
    ./tools/testing/fault-injection/failcmd.sh --times=100 \
    -- make -C tools/testing/selftests/ run_tests

    Signed-off-by: Akinobu Mita
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • This adds two selftests

    * tools/testing/selftests/cpu-hotplug/on-off-test.sh is testing script
    for CPU hotplug

    1. Online all hot-pluggable CPUs
    2. Offline all hot-pluggable CPUs
    3. Online all hot-pluggable CPUs again
    4. Exit if cpu-notifier-error-inject.ko is not available
    5. Offline all hot-pluggable CPUs in preparation for testing
    6. Test CPU hot-add error handling by injecting notifier errors
    7. Online all hot-pluggable CPUs in preparation for testing
    8. Test CPU hot-remove error handling by injecting notifier errors

    * tools/testing/selftests/memory-hotplug/on-off-test.sh is doing the
    similar thing for memory hotplug.

    1. Online all hot-pluggable memory
    2. Offline 10% of hot-pluggable memory
    3. Online all hot-pluggable memory again
    4. Exit if memory-notifier-error-inject.ko is not available
    5. Offline 10% of hot-pluggable memory in preparation for testing
    6. Test memory hot-add error handling by injecting notifier errors
    7. Online all hot-pluggable memory in preparation for testing
    8. Test memory hot-remove error handling by injecting notifier errors

    Signed-off-by: Akinobu Mita
    Suggested-by: Andrew Morton
    Cc: Pavel Machek
    Cc: "Rafael J. Wysocki"
    Cc: Greg KH
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Michael Ellerman
    Cc: Dave Jones
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • Add '=~' and '!~' to the list of allowed conditionals for DEFAULT and
    TEST_START section if statements.

    ie.

    TEST_START IF TEST =~ .*test$

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • The option IGNORE_ERRORS is used to allow a test to succeed even if a
    warning appears from the kernel. Sometimes kernels will produce warnings
    that are not associated with a test, and the user wants to test
    something else.

    The IGNORE_ERRORS works for boot up, but was not preventing test runs to
    succeed if the kernel produced a warning.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     

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