selftests/user_events: Fix abi_test for BE archs
authorBeau Belgrave <beaub@linux.microsoft.com>
Thu, 5 Oct 2023 21:57:12 +0000 (21:57 +0000)
committerShuah Khan <skhan@linuxfoundation.org>
Tue, 17 Oct 2023 21:07:19 +0000 (15:07 -0600)
commitcf5a103c98a6fb9ee3164334cb5502df6360749b
treee889b6e33c670b89edd9e7895e541b090d92a378
parent6f874fa021dfc7bf37f4f37da3a5aaa41fe9c39c
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>
tools/testing/selftests/user_events/abi_test.c