aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-09-20 18:04:46 +0200
committerHarald Welte <laforge@gnumonks.org>2018-09-28 23:17:57 +0000
commit5b60c98769ba297053801a3192187ebdd558698a (patch)
treed820183c9b7ec21088aa842a0f743938576c9da3 /tests
parent207d8a26246eb095425487c2bb3e8a0ca101340e (diff)
Use pthread_setname_np to name threads
osmo-trx can start a considerable amount of threads that can make debugging it challenging at least. By using phtread_setname_np, the system sets a meaningful name to the thread which can be seen while debugging with gdb or by printing /proc/$pid/task/$tid/comm. Now we also log system TID when setting the name so we can identify different tasks in /proc even if pthread_setname_np fails. Change-Id: I84711739c3e224cb383fd12b6db933785b28209e
Diffstat (limited to 'tests')
-rw-r--r--tests/CommonLibs/Makefile.am4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/CommonLibs/Makefile.am b/tests/CommonLibs/Makefile.am
index 4543c72..2a9a021 100644
--- a/tests/CommonLibs/Makefile.am
+++ b/tests/CommonLibs/Makefile.am
@@ -28,11 +28,11 @@ PRBSTest_SOURCES = PRBSTest.cpp
InterthreadTest_SOURCES = InterthreadTest.cpp
InterthreadTest_LDADD = $(COMMON_LA)
-InterthreadTest_LDFLAGS = -lpthread
+InterthreadTest_LDFLAGS = -lpthread $(AM_LDFLAGS)
SocketsTest_SOURCES = SocketsTest.cpp
SocketsTest_LDADD = $(COMMON_LA)
-SocketsTest_LDFLAGS = -lpthread
+SocketsTest_LDFLAGS = -lpthread $(AM_LDFLAGS)
TimevalTest_SOURCES = TimevalTest.cpp
TimevalTest_LDADD = $(COMMON_LA)