glib/gio/tests
Simon McVittie e0b6b8037d Distinguish more clearly between wait status and exit status
On Unix platforms, wait() and friends yield an integer that encodes
how the process exited. Confusingly, this is usually not the same as
the integer passed to exit() or returned from main(): conceptually it's
an integer encoding of this tagged union:

    enum { EXITED, SIGNALLED, ... } tag;
    union {
        int exit_status;         /* if EXITED */
        struct {
            int terminating_signal;
            bool core_dumped;
        } terminating_signal;    /* if SIGNALLED */
        ...
    } detail;

Meanwhile, on Windows, wait statuses and exit statuses are
interchangeable.

I find that it's clearer what is going on if we are consistent about
referring to the result of wait() as a "wait status", and the value
passed to exit() as an "exit status".

GSubprocess already gets this right: g_subprocess_get_status() returns
the wait status, while g_subprocess_get_exit_status() genuinely returns
the exit status. However, the GSpawn family of APIs has tended to
conflate the two.

Confusingly, g_spawn_check_exit_status() has always checked a wait
status, and it would not be correct to pass an exit status to it; so
let's deprecate it in favour of g_spawn_check_wait_status(), which
does the same thing that g_spawn_check_exit_status() always did.
Code that needs backwards-compatibility with older GLib can use:

    #if !GLIB_CHECK_VERSION(2, 69, 0)
    #define g_spawn_check_wait_status(x) (g_spawn_check_exit_status (x))
    #endif

Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-06-15 14:33:14 +01:00
..
cert-tests gtlscertificate: Allow any type of private key in PEM files 2018-12-18 11:43:08 +01:00
de/LC_MESSAGES meson add missing gio/tests subdirectory/file 2017-07-13 19:03:39 -04:00
desktop-files gdesktopappinfo: Fix validation of XDG_CURRENT_DESKTOP 2021-01-09 15:39:09 +01:00
gdbus-object-manager-example gdbus-object-manager-example: Fix build on Visual Studio 2020-05-28 17:20:22 +08:00
modules build: Drop autotools support 2019-01-15 15:11:43 +00:00
schema-tests Don't skip invalid enum values in schemas 2017-10-11 10:22:23 +01:00
services Extend dbus watching name tests: 2021-01-25 15:00:12 +01:00
static-link CI: Test static build on installed glib 2018-10-23 09:45:12 -04:00
thumbnails
x-content Correct shellcheck errors (and ignore world splitting when we want it) 2020-11-15 17:34:27 +01:00
.gitignore gdbus, tests: rename gdbus-unix-addresses test to gdbus-address-get-session 2019-03-12 21:53:43 +03:00
111_digit_test.gresource.xml glib-compile-resources: Fixes #1675 2019-02-20 10:38:29 +00:00
actions.c Fix several signedness warnings in gio/tests/actions.c 2021-04-08 13:24:54 +02:00
appinfo-test2.desktop.in tests: Avoid chdir() call at the start of appinfo tests 2018-12-17 17:16:03 +00:00
appinfo-test-actions.desktop
appinfo-test-gnome.desktop.in tests: Avoid chdir() call at the start of appinfo tests 2018-12-17 17:16:03 +00:00
appinfo-test-notgnome.desktop.in tests: Avoid chdir() call at the start of appinfo tests 2018-12-17 17:16:03 +00:00
appinfo-test-static.desktop tests: Use static appinfo .desktop file when not launching 2018-12-17 17:16:04 +00:00
appinfo-test.c Normalize C source files to end with exactly one newline 2020-06-10 09:48:02 +01:00
appinfo-test.desktop.in tests: Don’t spawn test processes via the terminal in the appinfo test 2019-06-28 13:05:07 +01:00
appinfo.c tests: Drop use of g_test_bug_base() 2021-05-13 22:16:27 +01:00
appmonitor.c gio/tests/appmonitor: Use g_assert_no_errno() 2020-10-31 12:24:05 +00:00
apps.c apps test: add new "monitor" subcommand 2014-09-09 14:11:38 -04:00
async-close-output-stream.c tests: Drop use of g_test_bug_base() 2021-05-13 22:16:27 +01:00
async-splice-output-stream.c tests: Add splice cancellation test 2020-08-28 11:38:51 +02:00
autoptr.c autoptr test: Use OS-dependent path separator 2019-02-13 08:49:42 +00:00
basic-application.c Fix several missing initializer warnings in gio/tests/basic-application.c 2021-04-29 12:40:05 +02:00
buffered-input-stream.c tests: Drop use of g_test_bug_base() 2021-05-13 22:16:27 +01:00
buffered-output-stream.c
cancellable.c tests: Mark tests with AddressSanitizer-detected leaks 2021-02-01 11:19:59 +00:00
codegen.py py: Various flake8 cleanups 2020-11-17 15:50:07 +00:00
contenttype.c tests: Drop use of g_test_bug_base() 2021-05-13 22:16:27 +01:00
contexts.c Fix several signedness warnings in gio/tests/contexts.c 2021-04-05 12:03:51 +02:00
converter-stream.c tests: Drop use of g_test_bug_base() 2021-05-13 22:16:27 +01:00
credentials.c gio: add gcredential support for macOS 2020-05-07 14:19:16 +01:00
data-input-stream.c tests: data-input-stream: fix -Wduplicated-branches 2018-02-16 17:38:26 +00:00
data-output-stream.c Use G_GNUC_FALLTHROUGH where appropriate 2018-09-04 20:24:25 +02:00
dbus-appinfo.c Fix several missing initializer warnings in gio/tests/dbus-appinfo.c 2021-04-29 12:40:05 +02:00
dbus-launch.c gdbus, tests: rename gdbus-unix-addresses test to gdbus-address-get-session 2019-03-12 21:53:43 +03:00
de.po
defaultvalue.c tests: Do not init the default value 2019-10-26 14:06:31 +01:00
desktop-app-info.c tests: Use a more realistic language code than sv_SV 2021-02-14 14:43:12 +00:00
echo-server.c Use G_OPTION_ENTRY_NULL to avoid missing initializer warnings 2021-05-13 20:16:46 +00:00
empty.txt gresource: Fix handling of zero-sized compressed resource entries 2020-11-14 19:03:18 +00:00
enums.xml.template
fake-document-portal.c tests: Fix callback arguments in fake-document-portal 2020-01-07 11:20:45 +00:00
fake-service-name.c Fix missing initializer in gio/tests/fake-service-name.c 2021-05-06 22:54:53 +02:00
file.c tests: Add missing setlocale() call to file tests 2021-06-07 12:44:58 +01:00
fileattributematcher.c Fix various const-correctness issues 2018-04-26 15:19:17 +01:00
filter-cat.c Use G_OPTION_ENTRY_NULL to avoid missing initializer warnings 2021-05-13 20:16:46 +00:00
filter-streams.c tests: Drop use of g_test_bug_base() 2021-05-13 22:16:27 +01:00
g-file-info-filesystem-readonly.c tests: Drop use of g_test_bug_base() 2021-05-13 22:16:27 +01:00
g-file-info.c gfileinfo: Add tests for get and set {access,creation}_date_time APIs 2021-03-28 23:07:39 +02:00
g-file.c Fix multiple missing initializer warning in gio/tests/g-file.c 2021-04-08 13:24:54 +02:00
g-icon.c Fix g_icon_to_string() regression (doc inconsistency). 2018-09-13 13:16:40 +02:00
gapplication-example-actions.c
gapplication-example-cmdline2.c
gapplication-example-cmdline3.c Use G_OPTION_ENTRY_NULL to avoid missing initializer warnings 2021-05-13 20:16:46 +00:00
gapplication-example-cmdline4.c Use G_OPTION_ENTRY_NULL to avoid missing initializer warnings 2021-05-13 20:16:46 +00:00
gapplication-example-cmdline.c
gapplication-example-dbushooks.c
gapplication-example-open.c
gapplication.c application: Unset the registered state after shutting down 2021-04-27 17:11:10 +02:00
gdbus-address-get-session.c gdbus, tests, win32: test session dbus autolaunch 2019-03-12 21:54:47 +03:00
gdbus-addresses.c tree: Fix various typos and outdated terminology 2020-06-12 15:01:08 +01:00
gdbus-auth.c GDBus tests: Use G_SOURCE_REMOVE, G_SOURCE_CONTINUE 2020-10-01 16:32:50 +01:00
gdbus-bz627724.c gio/tests/: LGPLv2+ -> LGPLv2.1+ 2017-05-29 19:53:34 +02:00
gdbus-close-pending.c GDBus tests: Use G_SOURCE_REMOVE, G_SOURCE_CONTINUE 2020-10-01 16:32:50 +01:00
gdbus-connection-flush-helper.c gio/tests/: LGPLv2+ -> LGPLv2.1+ 2017-05-29 19:53:34 +02:00
gdbus-connection-flush.c tests: Fix non-atomic access to some shared variables 2020-11-20 14:40:19 +00:00
gdbus-connection-loss.c GDBus tests: Use G_SOURCE_REMOVE, G_SOURCE_CONTINUE 2020-10-01 16:32:50 +01:00
gdbus-connection-slow.c Distinguish more clearly between wait status and exit status 2021-06-15 14:33:14 +01:00
gdbus-connection.c Fix missing initializer warning in gio/tests/gdbus-connection.c 2021-04-14 23:26:15 +02:00
gdbus-daemon.c Use G_OPTION_ENTRY_NULL to avoid missing initializer warnings 2021-05-13 20:16:46 +00:00
gdbus-error.c gio/tests/: LGPLv2+ -> LGPLv2.1+ 2017-05-29 19:53:34 +02:00
gdbus-example-export.c Fix missing initializer warning in gio/tests/gdbus-example-export.c 2021-04-15 10:19:29 +02:00
gdbus-example-objectmanager-client.c build: work around meson issue with too long filenames on Windows. Fixes #1556 2018-10-04 10:45:45 +02:00
gdbus-example-objectmanager-server.c GDBus: Use G_DBUS_METHOD_INVOCATION_HANDLED in method implementations 2020-10-01 16:32:50 +01:00
gdbus-example-own-name.c Use G_OPTION_ENTRY_NULL to avoid missing initializer warnings 2021-05-13 20:16:46 +00:00
gdbus-example-peer.c Use G_OPTION_ENTRY_NULL to avoid missing initializer warnings 2021-05-13 20:16:46 +00:00
gdbus-example-proxy-subclass.c Drop trailing semi-colon from G_DEFINE_ macro 2017-04-10 10:38:31 +01:00
gdbus-example-server.c Fix missing initializer warning in gio/tests/gdbus-example-server.c 2021-04-23 10:43:05 +02:00
gdbus-example-subtree.c Fix several missing initializer warnings in gio/tests/gdbus-example-subtree.c 2021-04-23 10:43:05 +02:00
gdbus-example-unix-fd-client.c glib: Don’t use time(NULL) to get current time 2018-07-09 13:28:02 +02:00
gdbus-example-watch-name.c Use G_OPTION_ENTRY_NULL to avoid missing initializer warnings 2021-05-13 20:16:46 +00:00
gdbus-example-watch-proxy.c Use G_OPTION_ENTRY_NULL to avoid missing initializer warnings 2021-05-13 20:16:46 +00:00
gdbus-exit-on-close.c Fix missing initializer warning in gio/tests/gdbus-exit-on-close.c 2021-05-27 10:16:52 +02:00
gdbus-export.c Fix multiple missing initializer warnings in gio/tests/gdbus-export.c 2021-04-14 23:26:15 +02:00
gdbus-introspection.c gio/tests/: LGPLv2+ -> LGPLv2.1+ 2017-05-29 19:53:34 +02:00
gdbus-message.c Normalize C source files to end with exactly one newline 2020-06-10 09:48:02 +01:00
gdbus-names.c Add two test cases which covers disconnection scenario in another thread 2021-03-17 08:36:47 +01:00
gdbus-non-socket.c Fix missing initializer warning in gio/tests/gdbus-non-socket.c 2021-04-23 10:43:05 +02:00
gdbus-overflow.c tests: Fix non-atomic access to some shared variables 2020-11-20 14:40:19 +00:00
gdbus-peer-object-manager.c Fix missing initializer warning in gio/tests/gdbus-peer-object-manager.c 2021-04-08 13:24:54 +02:00
gdbus-peer.c Fix several missing initializer warnings in gio/tests/gdbus-peer.c 2021-04-08 13:24:54 +02:00
gdbus-proxy-threads.c tree: Fix various typos and outdated terminology 2020-06-12 15:01:08 +01:00
gdbus-proxy-unique-name.c gdbusproxy: make g-name-owner property useful with unique names 2018-11-10 03:53:32 +00:00
gdbus-proxy-well-known-name.c gio/tests/: LGPLv2+ -> LGPLv2.1+ 2017-05-29 19:53:34 +02:00
gdbus-proxy.c Fix signedness warning in gio/tests/gdbus-proxy.c 2021-04-23 10:43:05 +02:00
gdbus-serialization.c tests: Drop use of g_test_bug_base() 2021-05-13 22:16:27 +01:00
gdbus-server-auth.c tests: Add a basic test for require-same-user D-Bus auth flag 2021-02-11 16:12:40 +00:00
gdbus-sessionbus.c gio/tests: add a fake implementation of the document portal 2019-12-17 20:56:49 +08:00
gdbus-sessionbus.h gio/tests/: LGPLv2+ -> LGPLv2.1+ 2017-05-29 19:53:34 +02:00
gdbus-test-codegen.c Fix signedness warning in gio/tests/gdbus-test-codegen.c 2021-04-15 00:00:22 +02:00
gdbus-test-fixture.c gio/tests: add a fake implementation of the document portal 2019-12-17 20:56:49 +08:00
gdbus-tests.c GDBus tests: Use G_SOURCE_REMOVE, G_SOURCE_CONTINUE 2020-10-01 16:32:50 +01:00
gdbus-tests.h tests: Take explicit connection and context when ensuring testserver up 2020-02-24 07:46:22 +00:00
gdbus-testserver.c Fix missing initializer warning in gio/tests/gdbus-testserver.c 2021-04-15 10:19:29 +02:00
gdbus-threading.c tree: Fix various typos and outdated terminology 2020-06-12 15:01:08 +01:00
gen-big-test-resource.py py: Various flake8 cleanups 2020-11-17 15:50:07 +00:00
gengiotypefuncs.py py: Various flake8 cleanups 2020-11-17 15:50:07 +00:00
gio-du.c win32: Replace usage of __wgetmainargs() 2015-07-23 04:22:59 -04:00
giomodule.c Fix test failures for static builds 2019-07-15 11:01:04 +00:00
glistmodel.c tests: Drop use of g_test_bug_base() 2021-05-13 22:16:27 +01:00
gmenumodel.c tests: Mark tests with AddressSanitizer-detected leaks 2021-02-01 11:19:59 +00:00
gnotification-server.c Fix missing initializer warning in gio/tests/gnotification-server.c 2021-04-23 10:43:05 +02:00
gnotification-server.h gio/tests/: LGPLv2+ -> LGPLv2.1+ 2017-05-29 19:53:34 +02:00
gnotification.c tests: fix gnotification tests broken due to the recent icon name fallback changes 2018-08-19 20:04:41 +02:00
gschema-compile.c glib: Update various code comments to mention Meson 2019-01-15 15:11:43 +00:00
gsettings.c gsettings: Resolve child schemas from the parent's schema source 2021-06-04 12:09:24 +00:00
gsocketclient-slow.c Fix race in socketclient-slow test 2020-10-26 14:18:06 +00:00
gsubprocess-testprog.c Use G_OPTION_ENTRY_NULL to avoid missing initializer warnings 2021-05-13 20:16:46 +00:00
gsubprocess.c Distinguish more clearly between wait status and exit status 2021-06-15 14:33:14 +01:00
gtesttlsbackend.c tls: expose SAN details on GTlsCertificate 2021-06-10 00:54:45 +00:00
gtesttlsbackend.h gio/tests/: LGPLv2+ -> LGPLv2.1+ 2017-05-29 19:53:34 +02:00
gtlsconsoleinteraction.c tree: Fix various typos and outdated terminology 2020-06-12 15:01:08 +01:00
gtlsconsoleinteraction.h gio/tests/: LGPLv2+ -> LGPLv2.1+ 2017-05-29 19:53:34 +02:00
httpd.c Use G_OPTION_ENTRY_NULL to avoid missing initializer warnings 2021-05-13 20:16:46 +00:00
inet-address.c Fix gio/tests/inet-address on OS X 2016-07-11 17:42:41 -04:00
io-stream.c tests: add GSimpleIOStream async close tests 2015-02-17 16:27:46 -05:00
live-g-file.c Use G_OPTION_ENTRY_NULL to avoid missing initializer warnings 2021-05-13 20:16:46 +00:00
live-g-file.txt tree: Fix various typos and outdated terminology 2020-06-12 15:01:08 +01:00
memory-input-stream.c
memory-monitor-dbus.py.in gio/tests/memory-monitor-*.py.in: skip if 3rd party modules not available 2020-04-23 15:01:25 +01:00
memory-monitor-portal.py.in gio/tests/memory-monitor-*.py.in: skip if 3rd party modules not available 2020-04-23 15:01:25 +01:00
memory-monitor.c gio: Add stub test program for GMemoryMonitor 2019-12-11 11:44:42 +00:00
memory-output-stream.c tests: Drop use of g_test_bug_base() 2021-05-13 22:16:27 +01:00
meson.build tests: Allow GResource external data tests to use llvm-objcopy 2021-06-14 14:49:59 +01:00
mimeapps.c Fix signedness warning in gio/tests/mimeapps.c 2021-04-15 10:19:29 +02:00
mock-resolver.c Always resolve localhost to loopback address 2019-10-10 14:32:18 +01:00
mock-resolver.h gnetworkaddress: Implement parallel ipv4 and ipv6 dns lookups 2018-12-11 16:09:29 -05:00
mount-operation.c Add support for TCRYPT volumes to GMountOperation 2018-06-21 15:32:04 +02:00
network-address.c tests: Drop use of g_test_bug_base() 2021-05-13 22:16:27 +01:00
network-monitor-race.c tests: Drop use of g_test_bug_base() 2021-05-13 22:16:27 +01:00
network-monitor.c tests/network-monitor: Always use the dummy proxy resolver 2018-04-10 10:35:45 +01:00
org.gtk.schemasourcecheck.gschema.xml gsettings: Resolve child schemas from the parent's schema source 2021-06-04 12:09:24 +00:00
org.gtk.test.dbusappinfo.desktop
org.gtk.test.dbusappinfo.flatpak.desktop gio/tests: add a test for document portal use when launching flatpaks 2019-12-17 20:59:22 +08:00
org.gtk.test.gschema.override.orig Add a test for per-desktop overrides 2018-06-22 22:02:31 +03:00
org.gtk.test.gschema.xml.orig Add a test for per-desktop overrides 2018-06-22 22:02:31 +03:00
permission.c
pollable.c gio/tests/{meson.build,pollable.c}: Determine libutil SONAME at build time 2021-03-10 18:04:17 +00:00
proxy-test.c Fix signedness warning in gio/tests/proxy-test.c 2021-04-15 10:19:29 +02:00
proxy.c Rewriting the G_GNUC_NORETURN into G_NORETURN macros everywhere 2020-11-25 11:34:05 +00:00
readwrite.c Fix signedness warning in gio/tests/readwrite.c 2021-04-29 12:40:05 +02:00
resolver.c Use G_OPTION_ENTRY_NULL to avoid missing initializer warnings 2021-05-13 20:16:46 +00:00
resourceplugin.c tree: Fix various typos and outdated terminology 2020-06-12 15:01:08 +01:00
resources.c gresource: Fix handling of zero-sized compressed resource entries 2020-11-14 19:03:18 +00:00
send-data.c Use G_OPTION_ENTRY_NULL to avoid missing initializer warnings 2021-05-13 20:16:46 +00:00
simple-async-result.c gio/tests/: LGPLv2+ -> LGPLv2.1+ 2017-05-29 19:53:34 +02:00
simple-proxy.c tests: Various minor leak fixes in the GIO tests 2018-06-29 12:13:32 +01:00
sleepy-stream.c tests: Drop use of g_test_bug_base() 2021-05-13 22:16:27 +01:00
slow-connect-preload.c tests: Add gsocketclient test for slow connections 2018-12-11 16:12:48 -05:00
socket-address.c gsocketconnectable: Add a to_string() virtual method 2015-10-13 15:42:14 +01:00
socket-client.c Fix missing initializer warning in gio/tests/socket-client.c 2021-05-13 12:57:14 +02:00
socket-common.c Fix signedness warning in gio/tests/socket-common.c 2021-04-23 10:43:05 +02:00
socket-listener.c tests: Drop use of g_test_bug_base() 2021-05-13 22:16:27 +01:00
socket-server.c Fix missing initializer warning in gio/tests/socket-server.c 2021-05-13 12:57:14 +02:00
socket-service.c tests: Drop use of g_test_bug_base() 2021-05-13 22:16:27 +01:00
socket.c Fix missing initializer warnings in gio/tests/socket.c 2021-05-27 10:16:52 +02:00
srvtarget.c
static-link.py py: Various flake8 cleanups 2020-11-17 15:50:07 +00:00
stream-rw_all.c gio/tests/: LGPLv2+ -> LGPLv2.1+ 2017-05-29 19:53:34 +02:00
taptestrunner.py py: Various flake8 cleanups 2020-11-17 15:50:07 +00:00
task.c tests: Fix non-atomic access to some shared variables 2020-11-20 14:40:19 +00:00
test1.overlay Add a test for resource overlays 2019-01-10 13:50:26 -05:00
test1.txt
test2.gresource.xml tree: Fix various typos and outdated terminology 2020-06-12 15:01:08 +01:00
test2.txt
test3.gresource.xml
test3.txt
test4.gresource.xml
test5.gresource.xml glib-compile-resources: Add external data option 2018-12-19 16:43:21 +00:00
test-codegen.xml gdbus-codegen: emit GUnixFDLists if an arg has type 'h' 2019-09-02 20:47:20 +01:00
test-io-stream.c gio/tests/: LGPLv2+ -> LGPLv2.1+ 2017-05-29 19:53:34 +02:00
test-io-stream.h gio/tests/: LGPLv2+ -> LGPLv2.1+ 2017-05-29 19:53:34 +02:00
test-pipe-unix.c docs: Drop unnecessary <!-- -->s from gtk-doc comments 2017-11-29 17:50:27 +00:00
test-pipe-unix.h gio/tests/: LGPLv2+ -> LGPLv2.1+ 2017-05-29 19:53:34 +02:00
test.gresource.xml gresource: Fix handling of zero-sized compressed resource entries 2020-11-14 19:03:18 +00:00
testenum.h
testfilemonitor.c inotify: Fix a memory leak 2021-06-03 19:04:48 +02:00
thumbnail-verification.c glocalfileinfo: Add statx() support 2020-08-17 12:33:05 +01:00
tls-bindings.c tests: Remove incorrect unref from tls-bindings tests 2021-01-20 12:51:41 +00:00
tls-certificate.c tls: expose SAN details on GTlsCertificate 2021-06-10 00:54:45 +00:00
tls-database.c gtlsbackend: add support for setting the default TLS database 2018-09-03 13:55:57 +10:00
tls-interaction.c tls-interaction: Add test coverage for various ways to set the password 2021-02-08 10:22:48 +00:00
trash.c tests: Drop use of g_test_bug_base() 2021-05-13 22:16:27 +01:00
unix-fd.c
unix-mounts.c gunixmounts: Stop considering cifs/nfs as system file systems 2018-06-20 12:16:34 +01:00
unix-streams.c Fix several signedness warnings in gio/tests/unix-streams.c 2021-04-29 12:39:51 +02:00
vfs.c vfs: Fix return value of get_supported_uri_schemes() 2016-06-28 15:57:49 +02:00
volumemonitor.c Normalize C source files to end with exactly one newline 2020-06-10 09:48:02 +01:00
win32-appinfo.c Normalize C source files to end with exactly one newline 2020-06-10 09:48:02 +01:00
win32-streams.c Fix tests to compile again - add missing headers to W32, call correct process-id-getting function 2014-08-02 12:41:14 +00:00