02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

09 Mar, 2017

1 commit

  • Pull ktest fixes from Steven Rostedt:
    "Greg Kroah-Hartman reported to me that the ktest of v4.11-rc1 locked
    up in an infinite loop while doing the make mrproper.

    Looking into the cause I noticed that a recent update to the function
    run_command (used for running all shell commands, including "make
    mrproper") changed the internal loop to use the function
    wait_for_input.

    The wait_for_input function uses select to look at two file
    descriptors. One is the file descriptor of the command it is running,
    the other is STDIN. The STDIN check was not checking the return status
    of the sysread call, and was also just writing a lot of data into
    syswrite without regard to the size of the data read.

    Changing the code to check the return status of sysread, and also to
    still process the passed in descriptor data without looping back to
    the select fixed Greg's problem.

    While looking at this code I also realized that the loop did not honor
    the timeout if STDIN always had input (or for some reason return
    error). this could prevent wait_for_input to timeout on the file
    descriptor it is suppose to be waiting for. That is fixed too"

    * tag 'ktest-v4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest:
    ktest: Make sure wait_for_input does honor the timeout
    ktest: Fix while loop in wait_for_input

    Linus Torvalds
     

08 Mar, 2017

2 commits

  • The function wait_for_input takes in a timeout, and even has a default
    timeout. But if for some reason the STDIN descriptor keeps sending in data,
    the function will never time out. The timout is to wait for the data from
    the passed in file descriptor, not for STDIN. Adding a test in the case
    where there's no data from the passed in file descriptor that checks to see
    if the timeout passed, will ensure that it will timeout properly even if
    there's input in STDIN.

    Signed-off-by: Steven Rostedt (VMware)

    Steven Rostedt (VMware)
     
  • The run_command function was changed to use the wait_for_input function to
    allow having a timeout if the command to run takes too much time. There was
    a bug in the wait_for_input where it could end up going into an infinite
    loop. There's two issues here. One is that the return value of the sysread
    wasn't used for the write (to write a proper size), and that it should
    continue processing the passed in file descriptor too even if there was
    input. There was no check for error, if for some reason STDIN returned an
    error, the function would go into an infinite loop and never exit.

    Reported-by: Greg Kroah-Hartman
    Tested-by: Greg Kroah-Hartman
    Fixes: 6e98d1b4415f ("ktest: Add timeout to ssh command")
    Signed-off-by: Steven Rostedt (VMware)

    Steven Rostedt (VMware)
     

28 Feb, 2017

1 commit

  • Pull ktest updates from Steven Rostedt:
    "These are various fixes that I have made and never got around to
    pushing. I've been asked to get the upstream repo back up-to-date"

    * tag 'ktest-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest:
    ktest: Add variable run_command_status to save status of commands executed
    ktest.pl: Powercycle the box on reboot if no connection can be made
    ktest: Add timeout to ssh command
    ktest: Fix child exit code processing
    ktest: Have POST_TEST run after the test has totally completed

    Linus Torvalds
     

08 Feb, 2017

5 commits


15 Dec, 2016

1 commit

  • Ajdust spelling to more common "mandatory". Variant "mandidory" is
    certainly wrong.

    Link: http://lkml.kernel.org/r/20161011073003.GA19476@amd
    Signed-off-by: Pavel Machek
    Acked-by: Steven Rostedt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Machek
     

04 Feb, 2015

1 commit

  • Seems that some of the new console logic causes doprint to possibly
    get evaluated. When printing a commit message that contains parenthesis,
    it fails with a shell parsing error.

    This gets fixed when we add quotes around the $item variable, and prevent
    it from being evaluated by any shell commands.

    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     

02 Feb, 2015

4 commits


29 Jan, 2015

2 commits


28 Jan, 2015

2 commits

  • When ktest runs the console program as a child process, the parent and
    child share the same tty for stdin and stderr. This is problematic when
    using a libvirt target. The "virsh console" program makes a lot of
    changes to the tty settings, making ktest's output hard to read
    (carriage returns don't work). After ktest exits, the terminal is
    unusable (CRs broken, stdin isn't echoed).

    I think the best way to fix this issue would be to create a
    pseudoterminal (pty pair) so the child process would have a dedicated
    tty, and then use pipes to connect the two ttys. I'm not sure if that's
    overkill, but it's far beyond my current Perl abilities.

    This patch is a much easier way to (partially) fix this issue. It saves
    the tty settings before opening the console and restores them after
    closing it. There are still a few places where ktest prints mangled
    output while the console is open, but the output is much more legible
    overall, and the terminal works just fine after ktest exits.

    Link: http://lkml.kernel.org/r/1bb89abc0025cf1d6da657c7ba58bbeb4381a515.1422382008.git.jpoimboe@redhat.com

    Signed-off-by: Josh Poimboeuf
    Signed-off-by: Steven Rostedt

    Josh Poimboeuf
     
  • I find that I usually like to see how long a make or other command takes,
    and adding a start and end time and reporting how long each command runs
    (in seconds) is helpful.

    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     

24 Nov, 2014

1 commit

  • Commit 52d21580b362 "ktest: Use make -s kernelrelease" fixed commit
    7ff525712acf "kbuild: fake the "Entering directory ..." message more simply"
    as that commit added output after the make kernelrelease. But there's still
    some build scripts that are used by ktest that has output before the make
    is executed, and requires that only the last line is printed.

    Cc: Michal Marek
    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     

22 Nov, 2014

4 commits

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

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

    Steven Rostedt (Red Hat)
     
  • Commit 6071c22e1755 "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: Steven Rostedt

    Steven Rostedt (Red Hat)
     
  • The previous tail -1 broke with commit 7ff525712acf ("kbuild: fake the
    "Entering directory ..." message more simply")

    Link: http://lkml.kernel.org/r/20141022194408.GA20989@pobox.suse.cz

    Reported-by: Steven Rostedt
    Signed-off-by: Michal Marek
    Signed-off-by: Steven Rostedt

    Michal Marek
     

08 Oct, 2014

2 commits


20 Sep, 2014

2 commits

  • When doing a manual bisect, a build can fail or a test can be inconclusive.
    In these cases it would be helpful to be able to skip the test entirely.

    Link: http://lkml.kernel.org/r/1409164021-2136-1-git-send-email-chris.j.arges@canonical.com

    Reviewed-by: Satoru Takeuchi
    Signed-off-by: Chris J Arges
    Signed-off-by: Steven Rostedt

    Chris J Arges
     
  • Add a way to run a patchcheck test on the commits that are in one branch
    but not in another. This uses git cherry to find a list of commits to
    test each one with.

    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     

24 Apr, 2014

7 commits

  • With the more robust config_bisect, the documentation is out of
    date and needs to be updated.

    The new rewrite allows for finding missing configs and such, and
    is much more robust to use.

    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     
  • After the rewrite of the config bisect, the bisect manual was
    removed. Add it back.

    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     
  • After the rewrite of the config bisect, there were several unused
    functions that can be removed.

    One of the unused functions printed out the failed config nicer than
    what the rewrite did, so I kept that and used it to output the
    bad config.

    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     
  • The new rewrite left out the CONFIG_BISECT_CHECK, which allows the
    user to test that their "bad" config still is bad and their "good"
    config still is good. This is especially important as the configs
    are passed through a "make oldconfig" to update them with the lastest
    kernel. Things could change that causes a bad config to work, or a
    good config to break. The check is done after the configs have run
    through the oldconfig processing.

    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     
  • I never liked the way config-bisect worked. I would assume the bad config
    had some config that broke the system. But it would not work if the bad
    config just happened to be missing something that the good config had.

    I rewrote the config-bisect to do this properly. It does a diff of the two
    configs, and sets half of the configs that are in one and not the other.
    The way it works is that when it "sets", it really just makes one copy
    what the other has. That is, a "set" can be setting a:

    # CONFIG_FOO is not set

    Basically, it looks at the differences between the two files and makes
    them similar until it comes down to one config that makes it work or
    not work depending on if it is set or not.

    Note, if more than one config change makes the bad config not work, it
    will only find one of them. But this is true with all bisect logic.

    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     
  • Some cleanup for improving readability as follows.

    - Initialize $ktest_config at its definition.
    - Put parentheses around the `config-file' argument in the usage message
    because it's a optional one.
    - Rename get_ktest_config{,s} to more descriptive get_mandatory_config{,s}.

    Link: http://lkml.kernel.org/r/87fvmr30kb.wl%satoru.takeuchi@gmail.com

    Signed-off-by: Satoru Takeuchi
    Signed-off-by: Steven Rostedt

    Satoru Takeuchi
     
  • If we'd like to set the redirect target file of run_command(),
    we should define $redirect before calling this function and should undef it
    after calling this function. Since it's user-unfriendly, add 2nd parameter of
    run_command() for this purpose.

    Link: http://lkml.kernel.org/r/87vbvwokq8.wl%satoru.takeuchi@gmail.com

    Signed-off-by: Satoru Takeuchi
    Signed-off-by: Steven Rostedt

    Satoru Takeuchi
     

27 Feb, 2014

1 commit

  • As mentioned at commit 5a5d8e48449, we can't terminate 'virsh console'
    with the default signal(INT). So it's better to set CLOSE_CONSOLE_SIGNAL
    in the kvm.conf.

    Link: http://lkml.kernel.org/r/8738jatylb.wl%satoru.takeuchi@gmail.com

    Signed-off-by: Satoru Takeuchi
    [ Typo fixed by ]
    Signed-off-by: MUNEDA Takahiro
    Signed-off-by: Steven Rostedt

    Satoru Takeuchi
     

21 Jan, 2014

1 commit

  • Pull ktest updates from Steven Rostedt:
    "Here's some basic updates to ktest.pl. They include:

    - add config to modify the signal to terminate console
    - update to documentation (missing some config options)
    - add KERNEL_VERSION variable to use for other configs
    - add '=~' to let configs eval other configs
    - add BISECT_TRIES to run multiple tests per git bisect good"

    * tag 'ktest-v3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest:
    ktest: Add BISECT_TRIES to bisect test
    ktest: Add eval '=~' command to modify variables in config file
    ktest: Add special variable ${KERNEL_VERSION}
    ktest: Add documentation of CLOSE_CONSOLE_SIGNAL
    ktest: Make the signal to terminate the console configurable

    Linus Torvalds
     

19 Jan, 2014

1 commit

  • 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: "Paul E. McKenney"
    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     

12 Dec, 2013

1 commit

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

    Steven Rostedt (Red Hat)