1
0
Fork 0
Commit Graph

237 Commits (c7c98fd37653955d3a17dd4f1fa67aba070096a9)

Author SHA1 Message Date
Steven Rostedt (Red Hat) 9972fc0b85 ktest: Fix make_min_config to handle new assign_configs call
Commit 6071c22e17 "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 <rostedt@goodmis.org>
2014-11-21 19:38:56 -05:00
Michal Marek 52d21580b3 ktest: Use make -s kernelrelease
The previous tail -1 broke with commit 7ff525712a ("kbuild: fake the
"Entering directory ..." message more simply")

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

Reported-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-11-21 19:37:56 -05:00
Steven Rostedt (Red Hat) d832d74338 ktest: Don't bother with bisect good or bad on replay
If git bisect reply is being used in the bisect tests, don't bother
doing the git bisect good or git bisect bad calls. The git bisect
reply will override them anyway, and that's called immediately
after the other two. Going the git bisect (good|bad) is just a
waste of time.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-10-07 16:34:25 -04:00
Steven Rostedt (Red Hat) 995bc43140 ktest: Fix check for new kernel success on rebooting to good kernel
The reboot function when rebooting back to a good kernel has a check
to make sure that a new kernel was indeed booted. But that check
uses a timeout value, which when calling the monitor will still
return success if the timeout is hit (no bug was found). It should
return an error to let the reboot code know that a new kernel was
not reached. Only the reboot code checks the return value of the
monitor.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-10-07 16:31:07 -04:00
Chris J Arges fee9d3e61d ktest: add ability to skip during BISECT_MANUAL
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 <satoru.takeuchi@gmail.com>
Signed-off-by: Chris J Arges <chris.j.arges@canonical.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-09-19 20:12:52 -04:00
Steven Rostedt (Red Hat) 23a0e1611b ktest: Add PATCHCHECK_CHERRY
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 <rostedt@goodmis.org>
2014-09-19 20:10:39 -04:00
Steven Rostedt (Red Hat) 4c16b1d6d5 ktest: Update documentation on config_bisect
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 <rostedt@goodmis.org>
2014-04-23 23:18:29 -04:00
Steven Rostedt (Red Hat) 4cc559bd1d ktest: Add the config bisect manual back
After the rewrite of the config bisect, the bisect manual was
removed. Add it back.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-04-23 23:18:26 -04:00
Steven Rostedt (Red Hat) 4186cb4518 ktest: Remove unused functions
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 <rostedt@goodmis.org>
2014-04-23 23:18:25 -04:00
Steven Rostedt (Red Hat) c4d1d11f3b ktest: Put back in the CONFIG_BISECT_CHECK
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 <rostedt@goodmis.org>
2014-04-23 23:18:20 -04:00
Steven Rostedt (Red Hat) 6071c22e17 ktest: Rewrite the config-bisect to actually work
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 <rostedt@goodmis.org>
2014-04-23 23:18:15 -04:00
Satoru Takeuchi 5269faad27 ktest: Some cleanup for improving readability
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 <satoru.takeuchi@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-04-23 23:18:12 -04:00
Satoru Takeuchi f983a2bc9d ktest: add 2nd parameter of run_command() to set the redirect target file
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 <satoru.takeuchi@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-04-23 23:18:09 -04:00
Satoru Takeuchi 62183dcac5 ktest: Set CLOSE_CONSOLE_SIGNAL in the kvm.conf
As mentioned at commit 5a5d8e4844, 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 <satoru.takeuchi@gmail.com>
[ Typo fixed by ]
Signed-off-by: MUNEDA Takahiro <muneda.takahiro@jp.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-02-26 15:26:24 -05:00
Linus Torvalds 9451ee2d17 Here's some basic updates to ktest.pl. They include:
o Add config to modify the signal to terminate console
  o Update to documentation (missing some config options)
  o Add KERNEL_VERSION variable to use for other configs
  o Add '=~' to let configs eval other configs
  o Add BISECT_TRIES to run multiple tests per git bisect good
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.15 (GNU/Linux)
 
 iQEcBAABAgAGBQJS3UMjAAoJEKQekfcNnQGuU/YH/RdTp8o6GgHfBans6vG588mZ
 CoTOhfYH9loGTAcs8JqKt0sIBaPDmdF1Qur+nthBJ/vqyFSpRtaoCLTTvNTb8Snh
 Wia5DEpi4BnfH3TMyMqNVCyXJjO8wkxq7bv5wB1+pqVnIDADlX5xejOVCDms2scm
 EUXQeZx38KrFHH2ZvrjzjrGjIboKB/vTriqF8Q/Vmu0lRYo+Lt6HkDUEJEehxeLz
 oU+oQOuep5ABo1APMYIml9YZqBeJJuCeqKd75T3QfgWyyCaYLv1ggHXG/bymBROX
 uTd/RK3lKC/ODkVi9u57a4djptYYUW6mTDkUcLO3lZhqhVKqSiOQt0B9Bw/JTdQ=
 =+mEf
 -----END PGP SIGNATURE-----

Merge tag 'ktest-v3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest

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
2014-01-20 09:39:18 -08:00
Steven Rostedt (Red Hat) 961d9cacee ktest: Add BISECT_TRIES to bisect test
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" <paulmck@linux.vnet.ibm.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-01-18 19:52:13 -05:00
Steven Rostedt (Red Hat) c75d22d9c6 ktest: Add eval '=~' command to modify variables in config file
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 <rostedt@goodmis.org>
2013-12-11 21:16:59 -05:00
Steven Rostedt (Red Hat) 8e80bf05ff ktest: Add special variable ${KERNEL_VERSION}
Add a special variable that can be used in other variables called
${KERNEL_VERSION}. This will embed the current kernel version into
the variable. For example:

WARNINGS_FILE = ${OUTPUT_DIR}/warnings-${KERNEL_VERSION}

If the current version is v3.8 then the WARNINGS_FILE will become

  ${OUTPUT_DIR}/warnings-v3.8

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2013-12-11 15:53:31 -05:00
Steven Rostedt (Red Hat) 298a0d1d57 ktest: Add documentation of CLOSE_CONSOLE_SIGNAL
The sample.conf file needs to document all available options.
With the new CLOSE_CONSOE_SIGNAL option, it too needs to be
document.

Cc: Satoru Takeuchi <satoru.takeuchi@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2013-12-03 12:02:36 -05:00
Satoru Takeuchi 5a5d8e4844 ktest: Make the signal to terminate the console configurable
Currently ktest sends SIGINT to terminate the console.
 However, there are consoles which do not exit by this signal, for example,
 in my case, "virsh console <guest OS>". In such case, ktest is blocked in
 close_console(). It prevents this automate test.

This patch adds new option CLOSE_CONSOLE_SIGNAL which mean the
signal to terminate the console. Since its default value is "INT",
the original behavior isn't changed.

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

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2013-12-03 11:56:07 -05:00
Guenter Roeck 4b08478422 Drop support for Renesas H8/300 (h8300) architecture
H8/300 has been dead for several years, and the kernel for it
has not compiled for ages. Drop support for it.

Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-09-16 18:19:04 -07:00
Masanari Iida 8b513d0cf6 treewide: Fix typo in printk
Correct spelling typo in various part of drivers

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-05-28 12:02:13 +02:00
Steven Rostedt (Red Hat) df5f7c6601 ktest: Reset grub menu cache with different machines
Different tests may use a different machine. In such cases, we need to
try to get the current grub menu index. If the same grub menu is used
for two different machines, it may not be at the same index on the
second machine. A search for the index must be performed again.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2013-04-24 16:03:30 -04:00
Steven Rostedt (Red Hat) 752d96657c ktest: Allow tests to use different GRUB_MENUs
To save connecting and searching for a given grub menu for each test,
ktest.pl will cache the grub number it found. The problem is that
different tests might use a different grub menu, but ktest.pl will
ignore it.

Instead, have ktest.pl check if the grub menu it used to cache the
content is the same as when it grabbed the menu. If not, grab it again,
otherwise just return the cached value.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2013-03-08 09:33:35 -05:00
Steven Rostedt (Red Hat) 7328735cbf ktest: Remove indexes from warnings check
The index of a line where a warning is tested can be returned
differently on different versions of gcc (or same version compiled
differently). That is, a tab + space can give different results. This
causes the warning check to produce a false positive. Removing the
index from the check fixes this issue.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2013-02-18 09:35:49 -05:00
Steven Rostedt (Red Hat) 4c0b67a27d ktest: Ignore warnings during reboot
The reboot just wants to get to the next kernel. But if a warning (Call
Trace) appears, the monitor will report an error, and the reboot will
think something went wrong and power cycle the box, even though we
successfully made it to the next kernel.

Ignore warnings during the reboot until we get to the next kernel. It
will still timeout if we never get to the next kernel and then a power
cycle will happen. That's what we want it to do.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2013-02-05 10:02:37 -05:00
Steven Rostedt (Red Hat) d684553623 ktest: Search for linux banner for successful reboot
Sometimes when a test kernel passed fine, but on reboot it crashed,
ktest could get stuck and not proceed. This would be frustrating if you
let a test run overnight to find out the next morning that it was stuck
on the first test.

To fix this, I made reboot check for the REBOOT_SUCCESS_LINE. If the
line was not detected, then it would power cycle the box.

What it didn't cover was if the REBOOT_SUCCESS_LINE wasn't defined or if
a 'good' kernel did not display the line. Instead have it search for the
Linux banner "Linux version". The reboot just needs to get to the start
of the next kernel, it does not need to test if the next kernel makes it
to a boot prompt.

After we find the next kernel has booted, then we just wait for either
the REBOOT_SUCCESS_LINE to appear or the timeout.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2013-02-05 10:00:20 -05:00
Steven Rostedt (Red Hat) 4283b169ab ktest: Add make_warnings_file and process full warnings
Although the patchcheck test checks for warnings in the files that were
changed, this check does not catch warnings that were caused by header
file changes and the warnings appear in C files not touched by the
commit.

Add a new option called WARNINGS_FILE. If this option is set, then the
file it points to is read before bulid, and the file should contain a
list of known warnings. If a warning appears in the build, this file is
checked, and if the warning does not exist in this file, then it fails
the build showing the new warning.

If the WARNINGS_FILE points to a file that does not exist, this will
cause any warning in the build to fail.

A new test is also added called "make_warnings_file". This test will
create do a build and record any warnings it finds into the
WARNINGS_FILE. This test is something that can be run before other tests
to build a warnings file of "known warnings", ie, warnings that were
there before your changes.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2013-01-31 10:24:56 -05:00
Steven Rostedt (Red Hat) 04262be3db ktest: Allow a test option to use its default option
Options are allowed to use other options, for example:

  LOG_FILE = ${OUTPUT_DIR}/${MACHINE}.log

where the option LOG_FILE used the options OUTPUT_DIR and MACHINE.

But if a test option were to use a default option, it will not get
substituted:

  OUTPUT_DIR = ${THIS_DIR}/${MACHINE}

  TEST_START
  OUTPUT_DIR = ${OUTPUT_DIR}/t1

For the above test, OUTPUT_DIR will stay literally "${OUTPUT_DIR}/t1"
and not be converted to "${THIS_DIR}/${MACHINE}/t1". When the test runs,
it will pass the ${OUTPUT_DIR} to the shell, which would probaly
interpret it as "", and the output directory will end up as "/t1".

Change the code where if a test option has its own option name in
its defined field, and a default option exists, then substitute the
default option in its place.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2013-01-31 10:24:53 -05:00
Steven Rostedt (Red Hat) 35275685bf ktest: Strip off '\n' when reading which files were modified
The patchcheck test looks at what files are modified for each patch it
checks and makes sure that those files do not produce any warnings.

Unfortunately, when it read the diffstat, the newlines were added on the
files and this made compares miss warnings, and commits that should not
have passed, ktest let pass.

Fix this by using the perl command "chomp" that strips off whitespace at
the end of lines.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2013-01-30 12:28:15 -05:00
Steven Rostedt (Red Hat) 319ab14f05 ktest: Do not require CONSOLE for build or install bisects
If the user is doing a build or install bisect, there's no reason to
have them define CONSOLE, as the console does not need to be read. The
console only needs to be read for boot tests.

CONSOLE is not required for normal build or install tests, let's not
require it for bisect tests with BISECT_TYPE of build or install.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2013-01-30 12:25:38 -05:00
Steven Rostedt e1a6c3d748 ktest: Test if target machine is up before install
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 <rostedt@goodmis.org>
2012-12-11 21:19:41 -05:00
Steven Rostedt 1892517056 ktest: Fix breakage from change of oldnoconfig to olddefconfig
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: Steven Rostedt <rostedt@goodmis.org>
2012-12-11 20:23:22 -05:00
Steven Rostedt 7786954c95 ktest: Add native support for syslinux boot loader
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 <hpa@zytor.com>
Cc: John 'Warthog9' Hawley <warthog9@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2012-12-11 18:18:46 -05:00
Steven Rostedt a496872212 ktest: Sync before reboot
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 <rostedt@goodmis.org>
2012-12-11 14:59:05 -05:00
Steven Rostedt a15ba91361 ktest: Add support for grub2
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 <rostedt@goodmis.org>
2012-11-13 14:30:37 -05:00
Steven Rostedt 8bc5e4ea3e ktest: Fix ktest confusion with CONFIG_MODULES_USE_ELF_RELA
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 <rostedt@goodmis.org>
2012-10-26 00:10:32 -04:00
Linus Torvalds 35e9a274fd Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
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.
2012-10-12 10:28:52 +09:00
Linus Torvalds 6977b4c773 ktest update for v3.7
Fix parsing of ELSE IF in reading config file.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQEcBAABAgAGBQJQaZ0mAAoJEOdOSU1xswtMVzsIAIXFrMbOkDyo3brW0IVv3z1x
 EnZ6NPzIoEnQbAsiLT52tFJH3+C+c7vjKrEQx8OxsDaElv+pAuR9TOPJlxoGBd21
 wzQNXtdxDcGQKgWvOn/9ebkBAFe4GnWSWZc+LykI8QioQAitSIJfTu38a4Dyu2pG
 KZqpd+LHDeE+N5jg/tmT3sVCYOmR6Oui9rzqkhkVoGNlNZ6Q3ndPAAcv6A4lf7z8
 4UOAp/B8f6wbJblMPCjwcle1rMk6gfQ7Kcbli/Xm7U7cBwNhv/HJwWk9Zh/LrUjM
 3RVWJ1mXNVp0cTTKfAHrAWEWgm+vJtIkItnSWkkJnU3qwYltE0vs/CwIHOkeAFc=
 =lE0h
 -----END PGP SIGNATURE-----

Merge tag 'ktest-v3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest

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
2012-10-01 10:13:47 -07:00
Linus Torvalds 99dbb1632f Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
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
  ...
2012-10-01 09:06:36 -07:00
Adam Lee fb16d8912d kconfig: replace 'oldnoconfig' with 'olddefconfig', and keep the old name as an alias
As 67d34a6a39 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 <adam8157@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-09-27 18:18:07 +02:00
Steven Rostedt 95f5783841 ktest: Fix ELSE IF statements
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 <rostedt@goodmis.org>
2012-09-26 14:48:17 -04:00
Masanari Iida ce8283d56c tools/testing: fix comment / output typos
Correct spelling typo in tools/testing

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-01 08:48:19 -07:00
Steven Rostedt 8fddbe9bbf ktest: Allow perl regex expressions in conditional statements
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 <rostedt@goodmis.org>
2012-07-30 14:37:01 -04:00
Steven Rostedt 9b1d367dbb ktest: Ignore errors it tests if IGNORE_ERRORS is set
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 <rostedt@goodmis.org>
2012-07-30 14:33:55 -04:00
Steven Rostedt c1434dcc57 ktest: Reset saved min (force) configs for each test
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 <rostedt@goodmis.org>
2012-07-20 22:39:16 -04:00
Steven Rostedt 8a80c72711 ktest: Add check for bug or panic during reboot
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 <rostedt@goodmis.org>
2012-07-19 16:11:21 -04:00
Steven Rostedt 407b95b7a0 ktest: Add MAX_MONITOR_WAIT option
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 <rostedt@goodmis.org>
2012-07-19 16:05:42 -04:00
Steven Rostedt cf79fab676 ktest: Fix config bisect with how make oldnoconfig works
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 <rostedt@goodmis.org>
2012-07-19 15:29:43 -04:00
Steven Rostedt b091861254 ktest: Add CONFIG_BISECT_CHECK option
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 <rostedt@goodmis.org>
2012-07-19 15:26:00 -04:00
Steven Rostedt e5c2ec11a0 ktest: Add PRE_INSTALL option
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 <rostedt@goodmis.org>
2012-07-19 15:22:05 -04:00
Steven Rostedt 921ed4c720 ktest: Add PRE/POST_KTEST and TEST options
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 <rostedt@goodmis.org>
2012-07-19 15:18:27 -04:00
Steven Rostedt 958d8435c2 ktest: Remove commented exit
A debug 'exit' was left in ktest.pl. Remove it.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2012-07-19 15:17:23 -04:00
Jesper Juhl 11c38b7575 ktest: Change singular "paranthesis" to plural "parentheses"
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2012-05-23 10:19:09 -04:00
Steven Rostedt 24d0c03014 ktest: Add README to explain what is in the examples directory
Add a README that explains what the different example configs in the
ktest example directory are about.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2012-05-22 00:15:12 -04:00
Steven Rostedt b6d300361b ktest: Add the snowball.conf example config
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 <rostedt@goodmis.org>
2012-05-22 00:13:32 -04:00
Steven Rostedt 2e10952622 ktest: Add an example config that does cross compiling of several archs
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 <rostedt@goodmis.org>
2012-05-22 00:11:00 -04:00
Steven Rostedt 3a7bef7917 ktest: Add kvm.conf example config
Add an example config that explains how to use ktest with a virtual
guest as the target.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2012-05-22 00:10:12 -04:00
Steven Rostedt 6d76f469c8 ktest: Add useful example configs
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 <rostedt@goodmis.org>
2012-05-22 00:08:30 -04:00
Steven Rostedt 43de3316e9 ktest: Add USE_OUTPUT_MIN_CONFIG to avoid prompt on make_min_config
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 <rostedt@goodmis.org>
2012-05-22 00:07:34 -04:00
Steven Rostedt ccc513b688 ktest: Add MIN_CONFIG_TYPE to allow making a minum .config that has network
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 <rostedt@goodmis.org>
2012-05-21 17:13:40 -04:00
Steven Rostedt 683a3e6481 ktest: Fix kernelrevision with POST_BUILD
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 <rostedt@goodmis.org>
2012-05-18 14:27:51 -04:00
Steven Rostedt 759a3cc625 ktest: Fix reboot on success stopping all reboots
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 <rostedt@goodmis.org>
2012-05-01 08:25:48 -04:00
Russ Dill 5158ba3ea7 ktest.pl: Fix combined usage of BISECT_REVERSE and BISECT_SKIP
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 <Russ.Dill@ti.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2012-05-01 08:25:44 -04:00
Linus Torvalds f0a5ec0e8d ktest for v3.4
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPafMcAAoJEIy3vGnGbaoALNUQAMZ8G+WDXD/RKtsO4V41rWOa
 vCCUQ6BDTld53fLdTMwYBH9Uev9LLsQ/itOp8ne/apVn5DCghqm1rAfd5sIk9TaQ
 zqnvF8QvZXnPCbUZe8mXH4ki2Shh+mvxkucAtsC9C4RBcu8QloIy7UGZPioEVxYj
 TiadqKNicvSSIvEy3fM98qzbVu+GZZpZwfH0asiWV4rxLLovWNn2Ly7BGPLLHWa8
 iamWVyG9QS51MzyEAxo4LBWGA4aK0k6+W5QxK2SmruA7g0YWzBf3DU5CfsXncj43
 eOs/aVkBApPPIJ/VQDuhbdHAY+wIQAItojVAbSdebv0xC4SDtLbHHAgMVNtgLOIa
 ysfLI+h8APbOh4nyqwNh5FuSnew4QvR1ZW47bZHmN7K7NjmcJ93geEvt//7eQnxz
 X0iWJSCwAOyKORgsPU0lZgGM1lD50Qtmt1IZX5T87ksDSIhx5Lk/pAQo43nByj3g
 e53swGxIQyaUqJwQ5ItJh7e8jQBZ6eyZDEWslro2S6uV9MFJnrH+cJJSk4LqO94y
 dTu4uk/aCyXH3fbk1qfincfn5bzCvlrbSMsldbU6ODLFqyr8R1I8kcTZy/2k3i4q
 eURDh94D6HEuu/QL1NvB5dKkuOfxmH3dr3S/5xv/IfIxruC+N+jGns0rmoFiE0KO
 pnThls+OFAXhrw7YhV2d
 =2NU4
 -----END PGP SIGNATURE-----

Merge tag 'ktest-v3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest

Pull ktest changes from Steven Rostedt.

* tag 'ktest-v3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest:
  ktest: Allow a test to override REBOOT_ON_SUCCESS
  ktest: Fix SWITCH_TO_GOOD to also reboot the machine
  ktest: Add SCP_TO_TARGET_INSTALL option
  ktest: Add warning when bugs are ignored
  ktest: Add INSTALL_MOD_STRIP=1 when installing modules
2012-03-23 09:28:45 -07:00
Steven Rostedt 648a182c61 ktest: Allow a test to override REBOOT_ON_SUCCESS
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 <rostedt@goodmis.org>
2012-03-21 11:18:27 -04:00
Steven Rostedt 769df641cc ktest: Fix SWITCH_TO_GOOD to also reboot the machine
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 <rostedt@goodmis.org>
2012-03-21 08:24:57 -04:00
Steven Rostedt 02ad261704 ktest: Add SCP_TO_TARGET_INSTALL option
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 <rostedt@goodmis.org>
2012-03-21 08:21:24 -04:00
Steven Rostedt 6ca996cc7c ktest: Add warning when bugs are ignored
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 <rostedt@goodmis.org>
2012-03-21 08:18:35 -04:00
Steven Rostedt 627977d83a ktest: Add INSTALL_MOD_STRIP=1 when installing modules
To keep the modules from bloating the target's filesystem
strip them during the install.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2012-03-21 08:16:15 -04:00
Linus Torvalds 69a7aebcf0 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
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
  ...
2012-03-20 21:12:50 -07:00
Linus Torvalds 586c6e7013 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 tesing
 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.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPTBMbAAoJEIy3vGnGbaoACVAQAONDPEJZZgvtsqgLkNrqBsym
 /Z+SH+eAtJVHEMgvBMHh5fLSkccTZKM8jyi1b/iEsbmzZY3tVuDrvZ8YJYk+lcdO
 PUrIkSIhySxwenD8oqY3rmKNS3UhcmFG7rQGLfNPuQC8yorMaANHDqpVs4uauhWQ
 jgvUAGwoacqNxsH+dON4g3aVSbCZrIa1M7IqvjOQlaX5j6BppVFE1dAp12060q1b
 AjsZgNaTGUQxbZzEikIPDq7ey0RW180CtYriL8xZgRZMN0ly+7wvDYefCZQvNjRx
 9v4aCUKZoc2bFCGD+haU9HKkkKHEVw3C2I8YV16ImcY3wmuYCEYGoqtZBFJfuPXQ
 0JYj6jrh2g4XnKQ/uekf7hyHYHW7NNb5rbHJExrk4gQTNKUSS3fbrGTK1KZW0+TH
 gXaSJHce+0d1iDZkmgKsGinU5hKoas4z0X4yEtCFHI3kKJGLnN7eNv0yYPheUtKu
 MsacHK1Yyu6wtedpclo5sWZl/ynQ6nrviE33nNqKTUstcZMqU4U6AXZrW2sNkX+3
 6sbCwQlEOhlqyaxzKzOHB5ezR6WzcPAXLIV7m041573znXHjL9AQx+SwcvVVLxuN
 l83L5JA69pB3nKqzGjjJgnAQt1aeEVgYuO1Q2MxgrHwEbnnanG/jcDVVT5pXCFAP
 ikoyZ5rzFZmzEXXcAR7h
 =wlL8
 -----END PGP SIGNATURE-----

Merge tag 'ktest-fix-make-min-failed-build-for-real' of git://git.kernel.org/pub/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
2012-02-27 15:43:05 -08:00
Steven Rostedt bf1c95abaf ktest: Fix make_min_config test when build fails
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 <rostedt@goodmis.org>
2012-02-27 13:58:49 -05:00
Masanari Iida f9dee311e5 tools: Fix typo in ktest.pl
Correct spelling "faied" to "failed" in
tools/testing/ktest/ktest.pl

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-02-21 11:40:35 +01:00
Linus Torvalds 5d48421be3 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest
* '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
2012-01-16 17:53:27 -08:00
Linus Torvalds 98793265b4 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* '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)
2012-01-08 13:21:22 -08:00
Steven Rostedt be405f95f0 ktest: Add INGORE_ERRORS to ignore warnings in boot up
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 <rostedt@goodmis.org>
2012-01-04 21:56:49 -05:00
Steven Rostedt 96f6a0df19 ktest: Still do reboot even for REBOOT_TYPE = script
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 <rostedt@goodmis.org>
2012-01-04 21:47:16 -05:00
Al Viro d36b691077 misc latin1 to utf8 conversions
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-01-02 13:04:55 +01:00
Steven Rostedt c2857cb4a8 ktest: Fix compare script to test if options are not documented
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 <rostedt@goodmis.org>
2011-12-22 22:06:59 -05:00
Steven Rostedt 9cc9e091ed ktest: Detect typos in option names
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 <rostedt@goodmis.org>
2011-12-22 22:02:35 -05:00
Steven Rostedt b5f4aea687 ktest: Have all values be set by defaults
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 <rostedt@goodmis.org>
2011-12-22 22:00:52 -05:00
Steven Rostedt 4f43e0dcaf ktest: Change initialization of defaults hash to perl format
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 <rostedt@goodmis.org>
2011-12-22 21:59:44 -05:00
Steven Rostedt bc7c580377 ktest: Add options SWITCH_TO_GOOD and SWITCH_TO_TEST
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 <rostedt@goodmis.org>
2011-12-22 21:59:41 -05:00
Steven Rostedt c5dacb88f0 ktest: Allow overriding bisect test results
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 <rostedt@goodmis.org>
2011-12-22 21:59:38 -05:00
Steven Rostedt cad9666980 ktest: Evaluate options before processing them
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 <rostedt@goodmis.org>
2011-12-22 21:59:36 -05:00
Steven Rostedt 2b29b2f8f8 ktest: Evaluate $KERNEL_VERSION in both install and post install
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 <rostedt@goodmis.org>
2011-12-22 21:59:33 -05:00
Steven Rostedt 165708b273 ktest: Only ask options needed for install
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 <rostedt@goodmis.org>
2011-12-22 21:59:30 -05:00
Steven Rostedt dbd3783b4d ktest: When creating a new config, ask for BUILD_OPTIONS
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 <rostedt@goodmis.org>
2011-12-22 21:59:26 -05:00
Steven Rostedt bb8474b181 ktest: Do not ask for some options if the only test is build
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 <dvhart@linux.intel.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2011-12-22 21:59:22 -05:00
Steven Rostedt c4261d0f62 ktest: Ask for type of test when creating a new config
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 <rostedt@goodmis.org>
2011-12-22 21:59:13 -05:00
Steven Rostedt dad9875492 ktest: Allow bisect test to restart where it left off
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 <rostedt@goodmis.org>
2011-12-22 21:59:01 -05:00
Steven Rostedt 0e7a22de25 ktest: When creating new config, allow the use of ${THIS_DIR}
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 <rostedt@goodmis.org>
2011-11-23 15:55:41 -05:00
Steven Rostedt 600bbf0aa2 ktest: Add default for ssh-user, build-target and target-image
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 <rostedt@goodmis.org>
2011-11-21 20:12:04 -05:00
Rabin Vincent de5b6e3bf5 ktest: Allow success logs to be stored
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 <rabin@rab.in>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2011-11-18 12:04:33 -05:00
Rabin Vincent a9dd5d6317 ktest: Save test output
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 <rabin@rab.in>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2011-11-18 12:03:27 -05:00
Rabin Vincent f9dfb65b05 ktest: Check parent options for iterated tests
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 <rabin@rab.in>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2011-11-18 11:07:24 -05:00
Steven Rostedt 815e2bd7d6 ktest: Evaluate variables entered on the command line
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 <rostedt@goodmis.org>
2011-10-28 07:01:40 -04:00
Steven Rostedt 7bf5107347 ktest: Add variable ${PWD}
Adding the variable ${PWD} that equals `pwd` makes the config files
much simpler.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2011-10-22 09:07:03 -04:00
Steven Rostedt 9f7424cc86 ktest: Add another monitor flush before installing kernel
On some tests that do multiple boots (patchcheck, bisect, etc), the build
of the next kernel to run may finish before the stable kernel has finished
booting. Then the install of the new kernel will fail when it tries to connect
as the machine has not finished the boot process.

Do one more monitor flush to make sure the machine is up and running before
trying to connect to it again.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2011-10-22 08:58:19 -04:00