fix: remove unnecessary patches
This commit is contained in:
parent
3a7bbbb8e6
commit
0aa8452245
11 changed files with 0 additions and 720 deletions
|
@ -42,11 +42,6 @@ WORKDIR glib-${VERSION}
|
|||
COPY *.patch .
|
||||
RUN --network=none <<-EOF
|
||||
set -eux
|
||||
patch -p1 alwaysbash.patch
|
||||
patch -p1 deprecated-no-warn.patch
|
||||
patch -p1 fix-tests.patch
|
||||
patch -p1 flaky-tests.patch
|
||||
patch -p1 tests-machine-id.patch
|
||||
export CFLAGS="-ffat-lto-objects -O2"
|
||||
export CXXFLAGS="-O2"
|
||||
export CPPFLAGS="-O2"
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
the completions only install if bash is detected.
|
||||
instead of adding bash to makedeps, just always install them
|
||||
--
|
||||
diff --git a/gio/meson.build b/gio/meson.build
|
||||
index 462606f..bb3e19d 100644
|
||||
--- a/gio/meson.build
|
||||
+++ b/gio/meson.build
|
||||
@@ -805,7 +805,7 @@ if host_system == 'windows'
|
||||
internal_deps += [ giowin32_lib ]
|
||||
endif
|
||||
|
||||
-if have_bash
|
||||
+if true
|
||||
bash_comp_inst_dir = ''
|
||||
if bash_comp_dep.found()
|
||||
bash_comp_dir_override = bash_comp_dep.version().version_compare('>= 2.10') ? ['datadir', get_option('datadir')] : ['prefix', get_option('prefix')]
|
|
@ -1,22 +0,0 @@
|
|||
diff -Naur a/gio/glib-compile-schemas.c b/gio/glib-compile-schemas.c
|
||||
--- a/gio/glib-compile-schemas.c 2018-09-21 15:23:52.000000000 +0100
|
||||
+++ b/gio/glib-compile-schemas.c 2019-02-10 14:37:30.034879344 +0000
|
||||
@@ -1233,19 +1233,6 @@
|
||||
return;
|
||||
}
|
||||
|
||||
- if (path && (g_str_has_prefix (path, "/apps/") ||
|
||||
- g_str_has_prefix (path, "/desktop/") ||
|
||||
- g_str_has_prefix (path, "/system/")))
|
||||
- {
|
||||
- gchar *message = NULL;
|
||||
- message = g_strdup_printf (_("Warning: Schema “%s” has path “%s”. "
|
||||
- "Paths starting with "
|
||||
- "“/apps/”, “/desktop/” or “/system/” are deprecated."),
|
||||
- id, path);
|
||||
- g_printerr ("%s\n", message);
|
||||
- g_free (message);
|
||||
- }
|
||||
-
|
||||
state->schema_state = schema_state_new (path, gettext_domain,
|
||||
extends, extends_name, list_of);
|
|
@ -1,456 +0,0 @@
|
|||
From 01304c97693a7c789bde9c543979872fc63c387c Mon Sep 17 00:00:00 2001
|
||||
From: Natanael Copa <ncopa@alpinelinux.org>
|
||||
Date: Wed, 3 Apr 2024 21:11:24 +0200
|
||||
Subject: [PATCH 1/3] tests: skip test that requires shared-mime-info when its
|
||||
missing
|
||||
|
||||
shared-mime-info required glib to build and will not be there during
|
||||
bootstrap. Skip the test if it is missing.
|
||||
|
||||
ref: https://gitlab.gnome.org/GNOME/glib/-/issues/3317
|
||||
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
|
||||
---
|
||||
gio/tests/contenttype.c | 47 +++++++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 45 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gio/tests/contenttype.c b/gio/tests/contenttype.c
|
||||
index 8784374f2..b442d5352 100644
|
||||
--- a/gio/tests/contenttype.c
|
||||
+++ b/gio/tests/contenttype.c
|
||||
@@ -13,6 +13,20 @@
|
||||
__s1, " == ", __s2); \
|
||||
} while (0)
|
||||
|
||||
+static gboolean
|
||||
+skip_missing_shared_mime_info (void)
|
||||
+{
|
||||
+ const gchar *path = g_find_program_in_path("update-mime-database");
|
||||
+
|
||||
+ if (path == NULL)
|
||||
+ {
|
||||
+ g_test_skip ("shared-mime-info is required to run this test");
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+ g_free(path);
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
static void
|
||||
test_guess (void)
|
||||
{
|
||||
@@ -26,6 +40,9 @@ test_guess (void)
|
||||
"Name=appinfo-test\n"
|
||||
"Exec=./appinfo-test --option\n";
|
||||
|
||||
+ if (skip_missing_shared_mime_info ())
|
||||
+ return;
|
||||
+
|
||||
#ifdef G_OS_WIN32
|
||||
existing_directory = (gchar *) g_getenv ("SYSTEMROOT");
|
||||
|
||||
@@ -150,6 +167,9 @@ test_subtype (void)
|
||||
gchar *plain;
|
||||
gchar *xml;
|
||||
|
||||
+ if (skip_missing_shared_mime_info ())
|
||||
+ return;
|
||||
+
|
||||
plain = g_content_type_from_mime_type ("text/plain");
|
||||
xml = g_content_type_from_mime_type ("application/xml");
|
||||
|
||||
@@ -175,6 +195,9 @@ test_list (void)
|
||||
gchar *plain;
|
||||
gchar *xml;
|
||||
|
||||
+ if (skip_missing_shared_mime_info ())
|
||||
+ return;
|
||||
+
|
||||
#ifdef __APPLE__
|
||||
g_test_skip ("The OSX backend does not implement g_content_types_get_registered()");
|
||||
return;
|
||||
@@ -202,6 +225,9 @@ test_executable (void)
|
||||
{
|
||||
gchar *type;
|
||||
|
||||
+ if (skip_missing_shared_mime_info ())
|
||||
+ return;
|
||||
+
|
||||
#ifdef G_OS_WIN32
|
||||
type = g_content_type_from_mime_type ("application/vnd.microsoft.portable-executable");
|
||||
/* FIXME: the MIME is not in the default `MIME\Database\Content Type` registry.
|
||||
@@ -228,6 +254,9 @@ test_description (void)
|
||||
gchar *type;
|
||||
gchar *desc;
|
||||
|
||||
+ if (skip_missing_shared_mime_info ())
|
||||
+ return;
|
||||
+
|
||||
type = g_content_type_from_mime_type ("text/plain");
|
||||
desc = g_content_type_get_description (type);
|
||||
g_assert_nonnull (desc);
|
||||
@@ -242,6 +271,9 @@ test_icon (void)
|
||||
gchar *type;
|
||||
GIcon *icon;
|
||||
|
||||
+ if (skip_missing_shared_mime_info ())
|
||||
+ return;
|
||||
+
|
||||
type = g_content_type_from_mime_type ("text/plain");
|
||||
icon = g_content_type_get_icon (type);
|
||||
g_assert_true (G_IS_ICON (icon));
|
||||
@@ -290,6 +322,9 @@ test_symbolic_icon (void)
|
||||
gchar *type;
|
||||
GIcon *icon;
|
||||
|
||||
+ if (skip_missing_shared_mime_info ())
|
||||
+ return;
|
||||
+
|
||||
type = g_content_type_from_mime_type ("text/plain");
|
||||
icon = g_content_type_get_symbolic_icon (type);
|
||||
g_assert_true (G_IS_ICON (icon));
|
||||
@@ -344,6 +379,9 @@ test_tree (void)
|
||||
gchar **types;
|
||||
gsize i;
|
||||
|
||||
+ if (skip_missing_shared_mime_info ())
|
||||
+ return;
|
||||
+
|
||||
#if defined(__APPLE__) || defined(G_OS_WIN32)
|
||||
g_test_skip ("The OSX & Windows backends do not implement g_content_type_guess_for_tree()");
|
||||
return;
|
||||
@@ -437,8 +475,13 @@ test_guess_svg_from_data (void)
|
||||
</svg>\n";
|
||||
|
||||
gboolean uncertain = TRUE;
|
||||
- gchar *res = g_content_type_guess (NULL, (guchar *)svgfilecontent,
|
||||
- sizeof (svgfilecontent) - 1, &uncertain);
|
||||
+ gchar *res;
|
||||
+
|
||||
+ if (skip_missing_shared_mime_info ())
|
||||
+ return;
|
||||
+
|
||||
+ res = g_content_type_guess (NULL, (guchar *)svgfilecontent,
|
||||
+ sizeof (svgfilecontent) - 1, &uncertain);
|
||||
#ifdef __APPLE__
|
||||
g_assert_cmpstr (res, ==, "public.svg-image");
|
||||
#elif defined(G_OS_WIN32)
|
||||
--
|
||||
2.44.0
|
||||
|
||||
|
||||
From a77fdc4cae8deb7ef9f47e81f81a8db139434093 Mon Sep 17 00:00:00 2001
|
||||
From: Natanael Copa <ncopa@alpinelinux.org>
|
||||
Date: Thu, 4 Apr 2024 17:08:46 +0200
|
||||
Subject: [PATCH 2/3] tests: skip tests that requires dbus-daemon when its
|
||||
missing
|
||||
|
||||
dbus may not be built yet during bootstrap, because it needs glib to
|
||||
build.
|
||||
|
||||
Ref: https://gitlab.gnome.org/GNOME/glib/-/issues/3317
|
||||
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
|
||||
---
|
||||
gio/tests/appinfo.c | 22 ++++++++++++++++++++++
|
||||
gio/tests/desktop-app-info.c | 19 +++++++++++++++++++
|
||||
2 files changed, 41 insertions(+)
|
||||
|
||||
diff --git a/gio/tests/appinfo.c b/gio/tests/appinfo.c
|
||||
index d9c53c853..81bc48191 100644
|
||||
--- a/gio/tests/appinfo.c
|
||||
+++ b/gio/tests/appinfo.c
|
||||
@@ -49,6 +49,19 @@ test_launch_for_app_info (GAppInfo *appinfo)
|
||||
g_free (uri);
|
||||
}
|
||||
|
||||
+static gboolean
|
||||
+skip_missing_dbus_daemon (void)
|
||||
+{
|
||||
+ const gchar *path = g_find_program_in_path ("dbus-daemon");
|
||||
+ if (path == NULL)
|
||||
+ {
|
||||
+ g_test_skip ("dbus-daemon is required to run this test");
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+ g_free (path);
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
static void
|
||||
test_launch (void)
|
||||
{
|
||||
@@ -56,6 +69,9 @@ test_launch (void)
|
||||
GAppInfo *appinfo;
|
||||
const gchar *path;
|
||||
|
||||
+ if (skip_missing_dbus_daemon ())
|
||||
+ return;
|
||||
+
|
||||
/* Set up a test session bus to keep D-Bus traffic off the real session bus. */
|
||||
bus = g_test_dbus_new (G_TEST_DBUS_NONE);
|
||||
g_test_dbus_up (bus);
|
||||
@@ -96,6 +112,9 @@ test_launch_no_app_id (void)
|
||||
gchar *exec_line_variants[2];
|
||||
gsize i;
|
||||
|
||||
+ if (skip_missing_dbus_daemon ())
|
||||
+ return;
|
||||
+
|
||||
exec_line_variants[0] = g_strdup_printf (
|
||||
"Exec=%s/appinfo-test --option %%U %%i --name %%c --filename %%k %%m %%%%",
|
||||
g_test_get_dir (G_TEST_BUILT));
|
||||
@@ -356,6 +375,9 @@ test_launch_context_signals (void)
|
||||
gboolean success;
|
||||
gchar *cmdline;
|
||||
|
||||
+ if (skip_missing_dbus_daemon ())
|
||||
+ return;
|
||||
+
|
||||
/* Set up a test session bus to keep D-Bus traffic off the real session bus. */
|
||||
bus = g_test_dbus_new (G_TEST_DBUS_NONE);
|
||||
g_test_dbus_up (bus);
|
||||
diff --git a/gio/tests/desktop-app-info.c b/gio/tests/desktop-app-info.c
|
||||
index e82e2dd31..ec65b7618 100644
|
||||
--- a/gio/tests/desktop-app-info.c
|
||||
+++ b/gio/tests/desktop-app-info.c
|
||||
@@ -593,6 +593,19 @@ wait_for_file (const gchar *want_this,
|
||||
unlink (or_this);
|
||||
}
|
||||
|
||||
+static gboolean
|
||||
+skip_missing_dbus_daemon (void)
|
||||
+{
|
||||
+ const gchar *path = g_find_program_in_path ("dbus-daemon");
|
||||
+ if (path == NULL)
|
||||
+ {
|
||||
+ g_test_skip ("dbus-daemon is required to run this test");
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+ g_free (path);
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
static void
|
||||
test_actions (void)
|
||||
{
|
||||
@@ -606,6 +619,9 @@ test_actions (void)
|
||||
gchar *tweak_path;
|
||||
gchar *twiddle_path;
|
||||
|
||||
+ if (skip_missing_dbus_daemon ())
|
||||
+ return;
|
||||
+
|
||||
/* Set up a test session bus to keep D-Bus traffic off the real session bus. */
|
||||
bus = g_test_dbus_new (G_TEST_DBUS_NONE);
|
||||
g_test_dbus_up (bus);
|
||||
@@ -1833,6 +1849,9 @@ test_launch_fail_dbus (void)
|
||||
GAsyncResult *result = NULL;
|
||||
GError *error = NULL;
|
||||
|
||||
+ if (skip_missing_dbus_daemon ())
|
||||
+ return;
|
||||
+
|
||||
/* Set up a test session bus to ensure that launching the app happens using
|
||||
* D-Bus rather than spawning. */
|
||||
bus = g_test_dbus_new (G_TEST_DBUS_NONE);
|
||||
--
|
||||
2.44.0
|
||||
|
||||
|
||||
From 0ec9c399c7d2755147e409d065690b2ff53fda40 Mon Sep 17 00:00:00 2001
|
||||
From: Natanael Copa <ncopa@alpinelinux.org>
|
||||
Date: Wed, 3 Apr 2024 22:10:18 +0200
|
||||
Subject: [PATCH 3/3] tests: find update-desktop-database
|
||||
|
||||
Disable tests that require update-desktop-database when it is missing.
|
||||
|
||||
It requires glib to build so it will be missing when bootstrapping glib.
|
||||
|
||||
Refactor the ifdef for Windows and MacOS while at it and reduce number
|
||||
of ifdefs.
|
||||
|
||||
Ref: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3658
|
||||
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
|
||||
---
|
||||
gio/tests/desktop-app-info.c | 35 +++++++++++++++++++++++++++++
|
||||
gio/tests/file.c | 43 ++++++++++++++++++++++--------------
|
||||
2 files changed, 62 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/gio/tests/desktop-app-info.c b/gio/tests/desktop-app-info.c
|
||||
index ec65b7618..e492b1346 100644
|
||||
--- a/gio/tests/desktop-app-info.c
|
||||
+++ b/gio/tests/desktop-app-info.c
|
||||
@@ -125,6 +125,20 @@ create_app_info (const char *name)
|
||||
return info;
|
||||
}
|
||||
|
||||
+static gboolean
|
||||
+skip_missing_update_desktop_database (void)
|
||||
+{
|
||||
+ const gchar *path = g_find_program_in_path ("update-desktop-database");
|
||||
+
|
||||
+ if (path == NULL)
|
||||
+ {
|
||||
+ g_test_skip ("update-desktop-database is required to run this test");
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+ g_free (path);
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
static void
|
||||
test_delete (void)
|
||||
{
|
||||
@@ -134,6 +148,9 @@ test_delete (void)
|
||||
char *filename;
|
||||
gboolean res;
|
||||
|
||||
+ if (skip_missing_update_desktop_database ())
|
||||
+ return;
|
||||
+
|
||||
info = create_app_info ("Blah");
|
||||
|
||||
id = g_app_info_get_id (info);
|
||||
@@ -177,6 +194,9 @@ test_default (void)
|
||||
GList *list;
|
||||
GError *error = NULL;
|
||||
|
||||
+if (skip_missing_update_desktop_database ())
|
||||
+ return;
|
||||
+
|
||||
info1 = create_app_info ("Blah1");
|
||||
info2 = create_app_info ("Blah2");
|
||||
info3 = create_app_info ("Blah3");
|
||||
@@ -316,6 +336,9 @@ test_default_async (void)
|
||||
GList *list;
|
||||
GError *error = NULL;
|
||||
|
||||
+ if (skip_missing_update_desktop_database ())
|
||||
+ return;
|
||||
+
|
||||
data.loop = g_main_loop_new (NULL, TRUE);
|
||||
|
||||
info1 = create_app_info ("Blah1");
|
||||
@@ -418,6 +441,9 @@ test_fallback (void)
|
||||
GError *error = NULL;
|
||||
gint old_length;
|
||||
|
||||
+ if (skip_missing_update_desktop_database ())
|
||||
+ return;
|
||||
+
|
||||
info1 = create_app_info ("Test1");
|
||||
info2 = create_app_info ("Test2");
|
||||
|
||||
@@ -492,6 +518,9 @@ test_last_used (void)
|
||||
GAppInfo *info1, *info2, *default_app;
|
||||
GError *error = NULL;
|
||||
|
||||
+ if (skip_missing_update_desktop_database ())
|
||||
+ return;
|
||||
+
|
||||
info1 = create_app_info ("Test1");
|
||||
info2 = create_app_info ("Test2");
|
||||
|
||||
@@ -1222,6 +1251,9 @@ test_default_uri_handler (void)
|
||||
gchar *file_path = NULL;
|
||||
GAppInfo *info;
|
||||
|
||||
+ if (skip_missing_update_desktop_database ())
|
||||
+ return;
|
||||
+
|
||||
info = create_app_info_toucher ("Touch Handled", "handled",
|
||||
"x-scheme-handler/glib-touch",
|
||||
&file_path);
|
||||
@@ -1298,6 +1330,9 @@ test_default_uri_handler_async (void)
|
||||
gboolean called = FALSE;
|
||||
gint64 start_time, touch_time;
|
||||
|
||||
+ if (skip_missing_update_desktop_database ())
|
||||
+ return;
|
||||
+
|
||||
loop = g_main_loop_new (NULL, FALSE);
|
||||
info = create_app_info_toucher ("Touch Handled", "handled-async",
|
||||
"x-scheme-handler/glib-async-touch",
|
||||
diff --git a/gio/tests/file.c b/gio/tests/file.c
|
||||
index 72296d008..dba5fe66c 100644
|
||||
--- a/gio/tests/file.c
|
||||
+++ b/gio/tests/file.c
|
||||
@@ -3784,6 +3784,25 @@ create_command_line_app_info (const char *name,
|
||||
return g_steal_pointer (&info);
|
||||
}
|
||||
|
||||
+static gboolean
|
||||
+skip_missing_update_desktop_database (void)
|
||||
+{
|
||||
+#if defined(G_OS_WIN32) || defined(__APPLE__)
|
||||
+ g_test_skip ("Default URI handlers are not currently supported on Windows or macOS");
|
||||
+ return TRUE;
|
||||
+#else
|
||||
+ const gchar *path = g_find_program_in_path ("update-desktop-database");
|
||||
+
|
||||
+ if (path == NULL)
|
||||
+ {
|
||||
+ g_test_skip ("update-desktop-database is required to run this test");
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+ g_free (path);
|
||||
+ return FALSE;
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
static void
|
||||
test_query_default_handler_uri (void)
|
||||
{
|
||||
@@ -3793,10 +3812,8 @@ test_query_default_handler_uri (void)
|
||||
GFile *file;
|
||||
GFile *invalid_file;
|
||||
|
||||
-#if defined(G_OS_WIN32) || defined(__APPLE__)
|
||||
- g_test_skip ("Default URI handlers are not currently supported on Windows or macOS");
|
||||
- return;
|
||||
-#endif
|
||||
+ if (skip_missing_update_desktop_database ())
|
||||
+ return;
|
||||
|
||||
info = create_command_line_app_info ("Gio File Handler", "true",
|
||||
"x-scheme-handler/gio-file");
|
||||
@@ -3878,10 +3895,8 @@ test_query_default_handler_file (void)
|
||||
const char buffer[] = "Text file!\n";
|
||||
const guint8 binary_buffer[] = "\xde\xad\xbe\xff";
|
||||
|
||||
-#if defined(G_OS_WIN32) || defined(__APPLE__)
|
||||
- g_test_skip ("Default URI handlers are not currently supported on Windows or macOS");
|
||||
- return;
|
||||
-#endif
|
||||
+ if (skip_missing_update_desktop_database ())
|
||||
+ return;
|
||||
|
||||
text_file = g_file_new_tmp ("query-default-handler-XXXXXX", &iostream, &error);
|
||||
g_assert_no_error (error);
|
||||
@@ -3974,10 +3989,8 @@ test_query_default_handler_file_async (void)
|
||||
const guint8 binary_buffer[] = "\xde\xad\xbe\xff";
|
||||
GError *error = NULL;
|
||||
|
||||
-#if defined(G_OS_WIN32) || defined(__APPLE__)
|
||||
- g_test_skip ("Default URI handlers are not currently supported on Windows or macOS");
|
||||
- return;
|
||||
-#endif
|
||||
+ if (skip_missing_update_desktop_database ())
|
||||
+ return;
|
||||
|
||||
data.loop = g_main_loop_new (NULL, FALSE);
|
||||
|
||||
@@ -4064,10 +4077,8 @@ test_query_default_handler_uri_async (void)
|
||||
GFile *file;
|
||||
GFile *invalid_file;
|
||||
|
||||
-#if defined(G_OS_WIN32) || defined(__APPLE__)
|
||||
- g_test_skip ("Default URI handlers are not currently supported on Windows or macOS");
|
||||
- return;
|
||||
-#endif
|
||||
+ if (skip_missing_update_desktop_database ())
|
||||
+ return;
|
||||
|
||||
info = create_command_line_app_info ("Gio File Handler", "true",
|
||||
"x-scheme-handler/gio-file");
|
||||
--
|
||||
2.44.0
|
|
@ -1,83 +0,0 @@
|
|||
https://gitlab.gnome.org/GNOME/glib/-/issues/3318
|
||||
https://gitlab.gnome.org/GNOME/glib/-/issues/3320
|
||||
|
||||
diff --git a/glib/tests/meson.build b/glib/tests/meson.build
|
||||
index 85f40d2e1..059a786d3 100644
|
||||
--- a/glib/tests/meson.build
|
||||
+++ b/glib/tests/meson.build
|
||||
@@ -54,6 +54,7 @@ glib_tests = {
|
||||
'gwakeup' : {
|
||||
'source' : ['gwakeuptest.c', '../gwakeup.c'],
|
||||
'install' : false,
|
||||
+ 'can_fail': host_machine.cpu_family() == 's390x',
|
||||
},
|
||||
'hash' : {},
|
||||
'hmac' : {},
|
||||
@@ -226,6 +227,7 @@ if glib_conf.has('HAVE_EVENTFD')
|
||||
'source' : ['gwakeuptest.c', '../gwakeup.c'],
|
||||
'c_args' : ['-DTEST_EVENTFD_FALLBACK'],
|
||||
'install' : false,
|
||||
+ 'can_fail': host_machine.cpu_family() == 's390x',
|
||||
},
|
||||
}
|
||||
endif
|
||||
diff --git a/gobject/tests/meson.build b/gobject/tests/meson.build
|
||||
index a163e5f91..12c449519 100644
|
||||
--- a/gobject/tests/meson.build
|
||||
+++ b/gobject/tests/meson.build
|
||||
@@ -78,7 +78,7 @@ gobject_tests = {
|
||||
'references' : {},
|
||||
'basic-signals' : {},
|
||||
'singleton' : {},
|
||||
- 'threadtests' : {},
|
||||
+ 'threadtests' : { 'can_fail': 'aarch64' in host_machine.cpu_family() or 'riscv' in host_machine.cpu_family() },
|
||||
'dynamictests' : {},
|
||||
'binding' : {},
|
||||
'bindinggroup' : {},
|
||||
From ad2925ef361a7c889ff696a1ba9e677accaecd08 Mon Sep 17 00:00:00 2001
|
||||
From: Natanael Copa <ncopa@alpinelinux.org>
|
||||
Date: Thu, 4 Apr 2024 10:15:07 +0200
|
||||
Subject: [PATCH] tests: increase timeout on slow architectures
|
||||
|
||||
Prevent tests to timeout on architectures that are slow.
|
||||
|
||||
Fixes https://gitlab.gnome.org/GNOME/glib/-/issues/3319
|
||||
|
||||
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
|
||||
---
|
||||
meson.build | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/meson.build b/meson.build
|
||||
index f0c5e070b..4c6c87766 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -182,6 +182,12 @@ test_protocol = 'tap'
|
||||
test_timeout = 30
|
||||
test_timeout_slow = 90
|
||||
|
||||
+# give more time on slow architectures
|
||||
+if 'riscv' in host_machine.cpu_family()
|
||||
+ test_timeout = test_timeout * 4
|
||||
+ test_timeout_slow = test_timeout_slow * 4
|
||||
+endif
|
||||
+
|
||||
add_test_setup('default',
|
||||
is_default: true,
|
||||
exclude_suites: ['flaky', 'failing'],
|
||||
--
|
||||
2.44.0
|
||||
|
||||
diff --git a/glib/tests/meson.build b/glib/tests/meson.build
|
||||
index 85f40d2e1..f2ee59678 100644
|
||||
--- a/glib/tests/meson.build
|
||||
+++ b/glib/tests/meson.build
|
||||
@@ -113,6 +113,8 @@ glib_tests = {
|
||||
'regex' : {
|
||||
'dependencies' : [pcre2],
|
||||
'c_args' : use_pcre2_static_flag ? ['-DPCRE2_STATIC'] : [],
|
||||
+ # https://gitlab.gnome.org/GNOME/glib/-/issues/3321
|
||||
+ 'can_fail': host_machine.cpu_family() == 'riscv64',
|
||||
},
|
||||
'relation' : {},
|
||||
'rwlock' : {},
|
|
@ -1,41 +0,0 @@
|
|||
From 5cf08a9a1041a9dc9975371fb62f8f22c3be76c4 Mon Sep 17 00:00:00 2001
|
||||
From: Natanael Copa <ncopa@alpinelinux.org>
|
||||
Date: Wed, 3 Apr 2024 21:25:04 +0200
|
||||
Subject: [PATCH 2/3] tests: skip gio tests which fails with missing machine-id
|
||||
|
||||
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
|
||||
---
|
||||
gio/tests/meson.build | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gio/tests/meson.build b/gio/tests/meson.build
|
||||
index f04ff43ff..71ec09750 100644
|
||||
--- a/gio/tests/meson.build
|
||||
+++ b/gio/tests/meson.build
|
||||
@@ -46,6 +46,8 @@ if glib_build_shared
|
||||
subdir('modules')
|
||||
endif
|
||||
|
||||
+have_machine_id = import('fs').is_file('/etc/machine-id')
|
||||
+
|
||||
# Test programs buildable on all platforms
|
||||
gio_tests = {
|
||||
'application-command-line': {},
|
||||
@@ -98,7 +100,7 @@ gio_tests = {
|
||||
'install_rpath' : installed_tests_execdir,
|
||||
# FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
|
||||
# FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/3148
|
||||
- 'can_fail' : host_system in ['darwin', 'windows', 'gnu'],
|
||||
+ 'can_fail' : host_system in ['darwin', 'windows', 'gnu'] or not have_machine_id,
|
||||
},
|
||||
'inet-address' : {},
|
||||
'io-stream' : {},
|
||||
@@ -147,7 +149,7 @@ gio_tests = {
|
||||
'extra_programs': host_system != 'windows' ? ['dbus-launch'] : [],
|
||||
# FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
|
||||
# FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/3148
|
||||
- 'can_fail' : host_system in ['darwin', 'gnu'],
|
||||
+ 'can_fail' : host_system in ['darwin', 'gnu'] or not have_machine_id,
|
||||
},
|
||||
'win32-appinfo' : {},
|
||||
}
|
|
@ -22,10 +22,6 @@ WORKDIR libaio-libaio-${VERSION}
|
|||
COPY *.patch .
|
||||
RUN --network=none <<-EOF
|
||||
set -eux
|
||||
patch -p1 libaio-cppflags.patch
|
||||
patch -p1 libaio-errno.patch
|
||||
patch -p1 test-poll.patch
|
||||
patch -p1 test.patch
|
||||
make -j "$(nproc)"
|
||||
EOF
|
||||
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
respect env CPPFLAGS
|
||||
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -2,8 +2,9 @@ prefix=/usr
|
||||
includedir=$(prefix)/include
|
||||
libdir=$(prefix)/lib
|
||||
|
||||
-CFLAGS ?= -g -fomit-frame-pointer -O2
|
||||
-CFLAGS += -Wall -I. -fPIC
|
||||
+CFLAGS ?= -fomit-frame-pointer -O2
|
||||
+CFLAGS += -I. -fPIC
|
||||
+CFLAGS += $(CPPFLAGS)
|
||||
SO_CFLAGS=-shared $(CFLAGS)
|
||||
L_CFLAGS=$(CFLAGS)
|
||||
LINK_FLAGS=
|
|
@ -1,11 +0,0 @@
|
|||
--- libaio-0.3.112.orig/src/compat-0_1.c
|
||||
+++ libaio-0.3.112/src/compat-0_1.c
|
||||
@@ -19,7 +19,7 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
-#include <asm/errno.h>
|
||||
+#include <errno.h>
|
||||
|
||||
#include "libaio.h"
|
||||
#include "vsys_def.h"
|
|
@ -1,11 +0,0 @@
|
|||
diff -Nurp a/harness/cases/22.t b/harness/cases/22.t
|
||||
--- a/harness/cases/22.t 2018-10-22 20:59:34.000000000 +0100
|
||||
+++ b/harness/cases/22.t 2022-02-26 09:48:59.421311473 +0000
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
-#include <sys/poll.h>
|
||||
+#include <poll.h>
|
||||
#include <sys/wait.h>
|
||||
#include <stdlib.h>
|
|
@ -1,55 +0,0 @@
|
|||
From: Lee Duncan <lduncan@suse.com>
|
||||
Date: Thu, 11 Feb 2021 11:34:42 -0800
|
||||
Subject: [PATCH] Fix test issue with gcc-11
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Test 3.t exercises io_submit() with invalid addresses,
|
||||
and one test attempted to pass in "-1" as an invalid
|
||||
pointer. But gcc-11 realizes you cannot take an offset
|
||||
from an invalid pointer, making it impossible to
|
||||
compile or run this test:
|
||||
|
||||
> sh# make CC=gcc-11 partcheck
|
||||
> make[1]: Entering directory '/alt/public_software/libaio/src'
|
||||
> make[1]: Nothing to be done for 'all'.
|
||||
> make[1]: Leaving directory '/alt/public_software/libaio/src'
|
||||
> make[1]: Entering directory '/alt/public_software/libaio/harness'
|
||||
> gcc-11 -Wall -Werror -I../src -g -O2 -DTEST_NAME=\"cases/2.t\" -o cases/2.p main.c ../src/libaio.a -lpthread
|
||||
> gcc-11 -Wall -Werror -I../src -g -O2 -DTEST_NAME=\"cases/3.t\" -o cases/3.p main.c ../src/libaio.a -lpthread
|
||||
> In file included from main.c:24:
|
||||
> cases/3.t: In function ‘test_main’:
|
||||
> cases/3.t:18:19: error: ‘attempt_io_submit’ accessing 8 bytes in a region of size 0 [-Werror=stringop-overflow=]
|
||||
> 18 | status |= attempt_io_submit( io_ctx, 1, (void *)-1, -EFAULT);
|
||||
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
> cases/3.t:18:19: note: referencing argument 3 of type ‘struct iocb **’
|
||||
> In file included from cases/3.t:5,
|
||||
> from main.c:24:
|
||||
> cases/aio_setup.h:15:5: note: in a call to function ‘attempt_io_submit’
|
||||
> 15 | int attempt_io_submit(io_context_t ctx, long nr, struct iocb *ios[], int expect)
|
||||
> | ^~~~~~~~~~~~~~~~~
|
||||
> cc1: all warnings being treated as errors
|
||||
> make[1]: *** [Makefile:19: cases/3.p] Error 1
|
||||
> make[1]: Leaving directory '/alt/public_software/libaio/harness'
|
||||
> make: *** [Makefile:23: partcheck] Error 2
|
||||
|
||||
The fix is to remove this one test case, since the compiler now
|
||||
ensures the running code will never see this case.
|
||||
|
||||
Signed-off-by: Lee Duncan <leeman.duncan@gmail.com>
|
||||
---
|
||||
harness/cases/3.t | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff -Nurp a/harness/cases/3.t b/harness/cases/3.t
|
||||
--- a/harness/cases/3.t 2018-10-22 20:59:34.000000000 +0100
|
||||
+++ b/harness/cases/3.t 2022-02-26 09:46:51.969845084 +0000
|
||||
@@ -15,7 +15,6 @@ int test_main(void)
|
||||
status |= attempt_io_submit(BAD_CTX, 1, good_ios, -EINVAL);
|
||||
status |= attempt_io_submit( io_ctx, 0, good_ios, 0);
|
||||
status |= attempt_io_submit( io_ctx, 1, NULL, -EFAULT);
|
||||
- status |= attempt_io_submit( io_ctx, 1, (void *)-1, -EFAULT);
|
||||
status |= attempt_io_submit( io_ctx, 2, bad1_ios, -EFAULT);
|
||||
status |= attempt_io_submit( io_ctx, 2, bad2_ios, -EFAULT);
|
||||
status |= attempt_io_submit( io_ctx, -1, good_ios, -EINVAL);
|
Loading…
Reference in a new issue