cf5a103c | 05-Oct-2023 |
Beau Belgrave <beaub@linux.microsoft.com> |
selftests/user_events: Fix abi_test for BE archs
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 ch
selftests/user_events: Fix abi_test for BE archs
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 <beaub@linux.microsoft.com> Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
7ab6fe66 | 07-Sep-2023 |
Naresh Kamboju <naresh.kamboju@linaro.org> |
selftests: user_events: create test-specific Kconfig fragments
Create the config file in user_events directory of testcase which need more kernel configuration than the default defconfig. User could
selftests: user_events: create test-specific Kconfig fragments
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 <beaub@linux.microsoft.com> Cc: Shuah Khan <skhan@linuxfoundation.org> Cc: linux-kselftest@vger.kernel.org Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
d34a271a | 26-Jun-2023 |
sunliming <sunliming@kylinos.cn> |
selftests/user_events: Add test cases when event is disabled
When user_events are disabled, it's write operation should return -EBADF. Add this test cases.
Link: https://lkml.kernel.org/r/202306261
selftests/user_events: Add test cases when event is disabled
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 <beaub@linux.microsoft.com> Signed-off-by: sunliming <sunliming@kylinos.cn> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
show more ...
|
c27b40cf | 26-Jun-2023 |
sunliming <sunliming@kylinos.cn> |
selftests/user_events: Enable the event before write_fault test in ftrace self-test
The user_event has not be enabled in write_fault test in ftrace self-test, Just enable it.
Link: https://lkml.ker
selftests/user_events: Enable the event before write_fault test in ftrace self-test
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 <beaub@linux.microsoft.com> Signed-off-by: sunliming <sunliming@kylinos.cn> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
show more ...
|
61701242 | 14-Jun-2023 |
Beau Belgrave <beaub@linux.microsoft.com> |
selftests/user_events: Adapt dyn_test to non-persist events
Now that user_events does not honor persist events the dynamic_events file cannot be easily used to test parsing and matching cases.
Upda
selftests/user_events: Adapt dyn_test to non-persist events
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 <beaub@linux.microsoft.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
show more ...
|
216a137e | 14-Jun-2023 |
Beau Belgrave <beaub@linux.microsoft.com> |
selftests/user_events: Ensure auto cleanup works as expected
User events now auto cleanup upon the last reference put. Update ftrace_test to ensure this works as expected. Ensure EBUSY delays while
selftests/user_events: Ensure auto cleanup works as expected
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 <beaub@linux.microsoft.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
show more ...
|
42187bdc | 06-Jun-2023 |
sunliming <sunliming@kylinos.cn> |
selftests/user_events: Add perf self-test for empty arguments events
Tests to ensure events that has empty arguments can input trace record correctly when using perf.
Link: https://lkml.kernel.org/
selftests/user_events: Add perf self-test for empty arguments events
Tests to ensure events that has empty arguments can input trace record correctly when using perf.
Link: https://lkml.kernel.org/r/20230606062027.1008398-5-sunliming@kylinos.cn
Acked-by: Beau Belgrave <beaub@linux.microsoft.com> Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: sunliming <sunliming@kylinos.cn> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
show more ...
|
4b56c21b | 06-Jun-2023 |
sunliming <sunliming@kylinos.cn> |
selftests/user_events: Clear the events after perf self-test
When the self test is completed, perf self-test left the user events not to be cleared. Clear the events by unregister and delete the eve
selftests/user_events: Clear the events after perf self-test
When the self test is completed, perf self-test left the user events not to be cleared. Clear the events by unregister and delete the event.
Link: https://lkml.kernel.org/r/20230606062027.1008398-4-sunliming@kylinos.cn
Acked-by: Beau Belgrave <beaub@linux.microsoft.com> Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: sunliming <sunliming@kylinos.cn> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
show more ...
|
3e7269dd | 06-Jun-2023 |
sunliming <sunliming@kylinos.cn> |
selftests/user_events: Add ftrace self-test for empty arguments events
Tests to ensure events that has empty arguments can input trace record correctly when using ftrace.
Link: https://lkml.kernel.
selftests/user_events: Add ftrace self-test for empty arguments events
Tests to ensure events that has empty arguments can input trace record correctly when using ftrace.
Link: https://lkml.kernel.org/r/20230606062027.1008398-3-sunliming@kylinos.cn
Acked-by: Beau Belgrave <beaub@linux.microsoft.com> Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: sunliming <sunliming@kylinos.cn> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
show more ...
|
97bbce89 | 26-Apr-2023 |
Beau Belgrave <beaub@linux.microsoft.com> |
tracing/user_events: Prevent same address and bit per process
User processes register an address and bit pair for events. If the same address and bit pair are registered multiple times in the same p
tracing/user_events: Prevent same address and bit per process
User processes register an address and bit pair for events. If the same address and bit pair are registered multiple times in the same process, it can cause undefined behavior when events are enabled/disabled. When more than one are used, the bit could be turned off by another event being disabled, while the original event is still enabled.
Prevent undefined behavior by checking the current mm to see if any event has already been registered for the address and bit pair. Return EADDRINUSE back to the user process if it's already being used.
Update ftrace self-test to ensure this occurs properly.
Link: https://lkml.kernel.org/r/20230425225107.8525-4-beaub@linux.microsoft.com
Suggested-by: Doug Cook <dcook@linux.microsoft.com> Signed-off-by: Beau Belgrave <beaub@linux.microsoft.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
show more ...
|
17b439db | 26-Apr-2023 |
Beau Belgrave <beaub@linux.microsoft.com> |
tracing/user_events: Ensure bit is cleared on unregister
If an event is enabled and a user process unregisters user_events, the bit is left set. Fix this by always clearing the bit in the user proce
tracing/user_events: Ensure bit is cleared on unregister
If an event is enabled and a user process unregisters user_events, the bit is left set. Fix this by always clearing the bit in the user process if unregister is successful.
Update abi self-test to ensure this occurs properly.
Link: https://lkml.kernel.org/r/20230425225107.8525-3-beaub@linux.microsoft.com
Suggested-by: Doug Cook <dcook@linux.microsoft.com> Signed-off-by: Beau Belgrave <beaub@linux.microsoft.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
show more ...
|
60b1af8d | 29-Mar-2023 |
Beau Belgrave <beaub@linux.microsoft.com> |
tracing/user_events: Add ABI self-test
Add ABI specific self-test to ensure enablements work in various scenarios such as fork, VM_CLONE, and basic event enable/disable. Ensure ABI contracts/limits
tracing/user_events: Add ABI self-test
Add ABI specific self-test to ensure enablements work in various scenarios such as fork, VM_CLONE, and basic event enable/disable. Ensure ABI contracts/limits are also being upheld, such as bit limits and data size limits.
Link: https://lkml.kernel.org/r/20230328235219.203-8-beaub@linux.microsoft.com
Signed-off-by: Beau Belgrave <beaub@linux.microsoft.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
show more ...
|