1From cc528f6c2e336a3484c920fe2d11337388829dbe Mon Sep 17 00:00:00 2001 2From: Simon McVittie <smcv@collabora.com> 3Date: Thu, 23 Jun 2022 10:09:15 +0100 4Subject: [PATCH] giomodule test: Don't pass a magic number to 5 g_test_trap_subprocess() 6 7This worked, but seems like bad style. 8 9Signed-off-by: Simon McVittie <smcv@collabora.com> 10 11Conflict:NA 12Reference:https://gitlab.gnome.org/GNOME/glib/-/commit/cc528f6c2e336a3484c920fe2d11337388829dbe 13 14--- 15 gio/tests/giomodule.c | 8 ++++++-- 16 1 file changed, 6 insertions(+), 2 deletions(-) 17 18diff --git a/gio/tests/giomodule.c b/gio/tests/giomodule.c 19index b4923eeefd..4ea6efebd1 100644 20--- a/gio/tests/giomodule.c 21+++ b/gio/tests/giomodule.c 22@@ -80,6 +80,10 @@ test_extension_point (void) 23 g_assert (g_io_extension_get_priority (ext) == 10); 24 } 25 26+#define INHERIT_ALL (G_TEST_SUBPROCESS_INHERIT_STDIN | \ 27+ G_TEST_SUBPROCESS_INHERIT_STDOUT | \ 28+ G_TEST_SUBPROCESS_INHERIT_STDERR) 29+ 30 static void 31 test_module_scan_all (void) 32 { 33@@ -105,7 +109,7 @@ test_module_scan_all (void) 34 g_assert_cmpstr (g_io_extension_get_name (ext), ==, "test-a"); 35 return; 36 } 37- g_test_trap_subprocess (NULL, 0, 7); 38+ g_test_trap_subprocess (NULL, 0, INHERIT_ALL); 39 g_test_trap_assert_passed (); 40 } 41 42@@ -136,7 +140,7 @@ test_module_scan_all_with_scope (void) 43 g_io_module_scope_free (scope); 44 return; 45 } 46- g_test_trap_subprocess (NULL, 0, 7); 47+ g_test_trap_subprocess (NULL, 0, INHERIT_ALL); 48 g_test_trap_assert_passed (); 49 } 50 51-- 52GitLab 53 54