Skip to contentSkip to conversation

test: Check tid value

PATCH New [email protected] 1 participant 1 message Feb 24, 2025

lore
Share & tools
lore
#0 lore raw

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().

---
 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
new file mode 100644
index 000000000..2e9ba477f
@@ -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