test: Check tid value
PATCH 1/1 test: Check tid value
From: Eugene Loh <[email protected]>
We were checking the built-in variable tid simply by testing that we could print it and its value was not -1.
Add a test that confirms the value is actually correct; compare to C output of gettid().
In line with other similar tests, also check for the profile provider.
While we're at it, check the pid value and the pthread_t value returned via pthread_create().
Signed-off-by Eugene Loh <[email protected]>
--- test/unittest/builtinvar/tst.tid_pid.r | 1 + test/unittest/builtinvar/tst.tid_pid.sh | 126 ++++++++++++++++++++++++ 2 files changed, 127 insertions(+) create mode 100644 test/unittest/builtinvar/tst.tid_pid.r create mode 100755 test/unittest/builtinvar/tst.tid_pid.sh
test/unittest/builtinvar/tst.tid_pid.r new file +1 -0
@@ -0,0 +1 @@ +success
test/unittest/builtinvar/tst.tid_pid.sh new file +126 -0
126 lines not on this page · raw message
Signature · 1 line
2.43.5