Commit Graph

25330 Commits

Author SHA1 Message Date
Sebastian Dröge
68574bd130 Merge branch 'wip/pwithnall/io-channel-double-close-source' into 'main'
tests: Fix a double-close of a GSource in tests

See merge request GNOME/glib!2658
2022-05-17 07:22:41 +00:00
Emmanuel Fleury
92a6db39de Cleaning a file left behind by glib/tests/bookmarkfile.c test case 2022-05-16 19:13:52 +02:00
Emmanuel Fleury
ddb0585e65 Moving slice-threadinit.c test to glib/tests/
Related to issue #1434
2022-05-16 15:21:02 +02:00
Emmanuel Fleury
a83ccbd251 Convert tests/slice-threadinit.c to glib test framework 2022-05-16 15:20:27 +02:00
Philip Withnall
7137591775 tests: Fix a double-close of a GSource in tests
This bug only gets triggered on BSD, because it calls `recv_message()`
with `G_IO_HUP | G_IO_IN`. That takes two code paths in
`recv_message()`, and ends up calling `shutdown_source()` twice. The
second call causes a critical warning.

Fixes: https://gitlab.gnome.org/GNOME/glib/-/jobs/2004192

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-16 14:12:30 +01:00
Nicola Fontana
a84068d12a gspawn: Avoid considering out parameters as inputs
The g_spawn_async_with_pipes_and_fds() API changes its behavior
depending on the states of out parameters. Apart from the philosophical
inconsistency, this poses some real problems, e.g. in Lua bindings:

    https://github.com/lgi-devs/lgi/issues/277

This adds three new spawn flags to allow specifying the wanted behavior
explicitly and does not assert on the state of the output parameters.
2022-05-16 15:05:59 +02:00
Philip Withnall
6ad8205949 Merge branch 'nacho/gtask-performance' into 'main'
gtask: use g_strconcat() in g_task_return() only if needed

See merge request GNOME/glib!2654
2022-05-16 12:52:01 +00:00
Philip Withnall
5160b12740 Merge branch 'move_thread_test' into 'main'
Move tests/thread-test.c to glib/tests/thread-deprecated.c

See merge request GNOME/glib!2639
2022-05-16 12:41:25 +00:00
Philip Withnall
d1bec29217 Merge branch 'move_gio-test' into 'main'
Convert tests/gio-test.c to g_test framework

See merge request GNOME/glib!2539
2022-05-16 12:34:27 +00:00
Ignacio Casal Quinteiro
f38d74b233 gtask: use g_strconcat() in g_task_return() only if needed
If the task name is NULL there is no need to allocate the string
since this can be expensive if called very often
2022-05-16 13:25:50 +01:00
Philip Withnall
82766ae446 Merge branch 'wip/pwithnall/disable-macos-ci' into 'main'
ci: Temporarily allow failure of macOS CI runner until it’s fixed

See merge request GNOME/glib!2657
2022-05-16 12:24:52 +00:00
Philip Withnall
e3673202e2 ci: Temporarily disable macOS CI runner until it’s fixed
The runner machine is offline and there is no ETA on when it will be
back, so disable the CI job which uses it for now so that pipelines
can proceed.

See https://gitlab.gnome.org/Infrastructure/GitLab/-/issues/558

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-16 13:01:36 +01:00
Fran Dieguez
bd82c8d1d1 Update Galician translation 2022-05-16 07:58:53 +00:00
Xavier Claessens
5718d15af7 Merge branch 'fix-meson' into 'main'
Fix typo in gio/meson.build

Closes gtk#4918

See merge request GNOME/glib!2655
2022-05-14 13:23:17 +00:00
Godvin Ouseph
61ad2d7217 Fix typo in gio/meson.build
This broke compiling gtk4 as a subproject on Windows
2022-05-14 15:54:56 +05:30
Philip Withnall
9c9a26215d Merge branch 'win32-socket' into 'main'
Various socket-related fixes for win32

See merge request GNOME/glib!2599
2022-05-13 10:25:23 +00:00
Marc-André Lureau
960ed2f906 glib/tests: add spawn-stderr-socket test
Check the spawn implementation behaviour when the stderr is a
socket (mostly for win32).

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-05-12 18:54:11 +02:00
Marc-André Lureau
a34a4e7844 glib/win32: teach reopen_noninherited() about SOCKET
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-05-12 18:54:11 +02:00
Marc-André Lureau
277657eacc glib/win32: introduce private g_win32_handle_is_socket()
Used in following commits, including in some GIO experiments.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-05-12 18:54:11 +02:00
Marc-André Lureau
c43472060b glib/win32: replace reopen_noninherited()
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-05-12 18:49:00 +02:00
Marc-André Lureau
c984db650f glib/win32: introduce private g_win32_reopen_noninherited()
Used in following commits, including in some GIO experiments, so make it
a private API.

For now, this implementation is similar to the glib/gspawn-win32.c one,
with mroe error checking and better on error behaviour. A following
patch will also fix the case of duplicating sockets.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-05-12 18:49:00 +02:00
Marc-André Lureau
982b074fa9 glib/win32: fix potential leak on spawn error
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-05-12 18:48:59 +02:00
Marc-André Lureau
e84b05a8c3 glib/win32: drop needless #ifdef G_OS_WIN32
They were carried over from an ancient time.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-05-12 18:48:59 +02:00
Marc-André Lureau
c4a7ddbf67 gio/tests/unix-fd: rename test
Use a prefix matching the binary, rename the test "scm", as it involves
SocketControlMessage.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-05-12 18:48:59 +02:00
Marc-André Lureau
18d98e30f9 gio/tests: close leaked fd
Also fixes some of the test on win32, since it won't delete files that
are opened.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-05-12 18:48:59 +02:00
Marc-André Lureau
a638b2bbd1 gio: include Unix socket headers
This should have been part of #2487.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-05-12 18:48:59 +02:00
Marc-André Lureau
d1520bd06e glib/tests: move spawn-test-win32-gui
Fixes: commit 762ed2e82b ("Move tests/spawn-test.c -> glib/tests/spawn-test.c")

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-05-12 18:48:59 +02:00
Emmanuel Fleury
87a4cea9e4 Convert g_printf() to g_test_message() to capture messages on TAP 2022-05-12 17:25:07 +02:00
Emmanuel Fleury
4589ff080d Move test/gio-test.c to glib/test/io-channel-basic.c
Helps issue #1434
2022-05-12 17:25:07 +02:00
Emmanuel Fleury
38e0781ba7 Convert deprecated GTimeVal to GDateTime in tests/gio-test.c 2022-05-12 17:25:05 +02:00
Emmanuel Fleury
dbe8e52bde Convert tests/gio-test.c to g_test framework 2022-05-12 17:20:46 +02:00
Philip Withnall
da2702646c Merge branch 'format-codegen' into 'main'
Replace single quotes in gio/tests/codegen.py

See merge request GNOME/glib!2651
2022-05-12 10:24:54 +00:00
Philip Withnall
24909d5e04 Merge branch 'meson-range' into 'main'
meson: Use range() instead of listing all stable versions

See merge request GNOME/glib!2650
2022-05-12 09:53:02 +00:00
TestingPlant
a5e7156a9b Replace single quotes in gio/tests/codegen.py
This makes the formatting more consistent.
2022-05-12 00:29:44 +00:00
Xavier Claessens
5942103937 meson: Use range() instead of listing all stable versions
Note that range(), like in python, has start value included and stop
value excluded. That's why we use last_version + 2.
2022-05-11 14:34:00 -04:00
Philip Withnall
f78e2884d7 tests: Move .test.in template files to tests directory
This makes a bit more sense than having them cluttering up the root
directory.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-11 13:12:20 +01:00
Philip Withnall
5129750884 tools: Move glib.supp to tools directory
This tidies up the root directory a bit more.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-11 13:11:01 +01:00
Philip Withnall
0dc53687f4 tools: Move glib-gettextize.in to tools directory
This tidies up the root directory a bit more.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-11 13:09:17 +01:00
Philip Withnall
7a569f675a tools: Move check-abis.sh from top-level to tools directory
This tidies up the root directory a bit.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-11 13:06:22 +01:00
Philip Withnall
8a3583ac5c docs: Merge NEWS.pre-1-3 into NEWS
Not clear why they were separate files. This is a bit tidier.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-11 13:02:55 +01:00
Philip Withnall
8a30ce926b docs: Reformat INSTALL.md as Markdown
This improves the formatting, but doesn’t touch the content of the file,
some of which is quite out of date.

I’ll approach rewriting the file in a later commit/MR.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-11 13:02:55 +01:00
Philip Withnall
b92708503d docs: Move INSTALL.in to INSTALL.md
We hadn’t been substituting the version number in properly for a while,
so maybe just abandon that approach and rewrite the instructions to not
refer to a specific version number.

This simplifies things a bit, and means the install instructions can be
read online in GitLab.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-11 13:02:49 +01:00
Philip Withnall
3707c214bc docs: Drop README.win32 in favour of README.win32.md
A human-readable symlink is not particularly helpful.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-11 13:02:49 +01:00
Philip Withnall
cdb0cc8800 docs: Move README.rationale to docs subdirectory
This is part of an effort to rationalise our developer documentation a
bit, putting it all in one directory rather than cluttering up the root
directory.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-11 13:02:49 +01:00
Philip Withnall
403bcdafd8 docs: Drop README file in favour of README.md
It was basically a human-readable symlink.

`README.md` seems widely enough accepted now that tooling hopefully
won’t break if we delete the non-Markdown version.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-11 12:47:02 +01:00
Sebastian Dröge
06309d50ea Merge branch 'coc' into 'main'
docs: Add a code of conduct document

See merge request GNOME/glib!2648
2022-05-11 11:46:19 +00:00
Philip Withnall
9817ae71d9 ci: Move clang-format-diff.py into CI directory
There’s no point in having it in the root directory when it’s only
really used for CI. It just clutters up the root.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-11 12:43:27 +01:00
Philip Withnall
f371d710f3 docs: Drop AUTHORS file in favour of git log
The git log (which didn’t exist when this file was written), and
copyright statements, give credit to these original developers.

Listing their names and e-mail addresses so prominently seems like a
recipe for random people to try e-mailing them for support.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-11 12:39:53 +01:00
Philip Withnall
8b6888a6ed docs: Add a code of conduct document
This encodes what GLib is already bound by, as it’s hosted on
gitlab.gnome.org, which is GNOME infrastructure and hence bound by the
GNOME code of conduct.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-11 12:30:58 +01:00
Philip Withnall
9a1b0f17d8 Merge branch 'ci-android' into 'main'
ci: Update to latest Android NDK

Closes #2605

See merge request GNOME/glib!2623
2022-05-11 10:11:11 +00:00