projects
/
platform
/
core
/
system
/
dlog.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
752ab02
)
Workaround gettid test failure
68/227968/3
author
Michal Bloch
<m.bloch@samsung.com>
Tue, 17 Mar 2020 15:11:56 +0000
(16:11 +0100)
committer
Michal Bloch
<m.bloch@partner.samsung.com>
Tue, 17 Mar 2020 16:18:20 +0000
(16:18 +0000)
Change-Id: Ie36fb856973f2d180da562d3c0d6d6ee380f46c7
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
src/tests/pipe_message.c
patch
|
blob
|
history
diff --git
a/src/tests/pipe_message.c
b/src/tests/pipe_message.c
index
66c81c1
..
5f4f13c
100644
(file)
--- a/
src/tests/pipe_message.c
+++ b/
src/tests/pipe_message.c
@@
-31,7
+31,14
@@
int main()
clock_gettime(CLOCK_MONOTONIC, &ts_post);
assert(le->pid == getpid());
- assert(le->tid == gettid());
+
+ pid_t tid = gettid();
+ if (tid != -1 && tid != 0) {
+ /* Some build environments have trouble with gettid.
+ * In those cases there's little point doing this check. */
+ assert(le->tid == tid);
+ }
+
assert(le->priority == prio);
assert(!strcmp(le->msg, tag));
assert(!strcmp(le->msg + sizeof(tag), msg));