diff options
author | Marco Trevisan <mail@3v1n0.net> | 2022-09-19 14:38:25 +0000 |
---|---|---|
committer | Marco Trevisan <mail@3v1n0.net> | 2022-09-19 14:38:25 +0000 |
commit | 871d4f9ccc5d6c2f700264be9e63b85c5919f69a (patch) | |
tree | e15c902c45e6a5ceaf8b13e811c994dbddb7aee0 | |
parent | 7e9625a79b8825fa595629b4aa1eafa8b091acc2 (diff) | |
parent | 902ba0bc0db50ede3473af576bddd2b6a2f9e326 (diff) | |
download | glib-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.c | 18 |
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 |