[glib/wip/pwithnall/more-test-fixes: 1/2] tests: Skip vasprintf() placeholder checks on FreeBSD and macOS
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/pwithnall/more-test-fixes: 1/2] tests: Skip vasprintf() placeholder checks on FreeBSD and macOS
- Date: Mon, 14 Mar 2022 16:41:29 +0000 (UTC)
commit cd750f2ade564fc271f7999cc8cbfd5ba72df0d5
Author: Philip Withnall <pwithnall endlessos org>
Date: Mon Mar 14 16:04:29 2022 +0000
tests: Skip vasprintf() placeholder checks on FreeBSD and macOS
The `vasprintf()` version on those platforms seems to do less rigorous
checking of format placeholders.
See https://gitlab.gnome.org/GNOME/glib/-/jobs/1890001 and
https://gitlab.gnome.org/GNOME/glib/-/jobs/1890000.
Signed-off-by: Philip Withnall <pwithnall endlessos org>
glib/tests/test-printf.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/glib/tests/test-printf.c b/glib/tests/test-printf.c
index 77eb76a4a..214cd6e77 100644
--- a/glib/tests/test-printf.c
+++ b/glib/tests/test-printf.c
@@ -923,6 +923,7 @@ test_vasprintf_invalid_format_placeholder (void)
g_test_summary ("Test error handling for invalid format placeholder in g_vasprintf()");
+#if !defined(__APPLE__) && !defined(__FreeBSD__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
#pragma GCC diagnostic ignored "-Wformat-extra-args"
@@ -931,6 +932,9 @@ test_vasprintf_invalid_format_placeholder (void)
g_assert_cmpint (len, ==, -1);
g_assert_null (buf);
+#else
+ g_test_skip ("vasprintf() placeholder checks on BSDs are less strict");
+#endif
}
int
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]