29 Mar, 2012

3 commits

  • hugepage-mmap.c, hugepage-shm.c and map_hugetlb.c in Documentation/vm are
    simple pass/fail tests, It's better to promote them to
    tools/testing/selftests.

    Thanks suggestion of Andrew Morton about this. They all need firstly
    setting up proper nr_hugepages and hugepage-mmap need to mount hugetlbfs.
    So I add a shell script run_vmtests to do such work which will call the
    three test programs and check the return value of them.

    Changes to original code including below:
    a. add run_vmtests script
    b. return error when read_bytes mismatch with writed bytes.
    c. coding style fixes: do not use assignment in if condition

    [akpm@linux-foundation.org: build the targets before trying to execute them]
    [akpm@linux-foundation.org: Documentation/vm/ no longer has a Makefile. Fixes "make clean"]
    Signed-off-by: Dave Young
    Cc: Wu Fengguang
    Cc: Christoph Lameter
    Cc: Pekka Enberg
    Cc: Frederic Weisbecker
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Young
     
  • So a "make run_tests" will build the tests before trying to run them.

    Acked-by: Frederic Weisbecker
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Remove the run_tests script and launch the selftests by calling "make
    run_tests" from the selftests top directory instead. This delegates to
    the Makefile in each selftest directory, where it is decided how to launch
    the local test.

    This removes the need to add each selftest directory to the now removed
    "run_tests" top script.

    Signed-off-by: Frederic Weisbecker
    Cc: Dave Young
    Cc: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Frederic Weisbecker
     

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
     

28 Feb, 2012

2 commits

  • …/scm/linux/kernel/git/rostedt/linux-ktest

    While demoing ktest at ELC in 2012, it was embarrassing that the
    make_min_config test failed to work because the snowball board I was
    testing it against had a config that would not build. But the
    make_min_config only tested the testing part and ignored build failures.
    The end result was a config file that would not boot.

    This time, for real.

    * tag 'ktest-fix-make-min-failed-build-for-real' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest:
    ktest: Fix make_min_config test when build fails

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

    Steven Rostedt
     

21 Feb, 2012

1 commit


17 Jan, 2012

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest:
    ktest: Add INGORE_ERRORS to ignore warnings in boot up
    ktest: Still do reboot even for REBOOT_TYPE = script
    ktest: Fix compare script to test if options are not documented
    ktest: Detect typos in option names
    ktest: Have all values be set by defaults
    ktest: Change initialization of defaults hash to perl format
    ktest: Add options SWITCH_TO_GOOD and SWITCH_TO_TEST
    ktest: Allow overriding bisect test results
    ktest: Evaluate options before processing them
    ktest: Evaluate $KERNEL_VERSION in both install and post install
    ktest: Only ask options needed for install
    ktest: When creating a new config, ask for BUILD_OPTIONS
    ktest: Do not ask for some options if the only test is build
    ktest: Ask for type of test when creating a new config
    ktest: Allow bisect test to restart where it left off
    ktest: When creating new config, allow the use of ${THIS_DIR}
    ktest: Add default for ssh-user, build-target and target-image
    ktest: Allow success logs to be stored
    ktest: Save test output

    Linus Torvalds
     

13 Jan, 2012

2 commits

  • Bring a first selftest in the relevant directory. This tests several
    combinations of breakpoints and watchpoints in x86, as well as icebp traps
    and int3 traps. Given the amount of breakpoint regressions we raised
    after we merged the generic breakpoint infrastructure, such selftest
    became necessary and can still serve today as a basis for new patches that
    touch the do_debug() path.

    Signed-off-by: Frederic Weisbecker
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: H. Peter Anvin
    Cc: Jason Wessel
    Cc: Will Deacon
    Cc: Michal Marek
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Frederic Weisbecker
     
  • Bring a new kernel selftests directory in tools/testing/selftests. To
    add a new selftest, create a subdirectory with the sources and a
    makefile that creates a target named "run_test" then add the
    subdirectory name to the TARGET var in tools/testing/selftests/Makefile
    and tools/testing/selftests/run_tests script.

    This can help centralizing and maintaining any useful selftest that
    developers usually tend to let rust in peace on some random server.

    Suggested-by: Andrew Morton
    Signed-off-by: Frederic Weisbecker
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Jason Wessel
    Cc: Will Deacon
    Cc: Steven Rostedt
    Cc: Michal Marek
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Frederic Weisbecker
     

09 Jan, 2012

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (53 commits)
    Kconfig: acpi: Fix typo in comment.
    misc latin1 to utf8 conversions
    devres: Fix a typo in devm_kfree comment
    btrfs: free-space-cache.c: remove extra semicolon.
    fat: Spelling s/obsolate/obsolete/g
    SCSI, pmcraid: Fix spelling error in a pmcraid_err() call
    tools/power turbostat: update fields in manpage
    mac80211: drop spelling fix
    types.h: fix comment spelling for 'architectures'
    typo fixes: aera -> area, exntension -> extension
    devices.txt: Fix typo of 'VMware'.
    sis900: Fix enum typo 'sis900_rx_bufer_status'
    decompress_bunzip2: remove invalid vi modeline
    treewide: Fix comment and string typo 'bufer'
    hyper-v: Update MAINTAINERS
    treewide: Fix typos in various parts of the kernel, and fix some comments.
    clockevents: drop unknown Kconfig symbol GENERIC_CLOCKEVENTS_MIGR
    gpio: Kconfig: drop unknown symbol 'CS5535_GPIO'
    leds: Kconfig: Fix typo 'D2NET_V2'
    sound: Kconfig: drop unknown symbol ARCH_CLPS7500
    ...

    Fix up trivial conflicts in arch/powerpc/platforms/40x/Kconfig (some new
    kconfig additions, close to removed commented-out old ones)

    Linus Torvalds
     

05 Jan, 2012

2 commits

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

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

    Steven Rostedt
     

02 Jan, 2012

1 commit


23 Dec, 2011

13 commits

  • The compare script compare-ktest-sample.pl checks for options
    that are defined in ktest.pl and not documented in samples.conf,
    as well as samples in samples.conf that are not used in ktest.pl.

    With the switch to the hash format to initialize the ktest variables
    the compare script needs to be updated to handle the change.

    Signed-off-by: Steven Rostedt

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

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

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

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

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

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

    Steven Rostedt
     
  • The install process may also need to know what the kernel version
    is, to add it to the name. Evaluate it for both install and
    post install.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • If all the tests are only for build or install, do not ask
    for options not needed to do the install, if the options do
    not exist.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • When creating a new config, ask for the BUILD_OPTIONS variable
    that lets users add things like -j20 to the make.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • When creating a ktest config or if te config only has build only
    tests, some of the manditory config options are not needed.

    Do not ask for them if all tests in the config file are just build
    tests.

    Suggested-by: Darren Hart
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • When no argument is supplied to ktest, or the config applied does
    not exist and a new config is being created, instead of just using
    the default test type, give the user an option to pick the test type
    of either 'build, install, or boot'. Other options may be added later
    but then those would require more questions as they require more
    fields. But that's for another release of ktest to add that feature.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • If a bisect is killed for some reason, have ktest detect that a bisect
    is in progress and if so, allow the user to start the bisect where
    it left off.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     

24 Nov, 2011

1 commit

  • Typing in a full path when you know that the path exists within
    the directory your are running is tedious and unnecessary.

    Allow the user to use ${PWD} if they want a dynamic path name
    which will be the path that ktest.pl is executed from
    or use ${THIS_DIR} which is a variable assigned `pwd` and
    the the variable will exist within the config, allowing the user
    to change it and affect all other paths using this variable as well

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     

22 Nov, 2011

1 commit

  • When a user runs ktest without an argument, or the argument given
    is not a config file that exists, ktest will ask the user a few
    questions to create a simple ktest config file.

    A few of the questions should have a default value set, that if anything
    it will make it easier for the user to know what is suppose to
    be in that value.

    These new values are:

    SSH_USER, BUILD_TARGET and TARGET_IMAGE

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     

19 Nov, 2011

3 commits

  • Add a STORE_SUCCESSES option, to allow success logs to be stored, for
    example to double-check or otherwise post-process the test logs.

    Link: http://lkml.kernel.org/r/1321616131-21352-3-git-send-email-rabin@rab.in

    Signed-off-by: Rabin Vincent
    Signed-off-by: Steven Rostedt

    Rabin Vincent
     
  • The test output may contain useful information; save it along with the
    already-saved buildlog, dmesg, and .config.

    Link: http://lkml.kernel.org/r/1321616131-21352-1-git-send-email-rabin@rab.in

    Signed-off-by: Rabin Vincent
    Signed-off-by: Steven Rostedt

    Rabin Vincent
     
  • Let's say we have "OUTPUT_DIR = build/${TEST_NAME}", and we're iterating
    a test. In the second iteration of a test, the TEST_NAME of the test
    we're repeating is not used. Instead, ${TEST_NAME} appears literally:

    touch /home/rabin/kernel/test/build/${TEST_NAME}/.config ... SUCCESS

    Fix this by making __eval_option() check the parent test options
    for a repeated test.

    Link: http://lkml.kernel.org/r/1321616131-21352-2-git-send-email-rabin@rab.in

    Signed-off-by: Rabin Vincent
    Signed-off-by: Steven Rostedt

    Rabin Vincent
     

28 Oct, 2011

1 commit

  • When ktest.pl is called without any arguments, or if the config
    file does not exist, ktest.pl will ask the user for some information.
    Some of these questions are code paths. Allowing the user to type
    ${PWD} for the current directory greatly simplifies these entries.

    Add variable processing to the entered values.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     

22 Oct, 2011

1 commit