<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/testing/selftests/user_events, branch v6.6.16</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.16</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.16'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-10-17T21:07:19+00:00</updated>
<entry>
<title>selftests/user_events: Fix abi_test for BE archs</title>
<updated>2023-10-17T21:07:19+00:00</updated>
<author>
<name>Beau Belgrave</name>
<email>beaub@linux.microsoft.com</email>
</author>
<published>2023-10-05T21:57:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cf5a103c98a6fb9ee3164334cb5502df6360749b'/>
<id>urn:sha1:cf5a103c98a6fb9ee3164334cb5502df6360749b</id>
<content type='text'>
The abi_test currently uses a long sized test value for enablement
checks. On LE this works fine, however, on BE this results in inaccurate
assert checks due to a bit being used and assuming it's value is the
same on both LE and BE.

Use int type for 32-bit values and long type for 64-bit values to ensure
appropriate behavior on both LE and BE.

Fixes: 60b1af8de8c1 ("tracing/user_events: Add ABI self-test")
Signed-off-by: Beau Belgrave &lt;beaub@linux.microsoft.com&gt;
Acked-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests/user_events: Fix to unmount tracefs when test created mount</title>
<updated>2023-09-18T17:04:52+00:00</updated>
<author>
<name>Beau Belgrave</name>
<email>beaub@linux.microsoft.com</email>
</author>
<published>2023-09-15T22:27:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8ed99af4a266a3492d773b5d85c3f8e9f81254b6'/>
<id>urn:sha1:8ed99af4a266a3492d773b5d85c3f8e9f81254b6</id>
<content type='text'>
Fix to unmount tracefs if the self-test mounted it to allow testing.
If tracefs was already mounted, this does nothing.

Suggested-by: Mark Brown &lt;broonie@kernel.org&gt;
Link: https://lore.kernel.org/all/29fce076-746c-4650-8358-b4e0fa215cf7@sirena.org.uk/
Fixes: a06023a8f78d ("selftests/user_events: Fix failures when user_events is not installed")

Signed-off-by: Beau Belgrave &lt;beaub@linux.microsoft.com&gt;
Reviewed-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests: user_events: create test-specific Kconfig fragments</title>
<updated>2023-09-11T23:06:48+00:00</updated>
<author>
<name>Naresh Kamboju</name>
<email>naresh.kamboju@linaro.org</email>
</author>
<published>2023-09-07T08:02:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7ab6fe6625c9bdcb8fa5f61c8f8e30e13f689284'/>
<id>urn:sha1:7ab6fe6625c9bdcb8fa5f61c8f8e30e13f689284</id>
<content type='text'>
Create the config file in user_events directory of testcase which
need more kernel configuration than the default defconfig. User
could use these configs with merge_config.sh script:

The Kconfig CONFIG_USER_EVENTS=y is needed for the test to read
data from the following files,
  - "/sys/kernel/tracing/user_events_data"
  - "/sys/kernel/tracing/user_events_status"
  - "/sys/kernel/tracing/events/user_events/*"

Enable config for specific testcase:
(export ARCH=xxx #for cross compiling)
./scripts/kconfig/merge_config.sh .config \
                tools/testing/selftests/user_events/config

Enable configs for all testcases:
(export ARCH=xxx #for cross compiling)
./scripts/kconfig/merge_config.sh .config \
                tools/testing/selftests/*/config

Cc: Beau Belgrave &lt;beaub@linux.microsoft.com&gt;
Cc: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Cc: linux-kselftest@vger.kernel.org
Signed-off-by: Naresh Kamboju &lt;naresh.kamboju@linaro.org&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests/user_events: Fix failures when user_events is not installed</title>
<updated>2023-09-11T23:04:11+00:00</updated>
<author>
<name>Beau Belgrave</name>
<email>beaub@linux.microsoft.com</email>
</author>
<published>2023-09-08T20:19:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a06023a8f78d3e9e73ca4363ccf3871a06e16ecc'/>
<id>urn:sha1:a06023a8f78d3e9e73ca4363ccf3871a06e16ecc</id>
<content type='text'>
When user_events is not installed the self tests currently fail. Now
that these self tests run by default we need to ensure they don't fail
when user_events was not enabled for the kernel being tested.

Add common methods to detect if tracefs and user_events is enabled. If
either is not enabled skip the test. If tracefs is enabled, but is not
mounted, mount tracefs and fail if there were any errors. Fail if not
run as root.

Fixes: 68b4d2d58389 ("selftests/user_events: Reenable build")
Reported-by: Naresh Kamboju &lt;naresh.kamboju@linaro.org&gt;
Link: https://lore.kernel.org/all/CA+G9fYuugZ0OMeS6HvpSS4nuf_A3s455ecipGBvER0LJHojKZg@mail.gmail.com/

Signed-off-by: Beau Belgrave &lt;beaub@linux.microsoft.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests/user_events: Reenable build</title>
<updated>2023-08-16T16:29:57+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2023-08-06T11:29:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=68b4d2d58389f9d1db7ffc02644498f215ee8c70'/>
<id>urn:sha1:68b4d2d58389f9d1db7ffc02644498f215ee8c70</id>
<content type='text'>
The user_events selftests were removed from the standard set of
selftests due to the uapi header it relies on having been temporarily
removed.  That header is now reinstated so we can reenable the tests.

Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests/user_events: Test struct size match cases</title>
<updated>2023-07-12T16:04:47+00:00</updated>
<author>
<name>Beau Belgrave</name>
<email>beaub@linux.microsoft.com</email>
</author>
<published>2023-06-29T23:50:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=769e637276c294c2254f698e6a57eda771deb3f7'/>
<id>urn:sha1:769e637276c294c2254f698e6a57eda771deb3f7</id>
<content type='text'>
The self tests for user_events currently does not ensure that the edge
case for struct types work properly with size differences.

Add cases for mis-matching struct names and sizes to ensure they work
properly.

Link: https://lkml.kernel.org/r/20230629235049.581-3-beaub@linux.microsoft.com

Cc: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Cc: linux-kselftest@vger.kernel.org
Signed-off-by: Beau Belgrave &lt;beaub@linux.microsoft.com&gt;
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>selftests/user_events: Add test cases when event is disabled</title>
<updated>2023-06-28T15:01:35+00:00</updated>
<author>
<name>sunliming</name>
<email>sunliming@kylinos.cn</email>
</author>
<published>2023-06-26T11:13:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d34a271accf8fad00e05aad2cecb9fb53a840a94'/>
<id>urn:sha1:d34a271accf8fad00e05aad2cecb9fb53a840a94</id>
<content type='text'>
When user_events are disabled, it's write operation should return -EBADF.
Add this test cases.

Link: https://lkml.kernel.org/r/20230626111344.19136-4-sunliming@kylinos.cn

Acked-by: Beau Belgrave &lt;beaub@linux.microsoft.com&gt;
Signed-off-by: sunliming &lt;sunliming@kylinos.cn&gt;
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>selftests/user_events: Enable the event before write_fault test in ftrace self-test</title>
<updated>2023-06-28T15:01:35+00:00</updated>
<author>
<name>sunliming</name>
<email>sunliming@kylinos.cn</email>
</author>
<published>2023-06-26T11:13:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c27b40cf919254459698d6622828152b509b9980'/>
<id>urn:sha1:c27b40cf919254459698d6622828152b509b9980</id>
<content type='text'>
The user_event has not be enabled in write_fault test in ftrace
self-test, Just enable it.

Link: https://lkml.kernel.org/r/20230626111344.19136-3-sunliming@kylinos.cn

Acked-by: Beau Belgrave &lt;beaub@linux.microsoft.com&gt;
Signed-off-by: sunliming &lt;sunliming@kylinos.cn&gt;
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>selftests/user_events: Adapt dyn_test to non-persist events</title>
<updated>2023-06-14T17:43:27+00:00</updated>
<author>
<name>Beau Belgrave</name>
<email>beaub@linux.microsoft.com</email>
</author>
<published>2023-06-14T16:33:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=61701242e86f0b509a0f5f9deb226bedfc8dfab7'/>
<id>urn:sha1:61701242e86f0b509a0f5f9deb226bedfc8dfab7</id>
<content type='text'>
Now that user_events does not honor persist events the dynamic_events
file cannot be easily used to test parsing and matching cases.

Update dyn_test to use the direct ABI file instead of dynamic_events so
that we still have testing coverage until persist events and
dynamic_events file integration has been decided.

Link: https://lkml.kernel.org/r/20230614163336.5797-6-beaub@linux.microsoft.com

Signed-off-by: Beau Belgrave &lt;beaub@linux.microsoft.com&gt;
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>selftests/user_events: Ensure auto cleanup works as expected</title>
<updated>2023-06-14T17:43:27+00:00</updated>
<author>
<name>Beau Belgrave</name>
<email>beaub@linux.microsoft.com</email>
</author>
<published>2023-06-14T16:33:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=216a137e3eadac888cece141bd2c940785e235a2'/>
<id>urn:sha1:216a137e3eadac888cece141bd2c940785e235a2</id>
<content type='text'>
User events now auto cleanup upon the last reference put. Update
ftrace_test to ensure this works as expected. Ensure EBUSY delays
while event is being deleted do not cause transient failures by
waiting and re-attempting.

Link: https://lkml.kernel.org/r/20230614163336.5797-5-beaub@linux.microsoft.com

Signed-off-by: Beau Belgrave &lt;beaub@linux.microsoft.com&gt;
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
</feed>
