[RFC PATCH] kunit: tool: Enable virtio/PCI by default on UML

2 views
Skip to first unread message

David Gow

unread,
Jun 21, 2022, 11:53:35 PMJun 21
to Daniel Latypov, Brendan Higgins, Shuah Khan, kuni...@googlegroups.com, linux-k...@vger.kernel.org, linux-...@vger.kernel.org, José Expósito, David Gow
There are several tests which depend on PCI, and hence need a bunch of
extra options to run under UML. This makes it awkward to give
configuration instructions (whether in documentation, or as part of a
.kunitconfig file), as two separate, incompatible sets of config options
are required for UML and "most other architectures".

For non-UML architectures, it's possible to add default kconfig options
via the qemu_config python files, but there's no equivalent for UML. Add
a new tools/testing/kunit/configs/arch_uml.config file containing extra
kconfig options to use on UML.

Signed-off-by: David Gow <davi...@google.com>
---

It's really ugly to have to type:
--kconfig_add CONFIG_VIRTIO_UML=y
--kconfig_add CONFIG_UML_PCI_OVER_VIRTIO=y
when running many tests under UML, particularly since it isn't required
on other architectures.

This came up in discussion with Daniel this morning, and while the
ability to repeat the --kunitconfig flag would go some way to alleviate
this, having to add:
--kunitconfig ./tools/testing/kunit/config/uml_pci.kunitconfig
isn't all that much better.

So it seems like adding something by default would be nice.

This implementation is not perfect (in particular, there's no easy way
of _disabling_ these options now, though [1] probably will help). The
'arch_uml.config' filename can be bikeshedded, too.

Thoughts?

---
tools/testing/kunit/configs/arch_uml.config | 5 +++++
tools/testing/kunit/kunit_kernel.py | 11 ++++++++---
2 files changed, 13 insertions(+), 3 deletions(-)
create mode 100644 tools/testing/kunit/configs/arch_uml.config

diff --git a/tools/testing/kunit/configs/arch_uml.config b/tools/testing/kunit/configs/arch_uml.config
new file mode 100644
index 000000000000..e824ce43b05a
--- /dev/null
+++ b/tools/testing/kunit/configs/arch_uml.config
@@ -0,0 +1,5 @@
+# Config options which are added to UML builds by default
+
+# Enable virtio/pci, as a lot of tests require it.
+CONFIG_VIRTIO_UML=y
+CONFIG_UML_PCI_OVER_VIRTIO=y
diff --git a/tools/testing/kunit/kunit_kernel.py b/tools/testing/kunit/kunit_kernel.py
index 3539efaf99ba..05e7b1e188d7 100644
--- a/tools/testing/kunit/kunit_kernel.py
+++ b/tools/testing/kunit/kunit_kernel.py
@@ -26,6 +26,7 @@ KUNITCONFIG_PATH = '.kunitconfig'
OLD_KUNITCONFIG_PATH = 'last_used_kunitconfig'
DEFAULT_KUNITCONFIG_PATH = 'tools/testing/kunit/configs/default.config'
BROKEN_ALLCONFIG_PATH = 'tools/testing/kunit/configs/broken_on_uml.config'
+UML_KCONFIG_PATH = 'tools/testing/kunit/configs/arch_uml.config'
OUTFILE_PATH = 'test.log'
ABS_TOOL_PATH = os.path.abspath(os.path.dirname(__file__))
QEMU_CONFIGS_DIR = os.path.join(ABS_TOOL_PATH, 'qemu_configs')
@@ -53,7 +54,7 @@ class LinuxSourceTreeOperations:
except subprocess.CalledProcessError as e:
raise ConfigError(e.output.decode())

- def make_arch_qemuconfig(self, base_kunitconfig: kunit_config.Kconfig) -> None:
+ def make_arch_config(self, base_kunitconfig: kunit_config.Kconfig) -> None:
pass

def make_allyesconfig(self, build_dir: str, make_options) -> None:
@@ -109,7 +110,7 @@ class LinuxSourceTreeOperationsQemu(LinuxSourceTreeOperations):
self._kernel_command_line = qemu_arch_params.kernel_command_line + ' kunit_shutdown=reboot'
self._extra_qemu_params = qemu_arch_params.extra_qemu_params

- def make_arch_qemuconfig(self, base_kunitconfig: kunit_config.Kconfig) -> None:
+ def make_arch_config(self, base_kunitconfig: kunit_config.Kconfig) -> None:
kconfig = kunit_config.parse_from_string(self._kconfig)
base_kunitconfig.merge_in_entries(kconfig)

@@ -137,6 +138,10 @@ class LinuxSourceTreeOperationsUml(LinuxSourceTreeOperations):
def __init__(self, cross_compile=None):
super().__init__(linux_arch='um', cross_compile=cross_compile)

+ def make_arch_config(self, base_kunitconfig: kunit_config.Kconfig) -> None:
+ kconfig = kunit_config.parse_file(UML_KCONFIG_PATH)
+ base_kunitconfig.merge_in_entries(kconfig)
+
def make_allyesconfig(self, build_dir: str, make_options) -> None:
kunit_parser.print_with_timestamp(
'Enabling all CONFIGs for UML...')
@@ -313,7 +318,7 @@ class LinuxSourceTree:
return self.build_config(build_dir, make_options)

existing_kconfig = kunit_config.parse_file(kconfig_path)
- self._ops.make_arch_qemuconfig(self._kconfig)
+ self._ops.make_arch_config(self._kconfig)
if self._kconfig.is_subset_of(existing_kconfig) and not self._kunitconfig_changed(build_dir):
return True
print('Regenerating .config ...')
--
2.37.0.rc0.104.g0611611a94-goog

Daniel Latypov

unread,
Jun 22, 2022, 12:00:10 PMJun 22
to David Gow, Brendan Higgins, Shuah Khan, kuni...@googlegroups.com, linux-k...@vger.kernel.org, linux-...@vger.kernel.org, José Expósito
I assume the missing link for [1] is
https://lore.kernel.org/linux-kselftest/20220520224200.3...@google.com/
Note that we'll have to update one of these patches depending on the
order they go in.

[1] had to change make_arch_qemuconfig() to ensure that arch/qemu
configs have *lower* priority than user-specified overrides.
So we'll either need to do the same here or update [1] for this to work out.

> 'arch_uml.config' filename can be bikeshedded, too.
>
> Thoughts?

I was initially against effectively hard-coding these in, but it feels
like making CONFIG_PCI=y work by default on UML is worth it.

We've talked about architecture-specific options in kunitconfig files
and it's only ever been about PCI. Nothing else has come up yet, so
this patch would eliminate that concern for now.

Brendan Higgins

unread,
Jun 23, 2022, 3:30:27 PMJun 23
to David Gow, Daniel Latypov, Shuah Khan, kuni...@googlegroups.com, linux-k...@vger.kernel.org, linux-...@vger.kernel.org, José Expósito
On Tue, Jun 21, 2022 at 8:53 PM David Gow <davi...@google.com> wrote:
>
I am supportive of adding the PCI dependency as a default for UML; I
agree that there is a common desire to use PCI for tests and enabling
it on UML is wonky.

One additional note: It looks like this patch breaks kunit_tool:
https://linux-review.googlesource.com/c/linux/kernel/git/torvalds/linux/+/21871

The python error in the log seems legitimate:
https://storage.googleapis.com/oss-prow/pr-logs/pull/linux-review.googlesource.com_linux_kernel_git_torvalds_linux/21871/linux-kernel-mailing-list-presubmit/1539456886976286720/build-log.txt

This line in particular:

AttributeError: 'LinuxSourceTreeOperationsUml' object has no attribute
'make_arch_qemuconfig'

David Gow

unread,
Jun 24, 2022, 4:44:07 AMJun 24
to Daniel Latypov, Brendan Higgins, Shuah Khan, David Gow, José Expósito, kuni...@googlegroups.com, linux-k...@vger.kernel.org, linux-...@vger.kernel.org
There are several tests which depend on PCI, and hence need a bunch of
extra options to run under UML. This makes it awkward to give
configuration instructions (whether in documentation, or as part of a
.kunitconfig file), as two separate, incompatible sets of config options
are required for UML and "most other architectures".

For non-UML architectures, it's possible to add default kconfig options
via the qemu_config python files, but there's no equivalent for UML. Add
a new tools/testing/kunit/configs/arch_uml.config file containing extra
kconfig options to use on UML.

Signed-off-by: David Gow <davi...@google.com>
---

NOTE: This has dependencies on the 'make --kunitconfig repeatable'
series:
https://lore.kernel.org/linux-kselftest/20220624001247.3...@google.com/
which, in turn, depends on:
https://lore.kernel.org/linux-kselftest/20220520224200.3...@google.com/
Please apply those first.

Changes since RFC:
https://lore.kernel.org/linux-kselftest/20220622035326.7...@google.com/
- Rebase on top of the previous kconfig patches.
- Fix a missing make_arch_qemuconfig->make_arch_config rename (Thanks
Brendan)
- Fix the tests to use the base LinuxSourceTreeOperations class, which
has no default kconfig options (and so won't conflict with those set
in the tests). Only test_build_reconfig_existing_config actually
failed, but I updated a few more in case the defaults changed.


---
tools/testing/kunit/configs/arch_uml.config | 5 +++++
tools/testing/kunit/kunit_kernel.py | 14 ++++++++++----
tools/testing/kunit/kunit_tool_test.py | 12 ++++++++++++
3 files changed, 27 insertions(+), 4 deletions(-)
create mode 100644 tools/testing/kunit/configs/arch_uml.config

diff --git a/tools/testing/kunit/configs/arch_uml.config b/tools/testing/kunit/configs/arch_uml.config
new file mode 100644
index 000000000000..e824ce43b05a
--- /dev/null
+++ b/tools/testing/kunit/configs/arch_uml.config
@@ -0,0 +1,5 @@
+# Config options which are added to UML builds by default
+
+# Enable virtio/pci, as a lot of tests require it.
+CONFIG_VIRTIO_UML=y
+CONFIG_UML_PCI_OVER_VIRTIO=y
diff --git a/tools/testing/kunit/kunit_kernel.py b/tools/testing/kunit/kunit_kernel.py
index fc415ff7530e..127598fb994b 100644
--- a/tools/testing/kunit/kunit_kernel.py
+++ b/tools/testing/kunit/kunit_kernel.py
@@ -26,6 +26,7 @@ KUNITCONFIG_PATH = '.kunitconfig'
OLD_KUNITCONFIG_PATH = 'last_used_kunitconfig'
DEFAULT_KUNITCONFIG_PATH = 'tools/testing/kunit/configs/default.config'
BROKEN_ALLCONFIG_PATH = 'tools/testing/kunit/configs/broken_on_uml.config'
+UML_KCONFIG_PATH = 'tools/testing/kunit/configs/arch_uml.config'
OUTFILE_PATH = 'test.log'
ABS_TOOL_PATH = os.path.abspath(os.path.dirname(__file__))
QEMU_CONFIGS_DIR = os.path.join(ABS_TOOL_PATH, 'qemu_configs')
@@ -53,7 +54,7 @@ class LinuxSourceTreeOperations:
except subprocess.CalledProcessError as e:
raise ConfigError(e.output.decode())

- def make_arch_qemuconfig(self, base_kunitconfig: kunit_config.Kconfig) -> kunit_config.Kconfig:
+ def make_arch_config(self, base_kunitconfig: kunit_config.Kconfig) -> kunit_config.Kconfig:
return base_kunitconfig

def make_allyesconfig(self, build_dir: str, make_options) -> None:
@@ -109,7 +110,7 @@ class LinuxSourceTreeOperationsQemu(LinuxSourceTreeOperations):
self._kernel_command_line = qemu_arch_params.kernel_command_line + ' kunit_shutdown=reboot'
self._extra_qemu_params = qemu_arch_params.extra_qemu_params

- def make_arch_qemuconfig(self, base_kunitconfig: kunit_config.Kconfig) -> kunit_config.Kconfig:
+ def make_arch_config(self, base_kunitconfig: kunit_config.Kconfig) -> kunit_config.Kconfig:
kconfig = kunit_config.parse_from_string(self._kconfig)
kconfig.merge_in_entries(base_kunitconfig)
return kconfig
@@ -138,6 +139,11 @@ class LinuxSourceTreeOperationsUml(LinuxSourceTreeOperations):
def __init__(self, cross_compile=None):
super().__init__(linux_arch='um', cross_compile=cross_compile)

+ def make_arch_config(self, base_kunitconfig: kunit_config.Kconfig) -> kunit_config.Kconfig:
+ kconfig = kunit_config.parse_file(UML_KCONFIG_PATH)
+ kconfig.merge_in_entries(base_kunitconfig)
+ return kconfig
+
def make_allyesconfig(self, build_dir: str, make_options) -> None:
kunit_parser.print_with_timestamp(
'Enabling all CONFIGs for UML...')
@@ -297,7 +303,7 @@ class LinuxSourceTree:
if build_dir and not os.path.exists(build_dir):
os.mkdir(build_dir)
try:
- self._kconfig = self._ops.make_arch_qemuconfig(self._kconfig)
+ self._kconfig = self._ops.make_arch_config(self._kconfig)
self._kconfig.write_to_file(kconfig_path)
self._ops.make_olddefconfig(build_dir, make_options)
except ConfigError as e:
@@ -328,7 +334,7 @@ class LinuxSourceTree:
return self.build_config(build_dir, make_options)

existing_kconfig = kunit_config.parse_file(kconfig_path)
- self._kconfig = self._ops.make_arch_qemuconfig(self._kconfig)
+ self._kconfig = self._ops.make_arch_config(self._kconfig)

if self._kconfig.is_subset_of(existing_kconfig) and not self._kunitconfig_changed(build_dir):
return True
diff --git a/tools/testing/kunit/kunit_tool_test.py b/tools/testing/kunit/kunit_tool_test.py
index e21ae1331350..08cb2dc8ef7d 100755
--- a/tools/testing/kunit/kunit_tool_test.py
+++ b/tools/testing/kunit/kunit_tool_test.py
@@ -430,6 +430,10 @@ class LinuxSourceTreeTest(unittest.TestCase):
f.write('CONFIG_KUNIT=y')

tree = kunit_kernel.LinuxSourceTree(build_dir)
+ # Stub out the source tree operations, so we don't have
+ # the defaults for any given architecture get in the
+ # way.
+ tree._ops = kunit_kernel.LinuxSourceTreeOperations(None, None)
mock_build_config = mock.patch.object(tree, 'build_config').start()

# Should generate the .config
@@ -447,6 +451,10 @@ class LinuxSourceTreeTest(unittest.TestCase):
f.write('CONFIG_KUNIT=y\nCONFIG_KUNIT_TEST=y')

tree = kunit_kernel.LinuxSourceTree(build_dir)
+ # Stub out the source tree operations, so we don't have
+ # the defaults for any given architecture get in the
+ # way.
+ tree._ops = kunit_kernel.LinuxSourceTreeOperations(None, None)
mock_build_config = mock.patch.object(tree, 'build_config').start()

self.assertTrue(tree.build_reconfig(build_dir, make_options=[]))
@@ -463,6 +471,10 @@ class LinuxSourceTreeTest(unittest.TestCase):
f.write('CONFIG_KUNIT=y\nCONFIG_KUNIT_TEST=y')

tree = kunit_kernel.LinuxSourceTree(build_dir)
+ # Stub out the source tree operations, so we don't have
+ # the defaults for any given architecture get in the
+ # way.
+ tree._ops = kunit_kernel.LinuxSourceTreeOperations(None, None)
mock_build_config = mock.patch.object(tree, 'build_config').start()

# ... so we should trigger a call to build_config()
--
2.37.0.rc0.161.g10f37bed90-goog

José Expósito

unread,
Jun 27, 2022, 2:53:09 AMJun 27
to David Gow, Daniel Latypov, Brendan Higgins, Shuah Khan, kuni...@googlegroups.com, linux-k...@vger.kernel.org, linux-...@vger.kernel.org
On Fri, Jun 24, 2022 at 04:43:59PM +0800, David Gow wrote:
> There are several tests which depend on PCI, and hence need a bunch of
> extra options to run under UML. This makes it awkward to give
> configuration instructions (whether in documentation, or as part of a
> .kunitconfig file), as two separate, incompatible sets of config options
> are required for UML and "most other architectures".
>
> For non-UML architectures, it's possible to add default kconfig options
> via the qemu_config python files, but there's no equivalent for UML. Add
> a new tools/testing/kunit/configs/arch_uml.config file containing extra
> kconfig options to use on UML.
>
> Signed-off-by: David Gow <davi...@google.com>

Tested-by: José Expósito <jose.ex...@gmail.com>

After applying this patch and its dependencies, I can confirm that it is
possible to run the DRM tests with the following command:

$ ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/gpu/drm/tests

Added a TODO for myself to remove the extra flag from the DRM docs once
this patch is merged.

Thanks a lot for making it easier!

Jose

Daniel Latypov

unread,
Jun 27, 2022, 6:57:17 PMJun 27
to David Gow, Brendan Higgins, Shuah Khan, José Expósito, kuni...@googlegroups.com, linux-k...@vger.kernel.org, linux-...@vger.kernel.org
This runs and typechecks under mypy, but not under pytype.
The problem is that the first argument is type str, not Optional[str].

I think a fix would be to just use LinuxSourceTreeOperationsUml() instead here.

Since you recently switched machines, you might want to run:
$ pip install pytype

And then
$ ./tools/testing/kunit/run_checks.py
would run pytype and show you the complaints here.

Daniel Latypov

unread,
Jun 27, 2022, 7:34:06 PMJun 27
to David Gow, Brendan Higgins, Shuah Khan, José Expósito, kuni...@googlegroups.com, linux-k...@vger.kernel.org, linux-...@vger.kernel.org
On Mon, Jun 27, 2022 at 3:57 PM Daniel Latypov <dlat...@google.com> wrote:
>
> On Fri, Jun 24, 2022 at 1:44 AM David Gow <davi...@google.com> wrote:
> >
> > There are several tests which depend on PCI, and hence need a bunch of
> > extra options to run under UML. This makes it awkward to give
> > configuration instructions (whether in documentation, or as part of a
> > .kunitconfig file), as two separate, incompatible sets of config options
> > are required for UML and "most other architectures".
> >
> > For non-UML architectures, it's possible to add default kconfig options
> > via the qemu_config python files, but there's no equivalent for UML. Add
> > a new tools/testing/kunit/configs/arch_uml.config file containing extra
> > kconfig options to use on UML.
> >
> > Signed-off-by: David Gow <davi...@google.com>

Reviewed-by: Daniel Latypov <dlat...@google.com>

LGTM, modulo the pytype error mentioned before.

> > tree = kunit_kernel.LinuxSourceTree(build_dir)
> > + # Stub out the source tree operations, so we don't have
> > + # the defaults for any given architecture get in the
> > + # way.
> > + tree._ops = kunit_kernel.LinuxSourceTreeOperations(None, None)
>
> This runs and typechecks under mypy, but not under pytype.
> The problem is that the first argument is type str, not Optional[str].
>
> I think a fix would be to just use LinuxSourceTreeOperationsUml() instead here.
>
> Since you recently switched machines, you might want to run:
> $ pip install pytype
>
> And then
> $ ./tools/testing/kunit/run_checks.py
> would run pytype and show you the complaints here.

Oh, I see what you're doing here, we want to avoid the new step where
UML now adds to the .kunitconfig file.

Something like this could work
- tree._ops = kunit_kernel.LinuxSourceTreeOperations(None, None)
+ tree._ops = kunit_kernel.LinuxSourceTreeOperations('none', None)
or we could put 'fake', etc.

If we're not happy with using this class directly (since it's meant to
subclassed), an alternative, more targeted approach could be:
mock.patch.object(tree._ops, 'make_arch_config', lambda x: x).start()
But I don't like this and would prefer the above.

Daniel

David Gow

unread,
Jun 28, 2022, 7:58:26 PMJun 28
to Daniel Latypov, Brendan Higgins, Shuah Khan, David Gow, José Expósito, kuni...@googlegroups.com, linux-k...@vger.kernel.org, linux-...@vger.kernel.org
There are several tests which depend on PCI, and hence need a bunch of
extra options to run under UML. This makes it awkward to give
configuration instructions (whether in documentation, or as part of a
.kunitconfig file), as two separate, incompatible sets of config options
are required for UML and "most other architectures".

For non-UML architectures, it's possible to add default kconfig options
via the qemu_config python files, but there's no equivalent for UML. Add
a new tools/testing/kunit/configs/arch_uml.config file containing extra
kconfig options to use on UML.

Tested-by: José Expósito <jose.ex...@gmail.com>
Reviewed-by: Daniel Latypov <dlat...@google.com>
Signed-off-by: David Gow <davi...@google.com>
---

NOTE: This depends on the refactor kconfig handling & repeatable
--kunitconfig series here:
https://lore.kernel.org/linux-kselftest/20220627221446....@google.com/T/
https://patchwork.kernel.org/project/linux-kselftest/list/?series=654332
Please apply those first.

Changes since v1:
https://lore.kernel.org/linux-kselftest/20220624084400.1...@google.com/
- (Hopefully) fix a pytype warning re: architecture being None in the
tests. (Thanks, Daniel)
- Rebase on top of the new combined v3 of the kconfig/kunitconfig
patchset.
- Add José's Tested-by and Daniel's Reviewed-by.
index f65c996127c3..2698d4c51e6e 100644
index 0c5ba3ed35e6..6b8887c79c50 100755
--- a/tools/testing/kunit/kunit_tool_test.py
+++ b/tools/testing/kunit/kunit_tool_test.py
@@ -430,6 +430,10 @@ class LinuxSourceTreeTest(unittest.TestCase):
f.write('CONFIG_KUNIT=y')

tree = kunit_kernel.LinuxSourceTree(build_dir)
+ # Stub out the source tree operations, so we don't have
+ # the defaults for any given architecture get in the
+ # way.
+ tree._ops = kunit_kernel.LinuxSourceTreeOperations('none', None)
mock_build_config = mock.patch.object(tree, 'build_config').start()

# Should generate the .config
@@ -447,6 +451,10 @@ class LinuxSourceTreeTest(unittest.TestCase):
f.write('CONFIG_KUNIT=y\nCONFIG_KUNIT_TEST=y')

tree = kunit_kernel.LinuxSourceTree(build_dir)
+ # Stub out the source tree operations, so we don't have
+ # the defaults for any given architecture get in the
+ # way.
+ tree._ops = kunit_kernel.LinuxSourceTreeOperations('none', None)
mock_build_config = mock.patch.object(tree, 'build_config').start()

self.assertTrue(tree.build_reconfig(build_dir, make_options=[]))
@@ -463,6 +471,10 @@ class LinuxSourceTreeTest(unittest.TestCase):
f.write('CONFIG_KUNIT=y\nCONFIG_KUNIT_TEST=y')

tree = kunit_kernel.LinuxSourceTree(build_dir)
+ # Stub out the source tree operations, so we don't have
+ # the defaults for any given architecture get in the
+ # way.
+ tree._ops = kunit_kernel.LinuxSourceTreeOperations('none', None)

Brendan Higgins

unread,
Jul 6, 2022, 5:27:46 PMJul 6
to David Gow, Daniel Latypov, Shuah Khan, José Expósito, kuni...@googlegroups.com, linux-k...@vger.kernel.org, linux-...@vger.kernel.org
On Tue, Jun 28, 2022 at 7:58 PM David Gow <davi...@google.com> wrote:
>
> There are several tests which depend on PCI, and hence need a bunch of
> extra options to run under UML. This makes it awkward to give
> configuration instructions (whether in documentation, or as part of a
> .kunitconfig file), as two separate, incompatible sets of config options
> are required for UML and "most other architectures".
>
> For non-UML architectures, it's possible to add default kconfig options
> via the qemu_config python files, but there's no equivalent for UML. Add
> a new tools/testing/kunit/configs/arch_uml.config file containing extra
> kconfig options to use on UML.
>
> Tested-by: José Expósito <jose.ex...@gmail.com>
> Reviewed-by: Daniel Latypov <dlat...@google.com>
> Signed-off-by: David Gow <davi...@google.com>

Reviewed-by: Brendan Higgins <brendan...@google.com>

Daniel Latypov

unread,
Jul 8, 2022, 12:27:21 PMJul 8
to brendan...@google.com, davi...@google.com, linux-...@vger.kernel.org, kuni...@googlegroups.com, linux-k...@vger.kernel.org, sk...@linuxfoundation.org, José Expósito, Daniel Latypov
From: David Gow <davi...@google.com>
Signed-off-by: Daniel Latypov <dlat...@google.com>
---

NOTE: This depends on v4 of the repeatable --kunitconfig patch here:
https://patchwork.kernel.org/project/linux-kselftest/patch/20220708013632.1...@google.com/
Please apply it first first.

Changes since v2: (dlat...@google.com)
- Rebase on top of the -kselftest kunit branch + v4 of the --kunitconfig
patch. It rebased cleanly, but it evidently would not apply cleanly
due to all the conflicts v4 --kunitconfig had with --qemu_args
index 56492090e28e..f5c26ea89714 100644
stdout.print_with_timestamp(
'Enabling all CONFIGs for UML...')
@@ -298,7 +304,7 @@ class LinuxSourceTree:
if build_dir and not os.path.exists(build_dir):
os.mkdir(build_dir)
try:
- self._kconfig = self._ops.make_arch_qemuconfig(self._kconfig)
+ self._kconfig = self._ops.make_arch_config(self._kconfig)
self._kconfig.write_to_file(kconfig_path)
self._ops.make_olddefconfig(build_dir, make_options)
except ConfigError as e:
@@ -329,7 +335,7 @@ class LinuxSourceTree:
return self.build_config(build_dir, make_options)

existing_kconfig = kunit_config.parse_file(kconfig_path)
- self._kconfig = self._ops.make_arch_qemuconfig(self._kconfig)
+ self._kconfig = self._ops.make_arch_config(self._kconfig)

if self._kconfig.is_subset_of(existing_kconfig) and not self._kunitconfig_changed(build_dir):
return True
diff --git a/tools/testing/kunit/kunit_tool_test.py b/tools/testing/kunit/kunit_tool_test.py
index ad63d0d34f3f..446ac432d9a4 100755
base-commit: cbb6bc7059151df198b45e883ed731d8f528b65b
--
2.37.0.rc0.161.g10f37bed90-goog

Maxime Ripard

unread,
Jul 11, 2022, 10:46:57 AMJul 11
to Daniel Latypov, brendan...@google.com, davi...@google.com, linux-...@vger.kernel.org, kuni...@googlegroups.com, linux-k...@vger.kernel.org, sk...@linuxfoundation.org, José Expósito, Mike Turquette, Stephen Boyd, linu...@vger.kernel.org
Hi David, Daniel,

On Fri, Jul 08, 2022 at 04:27:11PM +0000, Daniel Latypov wrote:
> From: David Gow <davi...@google.com>
>
> There are several tests which depend on PCI, and hence need a bunch of
> extra options to run under UML. This makes it awkward to give
> configuration instructions (whether in documentation, or as part of a
> .kunitconfig file), as two separate, incompatible sets of config options
> are required for UML and "most other architectures".
>
> For non-UML architectures, it's possible to add default kconfig options
> via the qemu_config python files, but there's no equivalent for UML. Add
> a new tools/testing/kunit/configs/arch_uml.config file containing extra
> kconfig options to use on UML.
>
> Tested-by: José Expósito <jose.ex...@gmail.com>
> Reviewed-by: Daniel Latypov <dlat...@google.com>
> Signed-off-by: David Gow <davi...@google.com>
> Reviewed-by: Brendan Higgins <brendan...@google.com>
> Signed-off-by: Daniel Latypov <dlat...@google.com>

Unfortunately, this breaks the clock tests in next-20220711:
$ ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/clk/.kunitconfig --raw_output
[16:45:52] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[16:45:53] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make ARCH=um O=.kunit --jobs=16
[16:45:58] Starting KUnit Kernel (1/1)...
TAP version 14
1..10
# Subtest: clk-test
1..4
ok 1 - clk_test_get_rate
ok 2 - clk_test_set_get_rate
ok 3 - clk_test_set_set_get_rate
ok 4 - clk_test_round_set_get_rate
# clk-test: pass:4 fail:0 skip:0 total:4
# Totals: pass:4 fail:0 skip:0 total:4
ok 1 - clk-test
# Subtest: clk-orphan-transparent-single-parent-test
1..1
ok 1 - clk_test_orphan_transparent_parent_mux_set_range
ok 2 - clk-orphan-transparent-single-parent-test
# Subtest: clk-range-test
1..11
ok 1 - clk_range_test_set_range
clk_set_rate_range: clk test_dummy_rate dev (null) con (null): invalid range [142001000, 142000000]
ok 2 - clk_range_test_set_range_invalid
ok 3 - clk_range_test_multiple_disjoints_range
ok 4 - clk_range_test_set_range_round_rate_lower
ok 5 - clk_range_test_set_range_set_rate_lower
ok 6 - clk_range_test_set_range_set_round_rate_consistent_lower
ok 7 - clk_range_test_set_range_round_rate_higher
ok 8 - clk_range_test_set_range_set_rate_higher
ok 9 - clk_range_test_set_range_set_round_rate_consistent_higher
ok 10 - clk_range_test_set_range_get_rate_raised
ok 11 - clk_range_test_set_range_get_rate_lowered
# clk-range-test: pass:11 fail:0 skip:0 total:11
# Totals: pass:11 fail:0 skip:0 total:11
ok 3 - clk-range-test
# Subtest: clk-range-maximize-test
1..2
ok 1 - clk_range_test_set_range_rate_maximized
ok 2 - clk_range_test_multiple_set_range_rate_maximized
# clk-range-maximize-test: pass:2 fail:0 skip:0 total:2
# Totals: pass:2 fail:0 skip:0 total:2
ok 4 - clk-range-maximize-test
# Subtest: clk-range-minimize-test
1..2
ok 1 - clk_range_test_set_range_rate_minimized
ok 2 - clk_range_test_multiple_set_range_rate_minimized
# clk-range-minimize-test: pass:2 fail:0 skip:0 total:2
# Totals: pass:2 fail:0 skip:0 total:2
ok 5 - clk-range-minimize-test
# Subtest: clk-gate-register-test
1..6
ok 1 - clk_gate_register_test_dev
ok 2 - clk_gate_register_test_parent_names
ok 3 - clk_gate_register_test_parent_data
ok 4 - clk_gate_register_test_parent_data_legacy
ok 5 - clk_gate_register_test_parent_hw
gate bit exceeds LOWORD field
ok 6 - clk_gate_register_test_hiword_invalid
# clk-gate-register-test: pass:6 fail:0 skip:0 total:6
# Totals: pass:6 fail:0 skip:0 total:6
ok 6 - clk-gate-register-test
# Subtest: clk-gate-test
1..3
ok 1 - clk_gate_test_parent_rate
------------[ cut here ]------------
WARNING: CPU: 0 PID: 45 at lib/logic_iomem.c:141 __raw_readl+0x9f/0xd0
CPU: 0 PID: 45 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165
Stack:
6030a5b6 60277543 60350943 6030a5b6
6002a000 00000000 0000008d 6031ccb0
a088bd08 60294456 00000000 00000000
Call Trace:
[<6002a000>] ? um_set_signals+0x0/0x50
[<60294456>] ? dump_stack_lvl+0x44/0x50
[<60277543>] ? _printk+0x0/0x9b
[<60274ddb>] ? __warn.cold+0x33/0xa3
[<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9
[<601ececa>] ? clk_core_lookup+0x5a/0x150
[<601ec370>] ? clk_prepare_unlock+0x0/0x100
[<601ee953>] ? __clk_register+0x8c3/0xb50
[<601f0d95>] ? clk_hw_register+0x15/0x30
[<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9
[<60264b3f>] ? __raw_readl+0x9f/0xd0
[<601f68bd>] ? clk_gate_endisable+0xcd/0x110
[<601f6925>] ? clk_gate_enable+0x15/0x20
[<601ec147>] ? clk_core_enable+0x57/0xc0
[<601efb0e>] ? clk_enable+0x2e/0x50
[<601f8ccf>] ? clk_gate_test_enable+0xff/0x2f0
[<60295990>] ? schedule_preempt_disabled+0x0/0x20
[<60063aa0>] ? complete+0x0/0x70
[<601bff9d>] ? kunit_try_run_case+0x4d/0x80
[<60295855>] ? schedule+0x55/0x100
[<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20
[<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20
[<60054364>] ? kthread+0xf4/0x150
[<60019e42>] ? new_thread_handler+0x82/0xc0
---[ end trace 0000000000000000 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 45 at lib/logic_iomem.c:190 __raw_readl+0xbd/0xd0
Invalid readl at address 60c057d8
CPU: 0 PID: 45 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165
Stack:
6030a5b6 60277543 60350943 6030a5b6
6002a000 00000000 000000be 6031ccb0
a088bd08 60294456 a088bd50 00000000
Call Trace:
[<6002a000>] ? um_set_signals+0x0/0x50
[<60294456>] ? dump_stack_lvl+0x44/0x50
[<60277543>] ? _printk+0x0/0x9b
[<60274ddb>] ? __warn.cold+0x33/0xa3
[<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9
[<601ececa>] ? clk_core_lookup+0x5a/0x150
[<601ec370>] ? clk_prepare_unlock+0x0/0x100
[<601ee953>] ? __clk_register+0x8c3/0xb50
[<601f0d95>] ? clk_hw_register+0x15/0x30
[<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9
[<60264b5d>] ? __raw_readl+0xbd/0xd0
[<601f68bd>] ? clk_gate_endisable+0xcd/0x110
[<601f6925>] ? clk_gate_enable+0x15/0x20
[<601ec147>] ? clk_core_enable+0x57/0xc0
[<601efb0e>] ? clk_enable+0x2e/0x50
[<601f8ccf>] ? clk_gate_test_enable+0xff/0x2f0
[<60295990>] ? schedule_preempt_disabled+0x0/0x20
[<60063aa0>] ? complete+0x0/0x70
[<601bff9d>] ? kunit_try_run_case+0x4d/0x80
[<60295855>] ? schedule+0x55/0x100
[<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20
[<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20
[<60054364>] ? kthread+0xf4/0x150
[<60019e42>] ? new_thread_handler+0x82/0xc0
---[ end trace 0000000000000000 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 45 at lib/logic_iomem.c:141 __raw_writel+0xb0/0xe0
CPU: 0 PID: 45 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165
Stack:
6030a5b6 60277543 60350943 6030a5b6
6002a000 00000000 0000008d 6031ccb0
a088bcf8 60294456 00000000 00000000
Call Trace:
[<6002a000>] ? um_set_signals+0x0/0x50
[<60294456>] ? dump_stack_lvl+0x44/0x50
[<60277543>] ? _printk+0x0/0x9b
[<60274ddb>] ? __warn.cold+0x33/0xa3
[<60277543>] ? _printk+0x0/0x9b
[<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9
[<601ececa>] ? clk_core_lookup+0x5a/0x150
[<601ee953>] ? __clk_register+0x8c3/0xb50
[<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9
[<60264c20>] ? __raw_writel+0xb0/0xe0
[<601f689f>] ? clk_gate_endisable+0xaf/0x110
[<601f6925>] ? clk_gate_enable+0x15/0x20
[<601ec147>] ? clk_core_enable+0x57/0xc0
[<601efb0e>] ? clk_enable+0x2e/0x50
[<601f8ccf>] ? clk_gate_test_enable+0xff/0x2f0
[<60295990>] ? schedule_preempt_disabled+0x0/0x20
[<60063aa0>] ? complete+0x0/0x70
[<601bff9d>] ? kunit_try_run_case+0x4d/0x80
[<60295855>] ? schedule+0x55/0x100
[<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20
[<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20
[<60054364>] ? kthread+0xf4/0x150
[<60019e42>] ? new_thread_handler+0x82/0xc0
---[ end trace 0000000000000000 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 45 at lib/logic_iomem.c:190 clk_gate_endisable+0xaf/0x110
Invalid writeql of 0xffffffff at address 60c057d8
CPU: 0 PID: 45 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165
Stack:
6030a5b6 60277543 60350943 6030a5b6
6002a000 00000000 000000be 6031ccb0
a088bd28 60294456 a088bd70 00000000
Call Trace:
[<6002a000>] ? um_set_signals+0x0/0x50
[<60294456>] ? dump_stack_lvl+0x44/0x50
[<60277543>] ? _printk+0x0/0x9b
[<60274ddb>] ? __warn.cold+0x33/0xa3
[<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9
[<601ee953>] ? __clk_register+0x8c3/0xb50
[<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9
[<60264c20>] ? __raw_writel+0xb0/0xe0
[<601f689f>] ? clk_gate_endisable+0xaf/0x110
[<601f6925>] ? clk_gate_enable+0x15/0x20
[<601ec147>] ? clk_core_enable+0x57/0xc0
[<601efb0e>] ? clk_enable+0x2e/0x50
[<601f8ccf>] ? clk_gate_test_enable+0xff/0x2f0
[<60295990>] ? schedule_preempt_disabled+0x0/0x20
[<60063aa0>] ? complete+0x0/0x70
[<601bff9d>] ? kunit_try_run_case+0x4d/0x80
[<60295855>] ? schedule+0x55/0x100
[<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20
[<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20
[<60054364>] ? kthread+0xf4/0x150
[<60019e42>] ? new_thread_handler+0x82/0xc0
---[ end trace 0000000000000000 ]---
# clk_gate_test_enable: EXPECTATION FAILED at drivers/clk/clk-gate_test.c:169
Expected enable_val == ctx->fake_reg, but
enable_val == 32
ctx->fake_reg == 0
------------[ cut here ]------------
WARNING: CPU: 0 PID: 45 at lib/logic_iomem.c:141 __raw_readl+0x9f/0xd0
CPU: 0 PID: 45 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165
Stack:
6030a5b6 60277543 60350943 6030a5b6
6002a000 00000001 0000008d 6031ccb0
a088bd58 60294456 00000000 00000000
Call Trace:
[<6002a000>] ? um_set_signals+0x0/0x50
[<60294456>] ? dump_stack_lvl+0x44/0x50
[<60277543>] ? _printk+0x0/0x9b
[<60274ddb>] ? __warn.cold+0x33/0xa3
[<601c0280>] ? kunit_resource_instance_match+0x0/0x10
[<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9
[<601bfdc0>] ? kunit_do_failed_assertion+0x100/0x1c0
[<601c022c>] ? kunit_destroy_resource+0x10c/0x160
[<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9
[<601bfcc0>] ? kunit_do_failed_assertion+0x0/0x1c0
[<60264c20>] ? __raw_writel+0xb0/0xe0
[<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9
[<601ef400>] ? clk_hw_is_enabled+0x0/0x10
[<60264b3f>] ? __raw_readl+0x9f/0xd0
[<601f694a>] ? clk_gate_is_enabled+0x1a/0x50
[<601ebf42>] ? clk_core_is_enabled+0x22/0xb0
[<601f8c77>] ? clk_gate_test_enable+0xa7/0x2f0
[<601c0ad0>] ? kunit_binary_assert_format+0x0/0x100
[<60063aa0>] ? complete+0x0/0x70
[<601bff9d>] ? kunit_try_run_case+0x4d/0x80
[<60295855>] ? schedule+0x55/0x100
[<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20
[<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20
[<60054364>] ? kthread+0xf4/0x150
[<60019e42>] ? new_thread_handler+0x82/0xc0
---[ end trace 0000000000000000 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 45 at lib/logic_iomem.c:190 __raw_readl+0xbd/0xd0
Invalid readl at address 60c057d8
CPU: 0 PID: 45 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165
Stack:
6030a5b6 60277543 60350943 6030a5b6
6002a000 00000001 000000be 6031ccb0
a088bd58 60294456 a088bda0 00000000
Call Trace:
[<6002a000>] ? um_set_signals+0x0/0x50
[<60294456>] ? dump_stack_lvl+0x44/0x50
[<60277543>] ? _printk+0x0/0x9b
[<60274ddb>] ? __warn.cold+0x33/0xa3
[<601c0280>] ? kunit_resource_instance_match+0x0/0x10
[<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9
[<601bfdc0>] ? kunit_do_failed_assertion+0x100/0x1c0
[<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9
[<601bfcc0>] ? kunit_do_failed_assertion+0x0/0x1c0
[<60264c20>] ? __raw_writel+0xb0/0xe0
[<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9
[<601ef400>] ? clk_hw_is_enabled+0x0/0x10
[<60264b5d>] ? __raw_readl+0xbd/0xd0
[<601f694a>] ? clk_gate_is_enabled+0x1a/0x50
[<601ebf42>] ? clk_core_is_enabled+0x22/0xb0
[<601f8c77>] ? clk_gate_test_enable+0xa7/0x2f0
[<601c0ad0>] ? kunit_binary_assert_format+0x0/0x100
[<60063aa0>] ? complete+0x0/0x70
[<601bff9d>] ? kunit_try_run_case+0x4d/0x80
[<60295855>] ? schedule+0x55/0x100
[<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20
[<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20
[<60054364>] ? kthread+0xf4/0x150
[<60019e42>] ? new_thread_handler+0x82/0xc0
---[ end trace 0000000000000000 ]---
clk_unregister: unregistering prepared clock: test_gate
clk_unregister: unregistering prepared clock: test_parent
not ok 2 - clk_gate_test_enable
------------[ cut here ]------------
WARNING: CPU: 0 PID: 46 at lib/logic_iomem.c:141 __raw_readl+0x9f/0xd0
CPU: 0 PID: 46 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165
Stack:
6030a5b6 60277543 60350943 6030a5b6
6002a000 00000000 0000008d 6031ccb0
a088bcf8 60294456 00000000 00000000
Call Trace:
[<6002a000>] ? um_set_signals+0x0/0x50
[<60294456>] ? dump_stack_lvl+0x44/0x50
[<60277543>] ? _printk+0x0/0x9b
[<60274ddb>] ? __warn.cold+0x33/0xa3
[<601ef880>] ? clk_unprepare+0x0/0x50
[<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9
[<601ee1bb>] ? __clk_register+0x12b/0xb50
[<601ececa>] ? clk_core_lookup+0x5a/0x150
[<601ec370>] ? clk_prepare_unlock+0x0/0x100
[<601ee953>] ? __clk_register+0x8c3/0xb50
[<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9
[<60264b3f>] ? __raw_readl+0x9f/0xd0
[<601f68bd>] ? clk_gate_endisable+0xcd/0x110
[<601f6925>] ? clk_gate_enable+0x15/0x20
[<601ec147>] ? clk_core_enable+0x57/0xc0
[<601efb0e>] ? clk_enable+0x2e/0x50
[<601f80cf>] ? clk_gate_test_disable+0x12f/0x390
[<60295990>] ? schedule_preempt_disabled+0x0/0x20
[<60063aa0>] ? complete+0x0/0x70
[<601bff9d>] ? kunit_try_run_case+0x4d/0x80
[<60295855>] ? schedule+0x55/0x100
[<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20
[<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20
[<60054364>] ? kthread+0xf4/0x150
[<60019e42>] ? new_thread_handler+0x82/0xc0
---[ end trace 0000000000000000 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 46 at lib/logic_iomem.c:190 __raw_readl+0xbd/0xd0
Invalid readl at address 60c057d8
CPU: 0 PID: 46 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165
Stack:
6030a5b6 60277543 60350943 6030a5b6
6002a000 00000000 000000be 6031ccb0
a088bcf8 60294456 a088bd40 00000000
Call Trace:
[<6002a000>] ? um_set_signals+0x0/0x50
[<60294456>] ? dump_stack_lvl+0x44/0x50
[<60277543>] ? _printk+0x0/0x9b
[<60274ddb>] ? __warn.cold+0x33/0xa3
[<601ef880>] ? clk_unprepare+0x0/0x50
[<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9
[<601ee1bb>] ? __clk_register+0x12b/0xb50
[<601ececa>] ? clk_core_lookup+0x5a/0x150
[<601ec370>] ? clk_prepare_unlock+0x0/0x100
[<601ee953>] ? __clk_register+0x8c3/0xb50
[<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9
[<60264b5d>] ? __raw_readl+0xbd/0xd0
[<601f68bd>] ? clk_gate_endisable+0xcd/0x110
[<601f6925>] ? clk_gate_enable+0x15/0x20
[<601ec147>] ? clk_core_enable+0x57/0xc0
[<601efb0e>] ? clk_enable+0x2e/0x50
[<601f80cf>] ? clk_gate_test_disable+0x12f/0x390
[<60295990>] ? schedule_preempt_disabled+0x0/0x20
[<60063aa0>] ? complete+0x0/0x70
[<601bff9d>] ? kunit_try_run_case+0x4d/0x80
[<60295855>] ? schedule+0x55/0x100
[<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20
[<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20
[<60054364>] ? kthread+0xf4/0x150
[<60019e42>] ? new_thread_handler+0x82/0xc0
---[ end trace 0000000000000000 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 46 at lib/logic_iomem.c:141 __raw_writel+0xb0/0xe0
CPU: 0 PID: 46 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165
Stack:
6030a5b6 60277543 60350943 6030a5b6
6002a000 00000000 0000008d 6031ccb0
a088bce8 60294456 00000000 00000000
Call Trace:
[<6002a000>] ? um_set_signals+0x0/0x50
[<60294456>] ? dump_stack_lvl+0x44/0x50
[<60277543>] ? _printk+0x0/0x9b
[<60274ddb>] ? __warn.cold+0x33/0xa3
[<60277543>] ? _printk+0x0/0x9b
[<601ef880>] ? clk_unprepare+0x0/0x50
[<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9
[<601ee1bb>] ? __clk_register+0x12b/0xb50
[<601ec370>] ? clk_prepare_unlock+0x0/0x100
[<601ee953>] ? __clk_register+0x8c3/0xb50
[<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9
[<60264c20>] ? __raw_writel+0xb0/0xe0
[<601f689f>] ? clk_gate_endisable+0xaf/0x110
[<601f6925>] ? clk_gate_enable+0x15/0x20
[<601ec147>] ? clk_core_enable+0x57/0xc0
[<601efb0e>] ? clk_enable+0x2e/0x50
[<601f80cf>] ? clk_gate_test_disable+0x12f/0x390
[<60295990>] ? schedule_preempt_disabled+0x0/0x20
[<60063aa0>] ? complete+0x0/0x70
[<601bff9d>] ? kunit_try_run_case+0x4d/0x80
[<60295855>] ? schedule+0x55/0x100
[<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20
[<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20
[<60054364>] ? kthread+0xf4/0x150
[<60019e42>] ? new_thread_handler+0x82/0xc0
---[ end trace 0000000000000000 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 46 at lib/logic_iomem.c:190 clk_gate_endisable+0xaf/0x110
Invalid writeql of 0xffffffff at address 60c057d8
CPU: 0 PID: 46 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165
Stack:
6030a5b6 60277543 60350943 6030a5b6
6002a000 00000000 000000be 6031ccb0
a088bd18 60294456 a088bd60 00000000
Call Trace:
[<6002a000>] ? um_set_signals+0x0/0x50
[<60294456>] ? dump_stack_lvl+0x44/0x50
[<60277543>] ? _printk+0x0/0x9b
[<60274ddb>] ? __warn.cold+0x33/0xa3
[<601ef880>] ? clk_unprepare+0x0/0x50
[<601ef880>] ? clk_unprepare+0x0/0x50
[<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9
[<601ec370>] ? clk_prepare_unlock+0x0/0x100
[<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9
[<60264c20>] ? __raw_writel+0xb0/0xe0
[<601f689f>] ? clk_gate_endisable+0xaf/0x110
[<601f6925>] ? clk_gate_enable+0x15/0x20
[<601ec147>] ? clk_core_enable+0x57/0xc0
[<601efb0e>] ? clk_enable+0x2e/0x50
[<601f80cf>] ? clk_gate_test_disable+0x12f/0x390
[<60295990>] ? schedule_preempt_disabled+0x0/0x20
[<60063aa0>] ? complete+0x0/0x70
[<601bff9d>] ? kunit_try_run_case+0x4d/0x80
[<60295855>] ? schedule+0x55/0x100
[<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20
[<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20
[<60054364>] ? kthread+0xf4/0x150
[<60019e42>] ? new_thread_handler+0x82/0xc0
---[ end trace 0000000000000000 ]---
# clk_gate_test_disable: ASSERTION FAILED at drivers/clk/clk-gate_test.c:186
Expected enable_val == ctx->fake_reg, but
enable_val == 32
ctx->fake_reg == 0
clk_unregister: unregistering prepared clock: test_gate
clk_unregister: unregistering prepared clock: test_parent
not ok 3 - clk_gate_test_disable
# clk-gate-test: pass:1 fail:2 skip:0 total:3
# Totals: pass:1 fail:2 skip:0 total:3
not ok 7 - clk-gate-test
# Subtest: clk-gate-invert-test
1..2
------------[ cut here ]------------
WARNING: CPU: 0 PID: 47 at lib/logic_iomem.c:141 __raw_readl+0x9f/0xd0
CPU: 0 PID: 47 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165
Stack:
6030a5b6 60277543 60350943 6030a5b6
6002a000 00000000 0000008d 6031ccb0
a088bd08 60294456 00000000 00000000
Call Trace:
[<6002a000>] ? um_set_signals+0x0/0x50
[<60294456>] ? dump_stack_lvl+0x44/0x50
[<60277543>] ? _printk+0x0/0x9b
[<60274ddb>] ? __warn.cold+0x33/0xa3
[<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9
[<601ececa>] ? clk_core_lookup+0x5a/0x150
[<601ec370>] ? clk_prepare_unlock+0x0/0x100
[<601ee953>] ? __clk_register+0x8c3/0xb50
[<601f0d95>] ? clk_hw_register+0x15/0x30
[<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9
[<60264b3f>] ? __raw_readl+0x9f/0xd0
[<601f68bd>] ? clk_gate_endisable+0xcd/0x110
[<601f6925>] ? clk_gate_enable+0x15/0x20
[<601ec147>] ? clk_core_enable+0x57/0xc0
[<601efb0e>] ? clk_enable+0x2e/0x50
[<601f89df>] ? clk_gate_test_invert_enable+0xff/0x2f0
[<60295990>] ? schedule_preempt_disabled+0x0/0x20
[<60063aa0>] ? complete+0x0/0x70
[<601bff9d>] ? kunit_try_run_case+0x4d/0x80
[<60295855>] ? schedule+0x55/0x100
[<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20
[<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20
[<60054364>] ? kthread+0xf4/0x150
[<60019e42>] ? new_thread_handler+0x82/0xc0
---[ end trace 0000000000000000 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 47 at lib/logic_iomem.c:190 __raw_readl+0xbd/0xd0
Invalid readl at address 60c057d8
CPU: 0 PID: 47 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165
Stack:
6030a5b6 60277543 60350943 6030a5b6
6002a000 00000000 000000be 6031ccb0
a088bd08 60294456 a088bd50 00000000
Call Trace:
[<6002a000>] ? um_set_signals+0x0/0x50
[<60294456>] ? dump_stack_lvl+0x44/0x50
[<60277543>] ? _printk+0x0/0x9b
[<60274ddb>] ? __warn.cold+0x33/0xa3
[<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9
[<601ececa>] ? clk_core_lookup+0x5a/0x150
[<601ec370>] ? clk_prepare_unlock+0x0/0x100
[<601ee953>] ? __clk_register+0x8c3/0xb50
[<601f0d95>] ? clk_hw_register+0x15/0x30
[<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9
[<60264b5d>] ? __raw_readl+0xbd/0xd0
[<601f68bd>] ? clk_gate_endisable+0xcd/0x110
[<601f6925>] ? clk_gate_enable+0x15/0x20
[<601ec147>] ? clk_core_enable+0x57/0xc0
[<601efb0e>] ? clk_enable+0x2e/0x50
[<601f89df>] ? clk_gate_test_invert_enable+0xff/0x2f0
[<60295990>] ? schedule_preempt_disabled+0x0/0x20
[<60063aa0>] ? complete+0x0/0x70
[<601bff9d>] ? kunit_try_run_case+0x4d/0x80
[<60295855>] ? schedule+0x55/0x100
[<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20
[<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20
[<60054364>] ? kthread+0xf4/0x150
[<60019e42>] ? new_thread_handler+0x82/0xc0
---[ end trace 0000000000000000 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 47 at lib/logic_iomem.c:141 __raw_writel+0xb0/0xe0
CPU: 0 PID: 47 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165
Stack:
6030a5b6 60277543 60350943 6030a5b6
6002a000 00000000 0000008d 6031ccb0
a088bcf8 60294456 00000000 00000000
Call Trace:
[<6002a000>] ? um_set_signals+0x0/0x50
[<60294456>] ? dump_stack_lvl+0x44/0x50
[<60277543>] ? _printk+0x0/0x9b
[<60274ddb>] ? __warn.cold+0x33/0xa3
[<60277543>] ? _printk+0x0/0x9b
[<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9
[<601ececa>] ? clk_core_lookup+0x5a/0x150
[<601ee953>] ? __clk_register+0x8c3/0xb50
[<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9
[<60264c20>] ? __raw_writel+0xb0/0xe0
[<601f689f>] ? clk_gate_endisable+0xaf/0x110
[<601f6925>] ? clk_gate_enable+0x15/0x20
[<601ec147>] ? clk_core_enable+0x57/0xc0
[<601efb0e>] ? clk_enable+0x2e/0x50
[<601f89df>] ? clk_gate_test_invert_enable+0xff/0x2f0
[<60295990>] ? schedule_preempt_disabled+0x0/0x20
[<60063aa0>] ? complete+0x0/0x70
[<601bff9d>] ? kunit_try_run_case+0x4d/0x80
[<60295855>] ? schedule+0x55/0x100
[<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20
[<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20
[<60054364>] ? kthread+0xf4/0x150
[<60019e42>] ? new_thread_handler+0x82/0xc0
---[ end trace 0000000000000000 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 47 at lib/logic_iomem.c:190 clk_gate_endisable+0xaf/0x110
Invalid writeql of 0xffff7fff at address 60c057d8
CPU: 0 PID: 47 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165
Stack:
6030a5b6 60277543 60350943 6030a5b6
6002a000 00000000 000000be 6031ccb0
a088bd28 60294456 a088bd70 00000000
Call Trace:
[<6002a000>] ? um_set_signals+0x0/0x50
[<60294456>] ? dump_stack_lvl+0x44/0x50
[<60277543>] ? _printk+0x0/0x9b
[<60274ddb>] ? __warn.cold+0x33/0xa3
[<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9
[<601ee953>] ? __clk_register+0x8c3/0xb50
[<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9
[<60264c20>] ? __raw_writel+0xb0/0xe0
[<601f689f>] ? clk_gate_endisable+0xaf/0x110
[<601f6925>] ? clk_gate_enable+0x15/0x20
[<601ec147>] ? clk_core_enable+0x57/0xc0
[<601efb0e>] ? clk_enable+0x2e/0x50
[<601f89df>] ? clk_gate_test_invert_enable+0xff/0x2f0
[<60295990>] ? schedule_preempt_disabled+0x0/0x20
[<60063aa0>] ? complete+0x0/0x70
[<601bff9d>] ? kunit_try_run_case+0x4d/0x80
[<60295855>] ? schedule+0x55/0x100
[<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20
[<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20
[<60054364>] ? kthread+0xf4/0x150
[<60019e42>] ? new_thread_handler+0x82/0xc0
---[ end trace 0000000000000000 ]---
# clk_gate_test_invert_enable: EXPECTATION FAILED at drivers/clk/clk-gate_test.c:249
Expected enable_val == ctx->fake_reg, but
enable_val == 0
ctx->fake_reg == 32768
------------[ cut here ]------------
WARNING: CPU: 0 PID: 47 at lib/logic_iomem.c:141 __raw_readl+0x9f/0xd0
CPU: 0 PID: 47 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165
Stack:
6030a5b6 60277543 60350943 6030a5b6
6002a000 00000001 0000008d 6031ccb0
a088bd58 60294456 00000000 00000000
Call Trace:
[<6002a000>] ? um_set_signals+0x0/0x50
[<60294456>] ? dump_stack_lvl+0x44/0x50
[<60277543>] ? _printk+0x0/0x9b
[<60274ddb>] ? __warn.cold+0x33/0xa3
[<6002a044>] ? um_set_signals+0x44/0x50
[<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9
[<601bfdc0>] ? kunit_do_failed_assertion+0x100/0x1c0
[<601bf580>] ? kunit_log_append+0x0/0x130
[<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9
[<601bfcc0>] ? kunit_do_failed_assertion+0x0/0x1c0
[<60264c20>] ? __raw_writel+0xb0/0xe0
[<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9
[<601ef400>] ? clk_hw_is_enabled+0x0/0x10
[<60264b3f>] ? __raw_readl+0x9f/0xd0
[<601f694a>] ? clk_gate_is_enabled+0x1a/0x50
[<601ebf42>] ? clk_core_is_enabled+0x22/0xb0
[<601f8986>] ? clk_gate_test_invert_enable+0xa6/0x2f0
[<601c0ad0>] ? kunit_binary_assert_format+0x0/0x100
[<60063aa0>] ? complete+0x0/0x70
[<601bff9d>] ? kunit_try_run_case+0x4d/0x80
[<60295855>] ? schedule+0x55/0x100
[<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20
[<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20
[<60054364>] ? kthread+0xf4/0x150
[<60019e42>] ? new_thread_handler+0x82/0xc0
---[ end trace 0000000000000000 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 47 at lib/logic_iomem.c:190 __raw_readl+0xbd/0xd0
Invalid readl at address 60c057d8
CPU: 0 PID: 47 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165
Stack:
6030a5b6 60277543 60350943 6030a5b6
6002a000 00000001 000000be 6031ccb0
a088bd58 60294456 a088bda0 00000000
Call Trace:
[<6002a000>] ? um_set_signals+0x0/0x50
[<60294456>] ? dump_stack_lvl+0x44/0x50
[<60277543>] ? _printk+0x0/0x9b
[<60274ddb>] ? __warn.cold+0x33/0xa3
[<6002a044>] ? um_set_signals+0x44/0x50
[<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9
[<601bfdc0>] ? kunit_do_failed_assertion+0x100/0x1c0
[<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9
[<601bfcc0>] ? kunit_do_failed_assertion+0x0/0x1c0
[<60264c20>] ? __raw_writel+0xb0/0xe0
[<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9
[<601ef400>] ? clk_hw_is_enabled+0x0/0x10
[<60264b5d>] ? __raw_readl+0xbd/0xd0
[<601f694a>] ? clk_gate_is_enabled+0x1a/0x50
[<601ebf42>] ? clk_core_is_enabled+0x22/0xb0
[<601f8986>] ? clk_gate_test_invert_enable+0xa6/0x2f0
[<601c0ad0>] ? kunit_binary_assert_format+0x0/0x100
[<60063aa0>] ? complete+0x0/0x70
[<601bff9d>] ? kunit_try_run_case+0x4d/0x80
[<60295855>] ? schedule+0x55/0x100
[<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20
[<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20
[<60054364>] ? kthread+0xf4/0x150
[<60019e42>] ? new_thread_handler+0x82/0xc0
---[ end trace 0000000000000000 ]---
# clk_gate_test_invert_enable: EXPECTATION FAILED at drivers/clk/clk-gate_test.c:250
Expected clk_hw_is_enabled(hw) to be true, but is false
clk_unregister: unregistering prepared clock: test_gate
clk_unregister: unregistering prepared clock: test_parent
not ok 1 - clk_gate_test_invert_enable
------------[ cut here ]------------
WARNING: CPU: 0 PID: 48 at lib/logic_iomem.c:141 __raw_readl+0x9f/0xd0
CPU: 0 PID: 48 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165
Stack:
6030a5b6 60277543 60350943 6030a5b6
6002a000 00000000 0000008d 6031ccb0
a088bcf8 60294456 00000000 00000000
Call Trace:
[<6002a000>] ? um_set_signals+0x0/0x50
[<60294456>] ? dump_stack_lvl+0x44/0x50
[<60277543>] ? _printk+0x0/0x9b
[<60274ddb>] ? __warn.cold+0x33/0xa3
[<601ef880>] ? clk_unprepare+0x0/0x50
[<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9
[<601ee1bb>] ? __clk_register+0x12b/0xb50
[<601ececa>] ? clk_core_lookup+0x5a/0x150
[<601ec370>] ? clk_prepare_unlock+0x0/0x100
[<601ee953>] ? __clk_register+0x8c3/0xb50
[<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9
[<60264b3f>] ? __raw_readl+0x9f/0xd0
[<601f68bd>] ? clk_gate_endisable+0xcd/0x110
[<601f6925>] ? clk_gate_enable+0x15/0x20
[<601ec147>] ? clk_core_enable+0x57/0xc0
[<601efb0e>] ? clk_enable+0x2e/0x50
[<601f937f>] ? clk_gate_test_invert_disable+0x12f/0x390
[<60295990>] ? schedule_preempt_disabled+0x0/0x20
[<60063aa0>] ? complete+0x0/0x70
[<601bff9d>] ? kunit_try_run_case+0x4d/0x80
[<60295855>] ? schedule+0x55/0x100
[<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20
[<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20
[<60054364>] ? kthread+0xf4/0x150
[<60019e42>] ? new_thread_handler+0x82/0xc0
---[ end trace 0000000000000000 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 48 at lib/logic_iomem.c:190 __raw_readl+0xbd/0xd0
Invalid readl at address 60c057d8
CPU: 0 PID: 48 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165
Stack:
6030a5b6 60277543 60350943 6030a5b6
6002a000 00000000 000000be 6031ccb0
a088bcf8 60294456 a088bd40 00000000
Call Trace:
[<6002a000>] ? um_set_signals+0x0/0x50
[<60294456>] ? dump_stack_lvl+0x44/0x50
[<60277543>] ? _printk+0x0/0x9b
[<60274ddb>] ? __warn.cold+0x33/0xa3
[<601ef880>] ? clk_unprepare+0x0/0x50
[<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9
[<601ee1bb>] ? __clk_register+0x12b/0xb50
[<601ececa>] ? clk_core_lookup+0x5a/0x150
[<601ec370>] ? clk_prepare_unlock+0x0/0x100
[<601ee953>] ? __clk_register+0x8c3/0xb50
[<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9
[<60264b5d>] ? __raw_readl+0xbd/0xd0
[<601f68bd>] ? clk_gate_endisable+0xcd/0x110
[<601f6925>] ? clk_gate_enable+0x15/0x20
[<601ec147>] ? clk_core_enable+0x57/0xc0
[<601efb0e>] ? clk_enable+0x2e/0x50
[<601f937f>] ? clk_gate_test_invert_disable+0x12f/0x390
[<60295990>] ? schedule_preempt_disabled+0x0/0x20
[<60063aa0>] ? complete+0x0/0x70
[<601bff9d>] ? kunit_try_run_case+0x4d/0x80
[<60295855>] ? schedule+0x55/0x100
[<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20
[<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20
[<60054364>] ? kthread+0xf4/0x150
[<60019e42>] ? new_thread_handler+0x82/0xc0
---[ end trace 0000000000000000 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 48 at lib/logic_iomem.c:141 __raw_writel+0xb0/0xe0
CPU: 0 PID: 48 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165
Stack:
6030a5b6 60277543 60350943 6030a5b6
6002a000 00000000 0000008d 6031ccb0
a088bce8 60294456 00000000 00000000
Call Trace:
[<6002a000>] ? um_set_signals+0x0/0x50
[<60294456>] ? dump_stack_lvl+0x44/0x50
[<60277543>] ? _printk+0x0/0x9b
[<60274ddb>] ? __warn.cold+0x33/0xa3
[<60277543>] ? _printk+0x0/0x9b
[<601ef880>] ? clk_unprepare+0x0/0x50
[<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9
[<601ee1bb>] ? __clk_register+0x12b/0xb50
[<601ec370>] ? clk_prepare_unlock+0x0/0x100
[<601ee953>] ? __clk_register+0x8c3/0xb50
[<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9
[<60264c20>] ? __raw_writel+0xb0/0xe0
[<601f689f>] ? clk_gate_endisable+0xaf/0x110
[<601f6925>] ? clk_gate_enable+0x15/0x20
[<601ec147>] ? clk_core_enable+0x57/0xc0
[<601efb0e>] ? clk_enable+0x2e/0x50
[<601f937f>] ? clk_gate_test_invert_disable+0x12f/0x390
[<60295990>] ? schedule_preempt_disabled+0x0/0x20
[<60063aa0>] ? complete+0x0/0x70
[<601bff9d>] ? kunit_try_run_case+0x4d/0x80
[<60295855>] ? schedule+0x55/0x100
[<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20
[<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20
[<60054364>] ? kthread+0xf4/0x150
[<60019e42>] ? new_thread_handler+0x82/0xc0
---[ end trace 0000000000000000 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 48 at lib/logic_iomem.c:190 clk_gate_endisable+0xaf/0x110
Invalid writeql of 0xffff7fff at address 60c057d8
CPU: 0 PID: 48 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165
Stack:
6030a5b6 60277543 60350943 6030a5b6
6002a000 00000000 000000be 6031ccb0
a088bd18 60294456 a088bd60 00000000
Call Trace:
[<6002a000>] ? um_set_signals+0x0/0x50
[<60294456>] ? dump_stack_lvl+0x44/0x50
[<60277543>] ? _printk+0x0/0x9b
[<60274ddb>] ? __warn.cold+0x33/0xa3
[<601ef880>] ? clk_unprepare+0x0/0x50
[<601ef880>] ? clk_unprepare+0x0/0x50
[<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9
[<601ec370>] ? clk_prepare_unlock+0x0/0x100
[<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9
[<60264c20>] ? __raw_writel+0xb0/0xe0
[<601f689f>] ? clk_gate_endisable+0xaf/0x110
[<601f6925>] ? clk_gate_enable+0x15/0x20
[<601ec147>] ? clk_core_enable+0x57/0xc0
[<601efb0e>] ? clk_enable+0x2e/0x50
[<601f937f>] ? clk_gate_test_invert_disable+0x12f/0x390
[<60295990>] ? schedule_preempt_disabled+0x0/0x20
[<60063aa0>] ? complete+0x0/0x70
[<601bff9d>] ? kunit_try_run_case+0x4d/0x80
[<60295855>] ? schedule+0x55/0x100
[<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20
[<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20
[<60054364>] ? kthread+0xf4/0x150
[<60019e42>] ? new_thread_handler+0x82/0xc0
---[ end trace 0000000000000000 ]---
# clk_gate_test_invert_disable: ASSERTION FAILED at drivers/clk/clk-gate_test.c:266
Expected enable_val == ctx->fake_reg, but
enable_val == 0
ctx->fake_reg == 32768
clk_unregister: unregistering prepared clock: test_gate
clk_unregister: unregistering prepared clock: test_parent
not ok 2 - clk_gate_test_invert_disable
# clk-gate-invert-test: pass:0 fail:2 skip:0 total:2
# Totals: pass:0 fail:2 skip:0 total:2
not ok 8 - clk-gate-invert-test
# Subtest: clk-gate-hiword-test
1..2
------------[ cut here ]------------
WARNING: CPU: 0 PID: 49 at lib/logic_iomem.c:141 __raw_writel+0xb0/0xe0
CPU: 0 PID: 49 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165
Stack:
6030a5b6 60277543 60350943 6030a5b6
6002a000 00000000 0000008d 6031ccb0
a088bcf8 60294456 00000000 00000000
Call Trace:
[<6002a000>] ? um_set_signals+0x0/0x50
[<60294456>] ? dump_stack_lvl+0x44/0x50
[<60277543>] ? _printk+0x0/0x9b
[<60274ddb>] ? __warn.cold+0x33/0xa3
[<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9
[<601ee1bb>] ? __clk_register+0x12b/0xb50
[<601ececa>] ? clk_core_lookup+0x5a/0x150
[<601ec370>] ? clk_prepare_unlock+0x0/0x100
[<601ee953>] ? __clk_register+0x8c3/0xb50
[<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9
[<60264c20>] ? __raw_writel+0xb0/0xe0
[<601f689f>] ? clk_gate_endisable+0xaf/0x110
[<601f6925>] ? clk_gate_enable+0x15/0x20
[<601ec147>] ? clk_core_enable+0x57/0xc0
[<601efb0e>] ? clk_enable+0x2e/0x50
[<601f86e7>] ? clk_gate_test_hiword_enable+0x107/0x300
[<60295990>] ? schedule_preempt_disabled+0x0/0x20
[<60063aa0>] ? complete+0x0/0x70
[<601bff9d>] ? kunit_try_run_case+0x4d/0x80
[<60295855>] ? schedule+0x55/0x100
[<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20
[<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20
[<60054364>] ? kthread+0xf4/0x150
[<60019e42>] ? new_thread_handler+0x82/0xc0
---[ end trace 0000000000000000 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 49 at lib/logic_iomem.c:190 clk_gate_endisable+0xaf/0x110
Invalid writeql of 0x2000200 at address 60c057d8
CPU: 0 PID: 49 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165
Stack:
6030a5b6 60277543 60350943 6030a5b6
6002a000 00000000 000000be 6031ccb0
a088bd28 60294456 a088bd70 00000000
Call Trace:
[<6002a000>] ? um_set_signals+0x0/0x50
[<60294456>] ? dump_stack_lvl+0x44/0x50
[<60277543>] ? _printk+0x0/0x9b
[<60274ddb>] ? __warn.cold+0x33/0xa3
[<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9
[<601ec370>] ? clk_prepare_unlock+0x0/0x100
[<601ee953>] ? __clk_register+0x8c3/0xb50
[<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9
[<60264c20>] ? __raw_writel+0xb0/0xe0
[<601f689f>] ? clk_gate_endisable+0xaf/0x110
[<601f6925>] ? clk_gate_enable+0x15/0x20
[<601ec147>] ? clk_core_enable+0x57/0xc0
[<601efb0e>] ? clk_enable+0x2e/0x50
[<601f86e7>] ? clk_gate_test_hiword_enable+0x107/0x300
[<60295990>] ? schedule_preempt_disabled+0x0/0x20
[<60063aa0>] ? complete+0x0/0x70
[<601bff9d>] ? kunit_try_run_case+0x4d/0x80
[<60295855>] ? schedule+0x55/0x100
[<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20
[<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20
[<60054364>] ? kthread+0xf4/0x150
[<60019e42>] ? new_thread_handler+0x82/0xc0
---[ end trace 0000000000000000 ]---
# clk_gate_test_hiword_enable: EXPECTATION FAILED at drivers/clk/clk-gate_test.c:322
Expected enable_val == ctx->fake_reg, but
enable_val == 33554944
ctx->fake_reg == 0
------------[ cut here ]------------
WARNING: CPU: 0 PID: 49 at lib/logic_iomem.c:141 __raw_readl+0x9f/0xd0
CPU: 0 PID: 49 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165
Stack:
6030a5b6 60277543 60350943 6030a5b6
6002a000 00000001 0000008d 6031ccb0
a088bd58 60294456 00000000 00000000
Call Trace:
[<6002a000>] ? um_set_signals+0x0/0x50
[<60294456>] ? dump_stack_lvl+0x44/0x50
[<60277543>] ? _printk+0x0/0x9b
[<60274ddb>] ? __warn.cold+0x33/0xa3
[<6002a044>] ? um_set_signals+0x44/0x50
[<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9
[<601bfdc0>] ? kunit_do_failed_assertion+0x100/0x1c0
[<601bf580>] ? kunit_log_append+0x0/0x130
[<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9
[<601bfcc0>] ? kunit_do_failed_assertion+0x0/0x1c0
[<60264c20>] ? __raw_writel+0xb0/0xe0
[<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9
[<601ef400>] ? clk_hw_is_enabled+0x0/0x10
[<60264b3f>] ? __raw_readl+0x9f/0xd0
[<601f694a>] ? clk_gate_is_enabled+0x1a/0x50
[<601ebf42>] ? clk_core_is_enabled+0x22/0xb0
[<601f8689>] ? clk_gate_test_hiword_enable+0xa9/0x300
[<601c0ad0>] ? kunit_binary_assert_format+0x0/0x100
[<60063aa0>] ? complete+0x0/0x70
[<601bff9d>] ? kunit_try_run_case+0x4d/0x80
[<60295855>] ? schedule+0x55/0x100
[<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20
[<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20
[<60054364>] ? kthread+0xf4/0x150
[<60019e42>] ? new_thread_handler+0x82/0xc0
---[ end trace 0000000000000000 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 49 at lib/logic_iomem.c:190 __raw_readl+0xbd/0xd0
Invalid readl at address 60c057d8
CPU: 0 PID: 49 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165
Stack:
6030a5b6 60277543 60350943 6030a5b6
6002a000 00000001 000000be 6031ccb0
a088bd58 60294456 a088bda0 00000000
Call Trace:
[<6002a000>] ? um_set_signals+0x0/0x50
[<60294456>] ? dump_stack_lvl+0x44/0x50
[<60277543>] ? _printk+0x0/0x9b
[<60274ddb>] ? __warn.cold+0x33/0xa3
[<6002a044>] ? um_set_signals+0x44/0x50
[<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9
[<601bfdc0>] ? kunit_do_failed_assertion+0x100/0x1c0
[<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9
[<601bfcc0>] ? kunit_do_failed_assertion+0x0/0x1c0
[<60264c20>] ? __raw_writel+0xb0/0xe0
[<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9
[<601ef400>] ? clk_hw_is_enabled+0x0/0x10
[<60264b5d>] ? __raw_readl+0xbd/0xd0
[<601f694a>] ? clk_gate_is_enabled+0x1a/0x50
[<601ebf42>] ? clk_core_is_enabled+0x22/0xb0
[<601f8689>] ? clk_gate_test_hiword_enable+0xa9/0x300
[<601c0ad0>] ? kunit_binary_assert_format+0x0/0x100
[<60063aa0>] ? complete+0x0/0x70
[<601bff9d>] ? kunit_try_run_case+0x4d/0x80
[<60295855>] ? schedule+0x55/0x100
[<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20
[<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20
[<60054364>] ? kthread+0xf4/0x150
[<60019e42>] ? new_thread_handler+0x82/0xc0
---[ end trace 0000000000000000 ]---
clk_unregister: unregistering prepared clock: test_gate
clk_unregister: unregistering prepared clock: test_parent
not ok 1 - clk_gate_test_hiword_enable
------------[ cut here ]------------
WARNING: CPU: 0 PID: 50 at lib/logic_iomem.c:141 __raw_writel+0xb0/0xe0
CPU: 0 PID: 50 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165
Stack:
6030a5b6 60277543 60350943 6030a5b6
6002a000 00000000 0000008d 6031ccb0
a088bce8 60294456 00000000 00000000
Call Trace:
[<6002a000>] ? um_set_signals+0x0/0x50
[<60294456>] ? dump_stack_lvl+0x44/0x50
[<60277543>] ? _printk+0x0/0x9b
[<60274ddb>] ? __warn.cold+0x33/0xa3
[<601ef880>] ? clk_unprepare+0x0/0x50
[<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9
[<600ed737>] ? kmem_cache_alloc+0x137/0x1a0
[<601ee1bb>] ? __clk_register+0x12b/0xb50
[<601ec370>] ? clk_prepare_unlock+0x0/0x100
[<601ec370>] ? clk_prepare_unlock+0x0/0x100
[<601ee953>] ? __clk_register+0x8c3/0xb50
[<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9
[<60264c20>] ? __raw_writel+0xb0/0xe0
[<601f689f>] ? clk_gate_endisable+0xaf/0x110
[<601f6925>] ? clk_gate_enable+0x15/0x20
[<601ec147>] ? clk_core_enable+0x57/0xc0
[<601efb0e>] ? clk_enable+0x2e/0x50
[<601f8fef>] ? clk_gate_test_hiword_disable+0x12f/0x390
[<60295990>] ? schedule_preempt_disabled+0x0/0x20
[<60063aa0>] ? complete+0x0/0x70
[<601bff9d>] ? kunit_try_run_case+0x4d/0x80
[<60295855>] ? schedule+0x55/0x100
[<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20
[<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20
[<60054364>] ? kthread+0xf4/0x150
[<60019e42>] ? new_thread_handler+0x82/0xc0
---[ end trace 0000000000000000 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 50 at lib/logic_iomem.c:190 clk_gate_endisable+0xaf/0x110
Invalid writeql of 0x2000200 at address 60c057d8
CPU: 0 PID: 50 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165
Stack:
6030a5b6 60277543 60350943 6030a5b6
6002a000 00000000 000000be 6031ccb0
a088bd18 60294456 a088bd60 00000000
Call Trace:
[<6002a000>] ? um_set_signals+0x0/0x50
[<60294456>] ? dump_stack_lvl+0x44/0x50
[<60277543>] ? _printk+0x0/0x9b
[<60274ddb>] ? __warn.cold+0x33/0xa3
[<601ef880>] ? clk_unprepare+0x0/0x50
[<601ef880>] ? clk_unprepare+0x0/0x50
[<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9
[<601ec370>] ? clk_prepare_unlock+0x0/0x100
[<601ec370>] ? clk_prepare_unlock+0x0/0x100
[<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9
[<60264c20>] ? __raw_writel+0xb0/0xe0
[<601f689f>] ? clk_gate_endisable+0xaf/0x110
[<601f6925>] ? clk_gate_enable+0x15/0x20
[<601ec147>] ? clk_core_enable+0x57/0xc0
[<601efb0e>] ? clk_enable+0x2e/0x50
[<601f8fef>] ? clk_gate_test_hiword_disable+0x12f/0x390
[<60295990>] ? schedule_preempt_disabled+0x0/0x20
[<60063aa0>] ? complete+0x0/0x70
[<601bff9d>] ? kunit_try_run_case+0x4d/0x80
[<60295855>] ? schedule+0x55/0x100
[<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20
[<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20
[<60054364>] ? kthread+0xf4/0x150
[<60019e42>] ? new_thread_handler+0x82/0xc0
---[ end trace 0000000000000000 ]---
# clk_gate_test_hiword_disable: ASSERTION FAILED at drivers/clk/clk-gate_test.c:339
Expected enable_val == ctx->fake_reg, but
enable_val == 33554944
ctx->fake_reg == 0
clk_unregister: unregistering prepared clock: test_gate
clk_unregister: unregistering prepared clock: test_parent
not ok 2 - clk_gate_test_hiword_disable
# clk-gate-hiword-test: pass:0 fail:2 skip:0 total:2
# Totals: pass:0 fail:2 skip:0 total:2
not ok 9 - clk-gate-hiword-test
# Subtest: clk-gate-is_enabled-test
1..4
------------[ cut here ]------------
WARNING: CPU: 0 PID: 51 at lib/logic_iomem.c:141 __raw_readl+0x9f/0xd0
CPU: 0 PID: 51 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165
Stack:
6030a5b6 60277543 60350943 6030a5b6
6002a000 00000001 0000008d 6031ccb0
a088bd78 60294456 00000000 00000000
Call Trace:
[<6002a000>] ? um_set_signals+0x0/0x50
[<60294456>] ? dump_stack_lvl+0x44/0x50
[<60277543>] ? _printk+0x0/0x9b
[<60274ddb>] ? __warn.cold+0x33/0xa3
[<601ee1bb>] ? __clk_register+0x12b/0xb50
[<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9
[<600ed737>] ? kmem_cache_alloc+0x137/0x1a0
[<601f0d95>] ? clk_hw_register+0x15/0x30
[<601f6ae7>] ? __clk_hw_register_gate+0x167/0x190
[<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9
[<60264b3f>] ? __raw_readl+0x9f/0xd0
[<601f694a>] ? clk_gate_is_enabled+0x1a/0x50
[<601ebf42>] ? clk_core_is_enabled+0x22/0xb0
[<601f717f>] ? clk_gate_test_is_enabled+0x6f/0x130
[<60063aa0>] ? complete+0x0/0x70
[<6002a044>] ? um_set_signals+0x44/0x50
[<602952f0>] ? __schedule+0x0/0x510
[<601bff9d>] ? kunit_try_run_case+0x4d/0x80
[<60295855>] ? schedule+0x55/0x100
[<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20
[<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20
[<60054364>] ? kthread+0xf4/0x150
[<60019e42>] ? new_thread_handler+0x82/0xc0
---[ end trace 0000000000000000 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 51 at lib/logic_iomem.c:190 __raw_readl+0xbd/0xd0
Invalid readl at address 60c057d8
CPU: 0 PID: 51 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165
Stack:
6030a5b6 60277543 60350943 6030a5b6
6002a000 00000001 000000be 6031ccb0
a088bd78 60294456 a088bdc0 00000000
Call Trace:
[<6002a000>] ? um_set_signals+0x0/0x50
[<60294456>] ? dump_stack_lvl+0x44/0x50
[<60277543>] ? _printk+0x0/0x9b
[<60274ddb>] ? __warn.cold+0x33/0xa3
[<601ee1bb>] ? __clk_register+0x12b/0xb50
[<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9
[<600ed737>] ? kmem_cache_alloc+0x137/0x1a0
[<601f0d95>] ? clk_hw_register+0x15/0x30
[<601f6ae7>] ? __clk_hw_register_gate+0x167/0x190
[<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9
[<60264b5d>] ? __raw_readl+0xbd/0xd0
[<601f694a>] ? clk_gate_is_enabled+0x1a/0x50
[<601ebf42>] ? clk_core_is_enabled+0x22/0xb0
[<601f717f>] ? clk_gate_test_is_enabled+0x6f/0x130
[<60063aa0>] ? complete+0x0/0x70
[<6002a044>] ? um_set_signals+0x44/0x50
[<602952f0>] ? __schedule+0x0/0x510
[<601bff9d>] ? kunit_try_run_case+0x4d/0x80
[<60295855>] ? schedule+0x55/0x100
[<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20
[<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20
[<60054364>] ? kthread+0xf4/0x150
[<60019e42>] ? new_thread_handler+0x82/0xc0
---[ end trace 0000000000000000 ]---
ok 1 - clk_gate_test_is_enabled
------------[ cut here ]------------
WARNING: CPU: 0 PID: 52 at lib/logic_iomem.c:141 __raw_readl+0x9f/0xd0
CPU: 0 PID: 52 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165
Stack:
6030a5b6 60277543 60350943 6030a5b6
6002a000 00000001 0000008d 6031ccb0
a088bd78 60294456 00000000 00000000
Call Trace:
[<6002a000>] ? um_set_signals+0x0/0x50
[<60294456>] ? dump_stack_lvl+0x44/0x50
[<60277543>] ? _printk+0x0/0x9b
[<60274ddb>] ? __warn.cold+0x33/0xa3
[<601ee1bb>] ? __clk_register+0x12b/0xb50
[<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9
[<600ed737>] ? kmem_cache_alloc+0x137/0x1a0
[<601f0d95>] ? clk_hw_register+0x15/0x30
[<601f6ae7>] ? __clk_hw_register_gate+0x167/0x190
[<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9
[<60264b3f>] ? __raw_readl+0x9f/0xd0
[<601f694a>] ? clk_gate_is_enabled+0x1a/0x50
[<601ebf42>] ? clk_core_is_enabled+0x22/0xb0
[<601f704f>] ? clk_gate_test_is_disabled+0x6f/0x130
[<60063aa0>] ? complete+0x0/0x70
[<6002a044>] ? um_set_signals+0x44/0x50
[<602952f0>] ? __schedule+0x0/0x510
[<601bff9d>] ? kunit_try_run_case+0x4d/0x80
[<60295855>] ? schedule+0x55/0x100
[<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20
[<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20
[<60054364>] ? kthread+0xf4/0x150
[<60019e42>] ? new_thread_handler+0x82/0xc0
---[ end trace 0000000000000000 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 52 at lib/logic_iomem.c:190 __raw_readl+0xbd/0xd0
Invalid readl at address 60c057d8
CPU: 0 PID: 52 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165
Stack:
6030a5b6 60277543 60350943 6030a5b6
6002a000 00000001 000000be 6031ccb0
a088bd78 60294456 a088bdc0 00000000
Call Trace:
[<6002a000>] ? um_set_signals+0x0/0x50
[<60294456>] ? dump_stack_lvl+0x44/0x50
[<60277543>] ? _printk+0x0/0x9b
[<60274ddb>] ? __warn.cold+0x33/0xa3
[<601ee1bb>] ? __clk_register+0x12b/0xb50
[<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9
[<600ed737>] ? kmem_cache_alloc+0x137/0x1a0
[<601f0d95>] ? clk_hw_register+0x15/0x30
[<601f6ae7>] ? __clk_hw_register_gate+0x167/0x190
[<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9
[<60264b5d>] ? __raw_readl+0xbd/0xd0
[<601f694a>] ? clk_gate_is_enabled+0x1a/0x50
[<601ebf42>] ? clk_core_is_enabled+0x22/0xb0
[<601f704f>] ? clk_gate_test_is_disabled+0x6f/0x130
[<60063aa0>] ? complete+0x0/0x70
[<6002a044>] ? um_set_signals+0x44/0x50
[<602952f0>] ? __schedule+0x0/0x510
[<601bff9d>] ? kunit_try_run_case+0x4d/0x80
[<60295855>] ? schedule+0x55/0x100
[<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20
[<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20
[<60054364>] ? kthread+0xf4/0x150
[<60019e42>] ? new_thread_handler+0x82/0xc0
---[ end trace 0000000000000000 ]---
# clk_gate_test_is_disabled: ASSERTION FAILED at drivers/clk/clk-gate_test.c:409
Expected clk_hw_is_enabled(hw) to be false, but is true
not ok 2 - clk_gate_test_is_disabled
# clk_gate_test_is_enabled_inverted: ASSERTION FAILED at drivers/clk/clk-gate_test.c:423
Expected hw is not error, but is: -17
not ok 3 - clk_gate_test_is_enabled_inverted
# clk_gate_test_is_disabled_inverted: ASSERTION FAILED at drivers/clk/clk-gate_test.c:438
Expected hw is not error, but is: -17
not ok 4 - clk_gate_test_is_disabled_inverted
# clk-gate-is_enabled-test: pass:1 fail:3 skip:0 total:4
# Totals: pass:1 fail:3 skip:0 total:4
not ok 10 - clk-gate-is_enabled-test
[16:45:58] Elapsed time: 5.759s total, 0.857s configuring, 4.786s building, 0.080s running

Maxime
signature.asc

Daniel Latypov

unread,
Jul 11, 2022, 11:10:48 AMJul 11
to Maxime Ripard, brendan...@google.com, davi...@google.com, linux-...@vger.kernel.org, kuni...@googlegroups.com, linux-k...@vger.kernel.org, sk...@linuxfoundation.org, José Expósito, Mike Turquette, Stephen Boyd, linu...@vger.kernel.org
On Mon, Jul 11, 2022 at 7:46 AM Maxime Ripard <max...@cerno.tech> wrote:
>
> Unfortunately, this breaks the clock tests in next-20220711:
> $ ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/clk/.kunitconfig --raw_output

Thanks, this is indeed an issue.

I remember noticing this in early April.
I incorrectly remembered that a fix had been sent.

A more minimal reproducer:
$ ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/clk
'clk-gate-test.clk_gate_test_enable'

The part of the test that becomes problematic with this patch (i.e.
enabling logic iomem) is the cast on line 143.

130 struct clk_gate_test_context {
131 void __iomem *fake_mem;
132 struct clk_hw *hw;
133 struct clk_hw *parent;
134 u32 fake_reg; /* Keep at end, KASAN can detect out of bounds */
135 };
136
137 static struct clk_gate_test_context
*clk_gate_test_alloc_ctx(struct kunit *test)
138 {
139 struct clk_gate_test_context *ctx;
140
141 test->priv = ctx = kunit_kzalloc(test, sizeof(*ctx),
GFP_KERNEL);
142 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, ctx);
143 ctx->fake_mem = (void __force __iomem *)&ctx->fake_reg;
144
145 return ctx;
146 }

A simple fix we could carry in the KUnit branch is this:

diff --git a/drivers/clk/.kunitconfig b/drivers/clk/.kunitconfig
index cdbc7d7deba9..2fbeb71316f8 100644
--- a/drivers/clk/.kunitconfig
+++ b/drivers/clk/.kunitconfig
@@ -2,3 +2,4 @@ CONFIG_KUNIT=y
CONFIG_COMMON_CLK=y
CONFIG_CLK_KUNIT_TEST=y
CONFIG_CLK_GATE_KUNIT_TEST=y
+CONFIG_UML_PCI_OVER_VIRTIO=n

The new ability to disable it comes from
https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/commit/?h=kunit&id=8a7c6f859a20ca36a9e3ce71662de697898c9ef5

Thoughts?

Daniel

Maxime Ripard

unread,
Jul 11, 2022, 11:50:09 AMJul 11
to Daniel Latypov, brendan...@google.com, davi...@google.com, linux-...@vger.kernel.org, kuni...@googlegroups.com, linux-k...@vger.kernel.org, sk...@linuxfoundation.org, José Expósito, Mike Turquette, Stephen Boyd, linu...@vger.kernel.org
It works for me now thanks

Feel free to add my Tested-by

Maxime
signature.asc

Daniel Latypov

unread,
Jul 11, 2022, 12:28:22 PMJul 11
to Maxime Ripard, brendan...@google.com, davi...@google.com, linux-...@vger.kernel.org, kuni...@googlegroups.com, linux-k...@vger.kernel.org, sk...@linuxfoundation.org, José Expósito, Mike Turquette, Stephen Boyd, linu...@vger.kernel.org
On Mon, Jul 11, 2022 at 8:50 AM Maxime Ripard <max...@cerno.tech> wrote:
> > A simple fix we could carry in the KUnit branch is this:
> >
> > diff --git a/drivers/clk/.kunitconfig b/drivers/clk/.kunitconfig
> > index cdbc7d7deba9..2fbeb71316f8 100644
> > --- a/drivers/clk/.kunitconfig
> > +++ b/drivers/clk/.kunitconfig
> > @@ -2,3 +2,4 @@ CONFIG_KUNIT=y
> > CONFIG_COMMON_CLK=y
> > CONFIG_CLK_KUNIT_TEST=y
> > CONFIG_CLK_GATE_KUNIT_TEST=y
> > +CONFIG_UML_PCI_OVER_VIRTIO=n
>
> It works for me now thanks
>
> Feel free to add my Tested-by
>
> Maxime

Thanks, sending out
https://lore.kernel.org/linux-kselftest/20220711162713.2...@google.com
Reply all
Reply to author
Forward
0 new messages