-
-
Notifications
You must be signed in to change notification settings - Fork 250
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: Skip thread name tests if libc is too old
- Loading branch information
Showing
3 changed files
with
30 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (C) 2008-2023 Ole André Vadla Ravnås <[email protected]> | ||
* Copyright (C) 2008-2024 Ole André Vadla Ravnås <[email protected]> | ||
* Copyright (C) 2008 Christian Berentsen <[email protected]> | ||
* Copyright (C) 2015 Asger Hautop Drewsen <[email protected]> | ||
* Copyright (C) 2023 Grant Douglas <[email protected]> | ||
|
@@ -154,8 +154,8 @@ static gboolean thread_found_cb (const GumThreadDetails * details, | |
gpointer user_data); | ||
static gboolean thread_check_cb (const GumThreadDetails * details, | ||
gpointer user_data); | ||
static gboolean thread_collect_if_matching_id (const GumThreadDetails * details, | ||
gpointer user_data); | ||
G_GNUC_UNUSED static gboolean thread_collect_if_matching_id ( | ||
const GumThreadDetails * details, gpointer user_data); | ||
static gboolean module_found_cb (const GumModuleDetails * details, | ||
gpointer user_data); | ||
static gboolean import_found_cb (const GumImportDetails * details, | ||
|
@@ -240,6 +240,9 @@ TESTCASE (process_threads_exclude_cloaked) | |
|
||
TESTCASE (process_threads_should_include_name) | ||
{ | ||
#if defined (HAVE_LINUX) && !defined (HAVE_PTHREAD_SETNAME_NP) | ||
g_print ("<skipping, libc is too old> "); | ||
#else | ||
volatile gboolean done = FALSE; | ||
GThread * thread; | ||
GumThreadDetails d = { 0, }; | ||
|
@@ -256,6 +259,7 @@ TESTCASE (process_threads_should_include_name) | |
g_thread_join (thread); | ||
|
||
g_free ((gpointer) d.name); | ||
#endif | ||
} | ||
|
||
static gboolean | ||
|
@@ -1146,7 +1150,7 @@ sleeping_dummy (gpointer data) | |
* to GLib potentially having been prebuilt against an old libc. Therefore we | ||
* set the name manually using pthreads. | ||
*/ | ||
#ifdef HAVE_LINUX | ||
#if defined (HAVE_LINUX) && defined (HAVE_PTHREAD_SETNAME_NP) | ||
pthread_setname_np (pthread_self (), sync_data->name); | ||
#endif | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters