<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/base/test/property-entry-test.c, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-10-05T11:11:44+00:00</updated>
<entry>
<title>drivers: base: test: Make property entry API test modular</title>
<updated>2023-10-05T11:11:44+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2023-09-27T13:20:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=98ad1dd06a02096fff6c65703a85b9f3c3de1a7d'/>
<id>urn:sha1:98ad1dd06a02096fff6c65703a85b9f3c3de1a7d</id>
<content type='text'>
There is no reason why the KUnit Tests for the property entry API can
only be built-in.  Add support for building these tests as a loadable
module, like is supported by most other tests.

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Link: https://lore.kernel.org/r/98388154383df9d4ced73946efd18318aeea50e2.1695820382.git.geert+renesas@glider.be
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>software node: Switch property entry test to a new API</title>
<updated>2023-01-17T18:04:26+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2022-12-28T09:49:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d903bca1897e27e6bebb3522d44697c478cc0c4b'/>
<id>urn:sha1:d903bca1897e27e6bebb3522d44697c478cc0c4b</id>
<content type='text'>
Switch property entry test to use software_node_register_node_group() API.
The current one is going to be removed soon.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Acked-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Tested-by: Daniel Scally &lt;dan.scally@ideasonboard.com&gt;
Acked-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20221228094922.84119-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>device property: Remove some casts in property-entry-test</title>
<updated>2021-06-23T22:37:21+00:00</updated>
<author>
<name>David Gow</name>
<email>davidgow@google.com</email>
</author>
<published>2021-05-13T19:31:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6d2e97894b67778109679443008c2d063787540e'/>
<id>urn:sha1:6d2e97894b67778109679443008c2d063787540e</id>
<content type='text'>
With some of the stricter type checking in KUnit's EXPECT macros
removed, several casts in property-entry-test are no longer required.

Remove the unnecessary casts, making the conditions clearer.

Signed-off-by: David Gow &lt;davidgow@google.com&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Reviewed-by: Brendan Higgins &lt;brendanhiggins@google.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>software node: Introduce SOFTWARE_NODE_REFERENCE() helper macro</title>
<updated>2021-04-05T11:18:22+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2021-03-29T15:12:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e588fead04ec51ad9ede7010676de19dcaa50b71'/>
<id>urn:sha1:e588fead04ec51ad9ede7010676de19dcaa50b71</id>
<content type='text'>
This is useful to assign software node reference with arguments
in a common way. Moreover, we have already couple of users that
may be converted. And by the fact, one of them is moved right here
to use the helper.

Tested-by: Daniel Scally &lt;djrscally@gmail.com&gt;
Reviewed-by: Daniel Scally &lt;djrscally@gmail.com&gt;
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20210329151207.36619-5-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>device property: Add test cases for fwnode_property_count_*() APIs</title>
<updated>2021-03-23T14:04:06+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2021-02-12T16:25:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7f2fac70b729d68a34e5eba8d1fb68eb69b05169'/>
<id>urn:sha1:7f2fac70b729d68a34e5eba8d1fb68eb69b05169</id>
<content type='text'>
Add test cases for fwnode_property_count_*() APIs.

While at it, modify the arrays of integers to be size of non-power-of-2
for better test coverage and decreasing stack usage.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20210212162539.86850-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drivers/base/test: fix global-out-of-bounds error</title>
<updated>2020-01-07T10:41:04+00:00</updated>
<author>
<name>Qian Cai</name>
<email>cai@lca.pw</email>
</author>
<published>2020-01-06T16:37:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=eabd5e7d8bf5994ad2e3aff22b84596b5b5485e8'/>
<id>urn:sha1:eabd5e7d8bf5994ad2e3aff22b84596b5b5485e8</id>
<content type='text'>
Commit c032ace71c29 ("software node: add basic tests for property
entries") introduced a global-out-of-bounds error because it forgot to
add a terminator of "nodes "for software_node_register_nodes() to
process.

 	# Subtest: property-entry
 	1..7
 	ok 1 - pe_test_uints
 	ok 2 - pe_test_uint_arrays
 	ok 3 - pe_test_strings
 	ok 4 - pe_test_bool
 	ok 5 - pe_test_move_inline_u8
 	ok 6 - pe_test_move_inline_str
 ==================================================================
 BUG: KASAN: global-out-of-bounds in
 software_node_register_nodes+0x41/0x80
 Read of size 8 at addr ffffffff989ef250 by task kunit_try_catch/316

 CPU: 17 PID: 316 Comm: kunit_try_catch Not tainted
 5.5.0-rc4-next-20200106+ #1
 Hardware name: HPE ProLiant DL385 Gen10/ProLiant DL385 Gen10, BIOS A40
 03/09/2018
 Call Trace:
  dump_stack+0xa0/0xea
  print_address_description.constprop.5.cold.7+0x64/0x384
  __kasan_report.cold.8+0x7a/0xc0
  kasan_report+0x12/0x20
  __asan_load8+0x71/0xa0
  software_node_register_nodes+0x41/0x80
  pe_test_reference+0x1eb/0x1200
  kunit_try_run_case+0x6b/0xd1
  kunit_generic_run_threadfn_adapter+0x29/0x50
  kthread+0x1e6/0x210
  ret_from_fork+0x27/0x50

 The buggy address belongs to the variable:
  nodes.21544+0x30/0x920

 Memory state around the buggy address:
  ffffffff989ef100: fa fa fa fa 00 04 fa fa fa fa fa fa 00 00 00 00
  ffffffff989ef180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 &gt;ffffffff989ef200: fa fa fa fa 00 00 00 00 00 00 fa fa fa fa fa fa
                                                  ^
  ffffffff989ef280: 00 06 fa fa fa fa fa fa 00 00 04 fa fa fa fa fa
  ffffffff989ef300: 00 00 fa fa fa fa fa fa 00 05 fa fa fa fa fa fa
 ==================================================================
 Disabling lock debugging due to kernel taint
 	ok 7 - pe_test_reference
 ok 8 - property-entry

Fixes: c032ace71c29 ("software node: add basic tests for property entries")
Signed-off-by: Qian Cai &lt;cai@lca.pw&gt;
Reviewed-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>software node: add basic tests for property entries</title>
<updated>2019-12-19T17:14:34+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2019-12-04T18:53:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c032ace71c29d513bf9df64ace1885fe5ff24981'/>
<id>urn:sha1:c032ace71c29d513bf9df64ace1885fe5ff24981</id>
<content type='text'>
This adds tests for creating software nodes with properties supplied by
PROPERTY_ENTRY_XXX() macros and fetching and validating data from said
nodes/properties.

We are using KUnit framework for the tests.

Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
</feed>
