2019-09-23 02:02:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-01-13 00:36:57 +01:00
|
|
|
|
2021-05-26 14:24:06 -07:00
|
|
|
|
2019-09-23 02:02:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-12 07:25:55 -07:00
|
|
|
|
2020-10-26 18:59:25 +02:00
|
|
|
|
2020-03-16 13:21:25 -07:00
|
|
|
|
2021-10-04 18:13:40 -07:00
|
|
|
|
|
|
|
|
|
2020-03-16 13:21:25 -07:00
|
|
|
|
2019-09-23 02:02:43 -07:00
|
|
|
|
2020-03-16 13:21:25 -07:00
|
|
|
|
2021-05-26 14:24:06 -07:00
|
|
|
|
2019-09-23 02:02:43 -07:00
|
|
|
|
|
|
|
|
|
2020-10-26 18:59:25 +02:00
|
|
|
|
2021-11-19 15:23:16 -08:00
|
|
|
|
2021-05-21 21:42:40 -07:00
|
|
|
|
2020-03-16 13:21:25 -07:00
|
|
|
|
2020-10-26 18:59:26 +02:00
|
|
|
|
2021-05-26 14:24:06 -07:00
|
|
|
|
|
|
|
|
|
2019-09-23 02:02:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-09 13:49:09 -07:00
|
|
|
|
2019-09-23 02:02:43 -07:00
|
|
|
|
|
|
|
|
|
2021-05-26 14:24:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-01-14 16:39:11 -08:00
|
|
|
|
2019-09-23 02:02:43 -07:00
|
|
|
|
2020-07-08 14:35:43 -07:00
|
|
|
|
2019-09-23 02:02:43 -07:00
|
|
|
|
2020-09-30 11:31:51 -07:00
|
|
|
|
2019-09-23 02:02:43 -07:00
|
|
|
|
2020-09-30 11:31:51 -07:00
|
|
|
|
2019-09-23 02:02:43 -07:00
|
|
|
|
2022-05-09 13:49:09 -07:00
|
|
|
|
2021-05-26 14:24:06 -07:00
|
|
|
|
|
|
|
|
|
2022-01-18 11:09:22 -08:00
|
|
|
|
2021-05-26 14:24:06 -07:00
|
|
|
|
|
|
|
|
|
2022-01-18 11:09:22 -08:00
|
|
|
|
|
|
|
|
|
2021-05-26 14:24:06 -07:00
|
|
|
|
|
|
|
|
|
2020-03-23 12:04:59 -07:00
|
|
|
|
|
|
|
|
|
2021-05-26 14:24:06 -07:00
|
|
|
|
2019-09-23 02:02:43 -07:00
|
|
|
|
2020-07-08 14:35:43 -07:00
|
|
|
|
2019-09-23 02:02:43 -07:00
|
|
|
|
2020-09-30 11:31:51 -07:00
|
|
|
|
2019-09-23 02:02:43 -07:00
|
|
|
|
2020-09-30 11:31:51 -07:00
|
|
|
|
2019-09-23 02:02:43 -07:00
|
|
|
|
2022-01-18 11:09:22 -08:00
|
|
|
|
|
|
|
|
|
2021-05-26 14:24:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-10-04 18:13:40 -07:00
|
|
|
|
|
|
|
|
|
2021-05-26 14:24:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-11-05 18:30:57 -07:00
|
|
|
|
2021-05-26 14:24:06 -07:00
|
|
|
|
|
|
|
|
|
2021-10-04 18:13:40 -07:00
|
|
|
|
2021-05-26 14:24:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-12 07:25:55 -07:00
|
|
|
|
2021-05-26 14:24:06 -07:00
|
|
|
|
|
|
|
|
|
2022-05-12 07:25:55 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-05-26 14:24:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-01-18 11:09:22 -08:00
|
|
|
|
2020-03-16 13:21:25 -07:00
|
|
|
|
|
|
|
|
|
2022-01-18 11:09:22 -08:00
|
|
|
|
2020-09-23 14:19:38 -07:00
|
|
|
|
|
|
|
|
|
2020-03-16 13:21:25 -07:00
|
|
|
|
2020-09-23 14:19:38 -07:00
|
|
|
|
2020-03-16 13:21:25 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-09-28 15:11:11 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-16 13:21:25 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-10-04 18:13:40 -07:00
|
|
|
|
2019-09-23 02:02:43 -07:00
|
|
|
|
2022-01-18 11:09:22 -08:00
|
|
|
|
2021-10-04 18:13:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-10-20 16:21:21 -07:00
|
|
|
|
2019-09-23 02:02:43 -07:00
|
|
|
|
2022-01-18 11:09:22 -08:00
|
|
|
|
|
|
|
|
|
2019-09-23 02:02:43 -07:00
|
|
|
|
2022-01-18 11:09:22 -08:00
|
|
|
|
|
|
|
|
|
2020-10-26 18:59:25 +02:00
|
|
|
|
2022-01-18 11:09:22 -08:00
|
|
|
|
|
|
|
|
|
2021-11-19 15:23:16 -08:00
|
|
|
|
2022-01-18 11:09:22 -08:00
|
|
|
|
|
|
|
|
|
2020-10-26 18:59:26 +02:00
|
|
|
|
2021-05-26 14:24:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-09 13:49:09 -07:00
|
|
|
|
2021-05-26 14:24:06 -07:00
|
|
|
|
kunit: tool: show list of valid --arch options when invalid
Consider this attempt to run KUnit in QEMU:
$ ./tools/testing/kunit/kunit.py run --arch=x86
Before you'd get this error message:
kunit_kernel.ConfigError: x86 is not a valid arch
After:
kunit_kernel.ConfigError: x86 is not a valid arch, options are ['alpha', 'arm', 'arm64', 'i386', 'powerpc', 'riscv', 's390', 'sparc', 'x86_64']
This should make it a bit easier for people to notice when they make
typos, etc. Currently, one would have to dive into the python code to
figure out what the valid set is.
Signed-off-by: Daniel Latypov <dlatypov@google.com>
Reviewed-by: David Gow <davidgow@google.com>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2021-09-29 16:25:34 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-05-26 14:24:06 -07:00
|
|
|
|
|
|
|
|
|
2021-06-23 12:09:19 -07:00
|
|
|
|
2021-05-26 14:24:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-12-15 12:39:23 -08:00
|
|
|
|
2021-05-26 14:24:06 -07:00
|
|
|
|
2021-10-21 17:49:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-05-26 14:24:06 -07:00
|
|
|
|
2022-05-09 13:49:09 -07:00
|
|
|
|
2019-09-23 02:02:43 -07:00
|
|
|
|
|
|
|
|
|
2021-05-26 14:24:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-11-05 18:30:58 -07:00
|
|
|
|
2021-05-26 14:24:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-16 13:21:25 -07:00
|
|
|
|
2021-05-26 14:24:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-01-14 16:39:13 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-09-23 02:02:43 -07:00
|
|
|
|
2021-02-01 12:55:14 -08:00
|
|
|
|
2021-02-22 14:52:41 -08:00
|
|
|
|
|
|
|
|
|
2021-02-01 12:55:14 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-10-26 18:59:25 +02:00
|
|
|
|
2021-11-05 18:30:57 -07:00
|
|
|
|
2021-11-05 18:30:58 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
kunit: tool: properly report the used arch for --json, or '' if not known
Before, kunit.py always printed "arch": "UM" in its json output, but...
1. With `kunit.py parse`, we could be parsing output from anywhere, so
we can't say that.
2. Capitalizing it is probably wrong, as it's `ARCH=um`
3. Commit 87c9c1631788 ("kunit: tool: add support for QEMU") made it so
kunit.py could knowingly run a different arch, yet we'd still always
claim "UM".
This patch addresses all of those. E.g.
1.
$ ./tools/testing/kunit/kunit.py parse .kunit/test.log --json | grep -o '"arch.*' | sort -u
"arch": "",
2.
$ ./tools/testing/kunit/kunit.py run --json | ...
"arch": "um",
3.
$ ./tools/testing/kunit/kunit.py run --json --arch=x86_64 | ...
"arch": "x86_64",
Signed-off-by: Daniel Latypov <dlatypov@google.com>
Reviewed-by: David Gow <davidgow@google.com>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2022-02-24 11:20:36 -08:00
|
|
|
|
|
|
|
|
|
2020-10-26 18:59:25 +02:00
|
|
|
|
2021-01-14 16:39:13 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-01-18 11:09:22 -08:00
|
|
|
|
2019-11-26 14:36:16 -08:00
|
|
|
|
2021-11-05 18:30:57 -07:00
|
|
|
|
2021-11-11 10:33:56 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-11-26 14:36:16 -08:00
|
|
|
|
2022-01-18 11:09:22 -08:00
|
|
|
|
2019-09-23 02:02:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-05-26 14:24:06 -07:00
|
|
|
|
|
|
|
|
|
2020-03-23 12:04:59 -07:00
|
|
|
|
2019-09-23 02:02:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-11-19 15:23:16 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-09-23 02:02:43 -07:00
|
|
|
|
2022-01-18 11:09:22 -08:00
|
|
|
|
2019-12-20 05:14:07 +00:00
|
|
|
|
2019-09-23 02:02:43 -07:00
|
|
|
|
2021-11-19 15:23:16 -08:00
|
|
|
|
2019-09-23 02:02:43 -07:00
|
|
|
|
2020-03-23 12:04:59 -07:00
|
|
|
|
2019-09-23 02:02:43 -07:00
|
|
|
|
2021-11-19 15:23:16 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-01-18 11:09:22 -08:00
|
|
|
|
2019-09-23 02:02:43 -07:00
|
|
|
|
2020-09-23 14:19:38 -07:00
|
|
|
|
|
|
|
|
|
2020-03-23 12:04:59 -07:00
|
|
|
|
|
|
|
|
|
2019-09-23 02:02:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-11-26 14:36:16 -08:00
|
|
|
|
2019-09-23 02:02:43 -07:00
|
|
|
|
kunit: tool: fix unintentional statefulness in run_kernel()
This is a bug that has been present since the first version of this
code.
Using [] as a default parameter is dangerous, since it's mutable.
Example using the REPL:
>>> def bad(param = []):
... param.append(len(param))
... print(param)
...
>>> bad()
[0]
>>> bad()
[0, 1]
This wasn't a concern in the past since it would just keep appending the
same values to it.
E.g. before, `args` would just grow in size like:
[mem=1G', 'console=tty']
[mem=1G', 'console=tty', mem=1G', 'console=tty']
But with now filter_glob, this is more dangerous, e.g.
run_kernel(filter_glob='my-test*') # default modified here
run_kernel() # filter_glob still applies here!
That earlier `filter_glob` will affect all subsequent calls that don't
specify `args`.
Note: currently the kunit tool only calls run_kernel() at most once, so
it's not possible to trigger any negative side-effects right now.
Fixes: 6ebf5866f2e8 ("kunit: tool: add Python wrappers for running KUnit tests")
Signed-off-by: Daniel Latypov <dlatypov@google.com>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2021-02-05 16:08:54 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-05-26 14:24:04 -07:00
|
|
|
|
2021-02-05 16:08:53 -08:00
|
|
|
|
|
|
|
|
|
2021-10-04 18:13:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-16 13:21:25 -07:00
|
|
|
|
2021-10-04 18:13:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-16 13:21:25 -07:00
|
|
|
|
2022-05-09 13:49:09 -07:00
|
|
|
|
2020-03-16 13:21:25 -07:00
|
|
|
|
|
|
|
|
|