summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Trevisan <mail@3v1n0.net>2022-09-19 14:38:25 +0000
committerMarco Trevisan <mail@3v1n0.net>2022-09-19 14:38:25 +0000
commit871d4f9ccc5d6c2f700264be9e63b85c5919f69a (patch)
treee15c902c45e6a5ceaf8b13e811c994dbddb7aee0
parent7e9625a79b8825fa595629b4aa1eafa8b091acc2 (diff)
parent902ba0bc0db50ede3473af576bddd2b6a2f9e326 (diff)
downloadglib-871d4f9ccc5d6c2f700264be9e63b85c5919f69a.tar.gz
Merge branch 'tests-error-musl' into 'main'
tests: Only run g_error_new_valist() programmer error test on glibc See merge request GNOME/glib!2904
-rw-r--r--glib/tests/error.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/glib/tests/error.c b/glib/tests/error.c
index 7ea04ea3c..fa3a25969 100644
--- a/glib/tests/error.c
+++ b/glib/tests/error.c
@@ -123,12 +123,12 @@ static void
test_new_valist_invalid_va (gpointer dummy,
...)
{
-#ifdef __linux__
- /* Only worth testing this on Linux; if other platforms regress on this legacy
- * behaviour, we don’t care. In particular, calling g_error_new_valist() with
- * a %NULL format will crash on FreeBSD as its implementation of vasprintf()
- * is less forgiving than Linux’s. That’s fine: it’s a programmer error in
- * either case. */
+#if defined(__linux__) && defined(__GLIBC__)
+ /* Only worth testing this on Linux with glibc; if other platforms regress on
+ * this legacy behaviour, we don’t care. In particular, calling
+ * g_error_new_valist() with a %NULL format will crash on FreeBSD as its
+ * implementation of vasprintf() is less forgiving than Linux’s. That’s
+ * fine: it’s a programmer error in either case. */
const struct
{
GQuark domain;
@@ -182,9 +182,9 @@ test_new_valist_invalid_va (gpointer dummy,
va_end (ap);
}
-#else /* if !__linux__ */
- g_test_skip ("g_error_new_valist() programmer error handling is only relevant on Linux");
-#endif /* !__linux__ */
+#else /* if !__linux__ || !__GLIBC__ */
+ g_test_skip ("g_error_new_valist() programmer error handling is only relevant on Linux with glibc");
+#endif /* !__linux__ || ! __GLIBC__ */
}
static void