tests: Drop use of g_test_bug_base()

Include the base URI in the `g_test_bug()` calls instead. This resolves
inconsistencies between the old bug base (bugzilla.gnome.org) and the
new bug base (gitlab.gnome.org). It also has the advantage that the URI
passed to `g_test_bug()` is now clickable in the code editor, rather
than being split across two locations.

See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/275#note_303175

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
Philip Withnall
2021-05-13 22:12:29 +01:00
parent 46ab6821a3
commit 7e9585177d
44 changed files with 66 additions and 127 deletions

View File

@@ -104,7 +104,7 @@ test_launch_no_app_id (void)
"Exec=%s/appinfo-test --option %%u %%i --name %%c --filename %%k %%m %%%%",
g_test_get_dir (G_TEST_BUILT));
g_test_bug ("791337");
g_test_bug ("https://bugzilla.gnome.org/show_bug.cgi?id=791337");
for (i = 0; i < G_N_ELEMENTS (exec_line_variants); i++)
{
@@ -581,7 +581,6 @@ main (int argc, char *argv[])
g_setenv ("XDG_CURRENT_DESKTOP", "GNOME", TRUE);
g_test_init (&argc, &argv, G_TEST_OPTION_ISOLATE_DIRS, NULL);
g_test_bug_base ("https://bugzilla.gnome.org/show_bug.cgi?id=");
g_test_add_func ("/appinfo/basic", test_basic);
g_test_add_func ("/appinfo/text", test_text);

View File

@@ -164,7 +164,7 @@ test_without_flush (SetupData *data,
{
prepare_data (data, FALSE);
g_test_bug ("617937");
g_test_bug ("https://bugzilla.gnome.org/show_bug.cgi?id=617937");
/* just close asynchronously */
g_output_stream_close_async (data->conv_stream,
@@ -181,7 +181,7 @@ test_with_flush (SetupData *data, gconstpointer user_data)
{
GError *error = NULL;
g_test_bug ("617937");
g_test_bug ("https://bugzilla.gnome.org/show_bug.cgi?id=617937");
prepare_data (data, TRUE);
@@ -222,7 +222,7 @@ static void
test_with_async_flush (SetupData *data,
gconstpointer user_data)
{
g_test_bug ("617937");
g_test_bug ("https://bugzilla.gnome.org/show_bug.cgi?id=617937");
prepare_data (data, TRUE);
@@ -244,8 +244,6 @@ main (int argc,
g_test_init (&argc, &argv, NULL);
g_test_bug_base ("http://bugzilla.gnome.org/");
data = g_slice_new (SetupData);
/* test closing asynchronously without flushing manually */

View File

@@ -126,7 +126,7 @@ test_read_byte (void)
GInputStream *in;
GError *error;
g_test_bug ("562393");
g_test_bug ("https://bugzilla.gnome.org/show_bug.cgi?id=562393");
base = g_memory_input_stream_new_from_data ("abcdefgh", -1, NULL);
in = g_buffered_input_stream_new (base);
@@ -536,7 +536,6 @@ main (int argc,
char *argv[])
{
g_test_init (&argc, &argv, NULL);
g_test_bug_base ("http://bugzilla.gnome.org/");
g_test_add_func ("/buffered-input-stream/peek", test_peek);
g_test_add_func ("/buffered-input-stream/peek-buffer", test_peek_buffer);

View File

@@ -390,7 +390,7 @@ test_type_is_a_special_case (void)
#else
gboolean res;
g_test_bug ("782311");
g_test_bug ("https://bugzilla.gnome.org/show_bug.cgi?id=782311");
/* Everything but the inode type is application/octet-stream */
res = g_content_type_is_a ("inode/directory", "application/octet-stream");
@@ -463,8 +463,6 @@ main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
g_test_bug_base ("http://bugzilla.gnome.org/");
g_test_add_func ("/contenttype/guess", test_guess);
g_test_add_func ("/contenttype/guess_svg_from_data", test_guess_svg_from_data);
g_test_add_func ("/contenttype/mime_from_content", test_mime_from_content);

View File

@@ -748,7 +748,7 @@ test_roundtrip (gconstpointer data)
GFileInfo *info;
GFileInfo *info2;
g_test_bug ("619945");
g_test_bug ("https://bugzilla.gnome.org/show_bug.cgi?id=619945");
data0 = g_malloc (DATA_LENGTH * sizeof (guint32));
for (i = 0; i < DATA_LENGTH; i++)
@@ -1211,8 +1211,6 @@ main (int argc,
g_test_init (&argc, &argv, NULL);
g_test_bug_base ("http://bugzilla.gnome.org/");
g_test_add_func ("/converter/basics", test_converter_basics);
g_test_add_func ("/converter-input-stream/expander", test_expander);
g_test_add_func ("/converter-input-stream/compressor", test_compressor);

View File

@@ -68,7 +68,7 @@ test_input_filter (void)
gchar buf[1024];
GError *error = NULL;
g_test_bug ("568394");
g_test_bug ("https://bugzilla.gnome.org/show_bug.cgi?id=568394");
base = g_memory_input_stream_new_from_data ("abcdefghijk", -1, NULL);
f1 = g_object_new (TEST_TYPE_FILTER_INPUT_STREAM,
"base-stream", base,
@@ -381,7 +381,6 @@ int
main (int argc, char **argv)
{
g_test_init (&argc, &argv, NULL);
g_test_bug_base ("http://bugzilla.gnome.org/");
g_test_add_func ("/filter-stream/input", test_input_filter);
g_test_add_func ("/filter-stream/output", test_output_filter);

View File

@@ -225,8 +225,7 @@ main (int argc, char *argv[])
g_test_init (&argc, &argv, NULL);
g_test_bug_base ("http://bugzilla.gnome.org/");
g_test_bug ("787731");
g_test_bug ("https://bugzilla.gnome.org/show_bug.cgi?id=787731");
g_test_add_data_func ("/g-file-info-filesystem-readonly/test-fs-ro",
GINT_TO_POINTER (FALSE), test_filesystem_readonly);

View File

@@ -1051,7 +1051,7 @@ test_message_parse_empty_arrays_of_arrays (void)
GVariant *body;
GError *error = NULL;
g_test_bug ("673612");
g_test_bug ("https://bugzilla.gnome.org/show_bug.cgi?id=673612");
/* These three-element array of empty arrays were previously read back as a
* two-element array of empty arrays, due to sometimes erroneously skipping
* four bytes to align for the eight-byte-aligned grandchild types (x and
@@ -1107,7 +1107,7 @@ test_message_serialize_double_array (void)
GVariantBuilder builder;
GVariant *body;
g_test_bug ("732754");
g_test_bug ("https://bugzilla.gnome.org/show_bug.cgi?id=732754");
g_variant_builder_init (&builder, G_VARIANT_TYPE ("ad"));
g_variant_builder_add (&builder, "d", (gdouble)0.0);
@@ -1480,7 +1480,6 @@ main (int argc,
setlocale (LC_ALL, "C");
g_test_init (&argc, &argv, NULL);
g_test_bug_base ("https://bugzilla.gnome.org/show_bug.cgi?id=");
g_test_add_func ("/gdbus/message-serialize/basic",
test_message_serialize_basic);

View File

@@ -270,7 +270,7 @@ test_store_splice_replace_middle (void)
GAction *item;
GPtrArray *array;
g_test_bug ("795307");
g_test_bug ("https://bugzilla.gnome.org/show_bug.cgi?id=795307");
store = g_list_store_new (G_TYPE_SIMPLE_ACTION);
model = G_LIST_MODEL (store);
@@ -326,7 +326,7 @@ test_store_splice_replace_all (void)
GPtrArray *array;
GAction *item;
g_test_bug ("795307");
g_test_bug ("https://bugzilla.gnome.org/show_bug.cgi?id=795307");
store = g_list_store_new (G_TYPE_SIMPLE_ACTION);
model = G_LIST_MODEL (store);
@@ -874,7 +874,6 @@ test_store_find (void)
int main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
g_test_bug_base ("https://bugzilla.gnome.org/");
g_test_add_func ("/glistmodel/store/properties", test_store_properties);
g_test_add_func ("/glistmodel/store/non-gobjects", test_store_non_gobjects);

View File

@@ -233,7 +233,7 @@ test_exit1_cancel (void)
GSubprocess *proc;
TestExit1CancelData data = { 0 };
g_test_bug ("786456");
g_test_bug ("https://bugzilla.gnome.org/show_bug.cgi?id=786456");
args = get_test_subprocess_args ("exit1", NULL);
proc = g_subprocess_newv ((const gchar * const *) args->pdata, G_SUBPROCESS_FLAGS_NONE, error);
@@ -288,7 +288,7 @@ test_exit1_cancel_in_cb (void)
GSubprocess *proc;
TestExit1CancelData data = { 0 };
g_test_bug ("786456");
g_test_bug ("https://bugzilla.gnome.org/show_bug.cgi?id=786456");
args = get_test_subprocess_args ("exit1", NULL);
proc = g_subprocess_newv ((const gchar * const *) args->pdata, G_SUBPROCESS_FLAGS_NONE, error);
@@ -1812,7 +1812,6 @@ main (int argc, char **argv)
gsize i;
g_test_init (&argc, &argv, NULL);
g_test_bug_base ("https://bugzilla.gnome.org/");
g_test_add_func ("/gsubprocess/noop", test_noop);
g_test_add_func ("/gsubprocess/noop-all-to-null", test_noop_all_to_null);

View File

@@ -33,7 +33,7 @@ test_truncate (void)
GError *error = NULL;
guint8 *data;
g_test_bug ("540423");
g_test_bug ("https://bugzilla.gnome.org/show_bug.cgi?id=540423");
mo = g_memory_output_stream_new_resizable ();
g_assert (g_seekable_can_truncate (G_SEEKABLE (mo)));
@@ -66,7 +66,7 @@ test_truncate (void)
for (i = 1000; i < 3000; i++)
g_assert_cmpuint (data[i], ==, 2);
g_test_bug ("720080");
g_test_bug ("https://bugzilla.gnome.org/show_bug.cgi?id=720080");
g_seekable_truncate (G_SEEKABLE (mo), 8192, NULL, &error);
g_assert_cmpint (g_memory_output_stream_get_data_size (G_MEMORY_OUTPUT_STREAM (mo)), ==, 8192);
@@ -199,7 +199,7 @@ test_data_size (void)
GDataOutputStream *o;
int pos;
g_test_bug ("540459");
g_test_bug ("https://bugzilla.gnome.org/show_bug.cgi?id=540459");
mo = g_memory_output_stream_new_resizable ();
o = g_data_output_stream_new (mo);
@@ -211,7 +211,7 @@ test_data_size (void)
pos = g_seekable_tell (G_SEEKABLE (mo));
g_assert_cmpint (pos, ==, 1);
g_test_bug ("540461");
g_test_bug ("https://bugzilla.gnome.org/show_bug.cgi?id=540461");
g_seekable_seek (G_SEEKABLE (mo), 0, G_SEEK_SET, NULL, NULL);
pos = g_seekable_tell (G_SEEKABLE (mo));
@@ -239,7 +239,7 @@ test_properties (void)
gpointer data_prop;
gpointer func;
g_test_bug ("605733");
g_test_bug ("https://bugzilla.gnome.org/show_bug.cgi?id=605733");
mo = (GOutputStream*) g_object_new (G_TYPE_MEMORY_OUTPUT_STREAM,
"realloc-function", g_realloc,
@@ -430,7 +430,6 @@ main (int argc,
char *argv[])
{
g_test_init (&argc, &argv, NULL);
g_test_bug_base ("http://bugzilla.gnome.org/");
g_test_add_func ("/memory-output-stream/truncate", test_truncate);
g_test_add_func ("/memory-output-stream/seek/fixed", test_seek_fixed);

View File

@@ -1011,7 +1011,7 @@ test_happy_eyeballs_ipv6_error_ipv4_very_slow (HappyEyeballsFixture *fixture,
AsyncData data = { 0 };
GError *ipv6_error;
g_test_bug ("merge_requests/865");
g_test_bug ("https://gitlab.gnome.org/GNOME/glib/merge_requests/865");
g_test_summary ("Ensure that we successfully return IPv4 results even when they come significantly later than an IPv6 failure.");
/* If ipv6 fails, ensuring that ipv6 errors before ipv4 finishes, we still get ipv4. */
@@ -1187,7 +1187,6 @@ main (int argc, char *argv[])
gchar *path;
g_test_init (&argc, &argv, NULL);
g_test_bug_base ("https://gitlab.gnome.org/GNOME/glib/");
g_test_add_func ("/network-address/basic", test_basic);

View File

@@ -58,7 +58,7 @@ test_network_monitor (void)
{
guint ii;
g_test_bug ("793727");
g_test_bug ("https://bugzilla.gnome.org/show_bug.cgi?id=793727");
if (g_test_subprocess ())
{
@@ -86,7 +86,6 @@ int
main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
g_test_bug_base ("https://bugzilla.gnome.org/show_bug.cgi?id=");
g_test_add_func ("/network-monitor/create-in-thread",
test_network_monitor);

View File

@@ -285,7 +285,6 @@ int
main (int argc, char **argv)
{
g_test_init (&argc, &argv, NULL);
g_test_bug_base ("http://bugzilla.gnome.org/");
g_test_add_func ("/filter-stream/input", test);
g_test_add_func ("/filter-stream/async", asynch);

View File

@@ -86,8 +86,6 @@ main (int argc,
{
g_test_init (&argc, &argv, NULL);
g_test_bug_base ("http://bugzilla.gnome.org/");
g_test_add_func ("/socket-listener/event-signal", test_event_signal);
return g_test_run();

View File

@@ -182,7 +182,7 @@ test_threaded_712570 (void)
GSocketClient *client;
GError *error = NULL;
g_test_bug ("712570");
g_test_bug ("https://bugzilla.gnome.org/show_bug.cgi?id=712570");
g_mutex_lock (&mutex_712570);
@@ -557,8 +557,6 @@ main (int argc,
{
g_test_init (&argc, &argv, NULL);
g_test_bug_base ("http://bugzilla.gnome.org/");
g_test_add_func ("/socket-service/start-stop", test_start_stop);
g_test_add_func ("/socket-service/threaded/712570", test_threaded_712570);
g_test_add_func ("/socket-service/read_write_async", test_read_write_async);

View File

@@ -1227,7 +1227,7 @@ test_fd_reuse (void)
gssize len;
gchar buf[128];
g_test_bug ("741707");
g_test_bug ("https://bugzilla.gnome.org/show_bug.cgi?id=741707");
data = create_server (G_SOCKET_FAMILY_IPV4, echo_server_thread, FALSE, &error);
if (error != NULL)
@@ -2140,7 +2140,6 @@ main (int argc,
GError *error = NULL;
g_test_init (&argc, &argv, NULL);
g_test_bug_base ("https://bugzilla.gnome.org/");
sock = g_socket_new (G_SOCKET_FAMILY_IPV6,
G_SOCKET_TYPE_STREAM,

View File

@@ -965,7 +965,7 @@ test_file_hard_links (Fixture *fixture,
GError *error = NULL;
TestData data;
g_test_bug ("755721");
g_test_bug ("https://bugzilla.gnome.org/show_bug.cgi?id=755721");
#ifdef HAVE_LINK
g_test_message ("Running with hard link tests");
@@ -1020,8 +1020,6 @@ main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
g_test_bug_base ("https://bugzilla.gnome.org/show_bug.cgi?id=");
g_test_add ("/monitor/atomic-replace", Fixture, NULL, setup, test_atomic_replace, teardown);
g_test_add ("/monitor/file-changes", Fixture, NULL, setup, test_file_changes, teardown);
g_test_add ("/monitor/dir-monitor", Fixture, NULL, setup, test_dir_monitor, teardown);

View File

@@ -38,7 +38,7 @@ test_trash_not_supported (void)
gchar *parent_dirname;
GStatBuf parent_stat, home_stat;
g_test_bug ("251");
g_test_bug ("https://gitlab.gnome.org/GNOME/glib/issues/251");
/* The test assumes that tmp file is located on system internal mount. */
file = g_file_new_tmp ("test-trashXXXXXX", &stream, &error);
@@ -105,7 +105,7 @@ test_trash_symlinks (void)
gchar *target, *tmp, *target_over_symlink;
GError *error = NULL;
g_test_bug ("1522");
g_test_bug ("https://gitlab.gnome.org/GNOME/glib/issues/1522");
target = g_build_filename (g_get_home_dir (), ".local", NULL);
@@ -204,8 +204,6 @@ main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
g_test_bug_base ("https://gitlab.gnome.org/GNOME/glib/issues/");
g_test_add_func ("/trash/not-supported", test_trash_not_supported);
g_test_add_func ("/trash/symlinks", test_trash_symlinks);