<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/glib.git/tests/spawn-test.c, branch pgriffis/wip/resolver-https</title>
<subtitle>gitlab.gnome.org: GNOME/glib.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/'/>
<entry>
<title>gspawn, tests: extend spawn_test, run it on win32</title>
<updated>2018-12-26T20:45:47+00:00</updated>
<author>
<name>Vasily Galkin</name>
<email>galkin-vv@yandex.ru</email>
</author>
<published>2018-12-26T20:45:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=50cb4f221ccc939740d53be795ae8382a4b2e322'/>
<id>50cb4f221ccc939740d53be795ae8382a4b2e322</id>
<content type='text'>
The spawn_test is enabled on win32 meson build, both msys and msvc.

Some modifications to make it useful for auto-testing on win32:
- use own argv0 to find helper win32-specific subprogram
- helper subprogram and conditions changed, so testing is fully
automated instead of manually checking contents of some MessageBoxes

Redirection test checks "sort" output for locale-independent string
instead of relying on "netstat" locale-dependent string.
Also with "sort" it become usable on unix, so enabled there too.
Currently this fails on win32 with coverage since
some coverage-realted error output from gpawn-win32-helper
is unexpectedly treated as executed subprocess output.


Added test checking "sort" with error-only redirection. This also fails
on win32 by now, due to a typo in gspawn-win32.c (checks for stdout
redirection instead of stderr)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The spawn_test is enabled on win32 meson build, both msys and msvc.

Some modifications to make it useful for auto-testing on win32:
- use own argv0 to find helper win32-specific subprogram
- helper subprogram and conditions changed, so testing is fully
automated instead of manually checking contents of some MessageBoxes

Redirection test checks "sort" output for locale-independent string
instead of relying on "netstat" locale-dependent string.
Also with "sort" it become usable on unix, so enabled there too.
Currently this fails on win32 with coverage since
some coverage-realted error output from gpawn-win32-helper
is unexpectedly treated as executed subprocess output.


Added test checking "sort" with error-only redirection. This also fails
on win32 by now, due to a typo in gspawn-win32.c (checks for stdout
redirection instead of stderr)
</pre>
</div>
</content>
</entry>
<entry>
<title>Consistently save errno immediately after the operation setting it</title>
<updated>2017-08-03T09:21:13+00:00</updated>
<author>
<name>Philip Withnall</name>
<email>withnall@endlessm.com</email>
</author>
<published>2017-07-31T10:30:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=5cddde1fb2b8466d8104595008eafabd0728de5d'/>
<id>5cddde1fb2b8466d8104595008eafabd0728de5d</id>
<content type='text'>
Prevent the situation where errno is set by function A, then function B
is called (which is typically _(), but could be anything else) and it
overwrites errno, then errno is checked by the caller.

errno is a horrific API, and we need to be careful to save its value as
soon as a function call (which might set it) returns. i.e. Follow the
pattern:
  int errsv, ret;
  ret = some_call_which_might_set_errno ();
  errsv = errno;

  if (ret &lt; 0)
    puts (strerror (errsv));

This patch implements that pattern throughout GLib. There might be a few
places in the test code which still use errno directly. They should be
ported as necessary. It doesn’t modify all the call sites like this:
  if (some_call_which_might_set_errno () &amp;&amp; errno == ESOMETHING)
since the refactoring involved is probably more harmful than beneficial
there. It does, however, refactor other call sites regardless of whether
they were originally buggy.

https://bugzilla.gnome.org/show_bug.cgi?id=785577
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prevent the situation where errno is set by function A, then function B
is called (which is typically _(), but could be anything else) and it
overwrites errno, then errno is checked by the caller.

errno is a horrific API, and we need to be careful to save its value as
soon as a function call (which might set it) returns. i.e. Follow the
pattern:
  int errsv, ret;
  ret = some_call_which_might_set_errno ();
  errsv = errno;

  if (ret &lt; 0)
    puts (strerror (errsv));

This patch implements that pattern throughout GLib. There might be a few
places in the test code which still use errno directly. They should be
ported as necessary. It doesn’t modify all the call sites like this:
  if (some_call_which_might_set_errno () &amp;&amp; errno == ESOMETHING)
since the refactoring involved is probably more harmful than beneficial
there. It does, however, refactor other call sites regardless of whether
they were originally buggy.

https://bugzilla.gnome.org/show_bug.cgi?id=785577
</pre>
</div>
</content>
</entry>
<entry>
<title>tests/: LGPLv2+ -&gt; LGPLv2.1+</title>
<updated>2017-05-29T17:53:35+00:00</updated>
<author>
<name>Sébastien Wilmet</name>
<email>swilmet@gnome.org</email>
</author>
<published>2017-05-28T12:09:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=f6c44ec3e44557463721a54b7b6fe0264c6d2424'/>
<id>f6c44ec3e44557463721a54b7b6fe0264c6d2424</id>
<content type='text'>
gen-casefold-txt.pl and gen-casemap-txt.pl are licensed under GPLv2+, so
they are not touched by this commit.

A lot of *.c files in tests/ don't have a license header.

https://bugzilla.gnome.org/show_bug.cgi?id=776504
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
gen-casefold-txt.pl and gen-casemap-txt.pl are licensed under GPLv2+, so
they are not touched by this commit.

A lot of *.c files in tests/ don't have a license header.

https://bugzilla.gnome.org/show_bug.cgi?id=776504
</pre>
</div>
</content>
</entry>
<entry>
<title>Updated FSF's address</title>
<updated>2014-01-31T13:31:55+00:00</updated>
<author>
<name>Daniel Mustieles</name>
<email>daniel.mustieles@gmail.com</email>
</author>
<published>2014-01-23T11:58:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=078dbda148a81af1b3a76fbda72f089b963087f1'/>
<id>078dbda148a81af1b3a76fbda72f089b963087f1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Not needed, just use -DPCRE_STATIC.</title>
<updated>2007-11-07T09:49:25+00:00</updated>
<author>
<name>Tor Lillqvist</name>
<email>tml@novell.com</email>
</author>
<published>2007-11-07T09:49:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=7d2ec70a49558247fb5874b1770e315e8deff235'/>
<id>7d2ec70a49558247fb5874b1770e315e8deff235</id>
<content type='text'>
2007-11-07  Tor Lillqvist  &lt;tml@novell.com&gt;

	* glib/update-pcre/notdll.patch: Not needed, just use -DPCRE_STATIC.

	* glib/update-pcre/Makefile.am: Drop notdll.patch.

	* glib/update-pcre/Makefile.am-1
	* glib/update-pcre/update.sh
	* glib/pcre/Makefile.am
	* glib/Makefile.am: Use -DPCRE_STATIC.

	* tests/gio-test.c
	* tests/mainloop-test.c
	* tests/spawn-test.c: #define pipe(fds) _pipe(fds, 4096,
	_O_BINARY) on Windows.

	* tests/regex-test.c (test_expand): Don't print NULL with %s.


svn path=/trunk/; revision=5805
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
2007-11-07  Tor Lillqvist  &lt;tml@novell.com&gt;

	* glib/update-pcre/notdll.patch: Not needed, just use -DPCRE_STATIC.

	* glib/update-pcre/Makefile.am: Drop notdll.patch.

	* glib/update-pcre/Makefile.am-1
	* glib/update-pcre/update.sh
	* glib/pcre/Makefile.am
	* glib/Makefile.am: Use -DPCRE_STATIC.

	* tests/gio-test.c
	* tests/mainloop-test.c
	* tests/spawn-test.c: #define pipe(fds) _pipe(fds, 4096,
	_O_BINARY) on Windows.

	* tests/regex-test.c (test_expand): Don't print NULL with %s.


svn path=/trunk/; revision=5805
</pre>
</div>
</content>
</entry>
<entry>
<title>Make the tests silent on success.</title>
<updated>2005-07-14T05:20:14+00:00</updated>
<author>
<name>Matthias Clasen</name>
<email>mclasen@redhat.com</email>
</author>
<published>2005-07-14T05:20:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=7221f500f53591f980fbb2368c7eaa7f9beb6f27'/>
<id>7221f500f53591f980fbb2368c7eaa7f9beb6f27</id>
<content type='text'>
2005-07-14  Matthias Clasen  &lt;mclasen@redhat.com&gt;

	* tests/spawn-test.c:
	* tests/uri-test.c:
	* tests/thread-test.c:
	* tests/queue-test.c:
	* tests/mainloop-test.c:
	* tests/iochannel-test.c:
	* tests/gio-test.c:
	* tests/child-test.c: Make the tests silent on success.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
2005-07-14  Matthias Clasen  &lt;mclasen@redhat.com&gt;

	* tests/spawn-test.c:
	* tests/uri-test.c:
	* tests/thread-test.c:
	* tests/queue-test.c:
	* tests/mainloop-test.c:
	* tests/iochannel-test.c:
	* tests/gio-test.c:
	* tests/child-test.c: Make the tests silent on success.
</pre>
</div>
</content>
</entry>
<entry>
<title>Print more detailled output from the timer tests. Don't print home</title>
<updated>2005-03-20T10:43:38+00:00</updated>
<author>
<name>Tor Lillqvist</name>
<email>tml@novell.com</email>
</author>
<published>2005-03-20T10:43:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=20378332aea3a273a27bd0d40451811b21a7a1f6'/>
<id>20378332aea3a273a27bd0d40451811b21a7a1f6</id>
<content type='text'>
2005-03-20  Tor Lillqvist  &lt;tml@novell.com&gt;

	* tests/testglib.c (main): Print more detailled output from the
	timer tests. Don't print home directory twice. Test
	g_win32_error_message().

	* tests/spawn-test.c (run_tests): On Win32, run netstat instead of
	ipconfig. On Windows XP collecting output from ipconfig doesn't
	seem to work for some reason.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
2005-03-20  Tor Lillqvist  &lt;tml@novell.com&gt;

	* tests/testglib.c (main): Print more detailled output from the
	timer tests. Don't print home directory twice. Test
	g_win32_error_message().

	* tests/spawn-test.c (run_tests): On Win32, run netstat instead of
	ipconfig. On Windows XP collecting output from ipconfig doesn't
	seem to work for some reason.
</pre>
</div>
</content>
</entry>
<entry>
<title>glib/gspawn-win32.c Implement G_SPAWN_FILE_AND_ARGV_ZERO. (#136792, Bruce</title>
<updated>2004-03-10T22:59:14+00:00</updated>
<author>
<name>Tor Lillqvist</name>
<email>tml@iki.fi</email>
</author>
<published>2004-03-10T22:59:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=f4cb22c78d573d53dba62b7f6743cbe0a1d1e135'/>
<id>f4cb22c78d573d53dba62b7f6743cbe0a1d1e135</id>
<content type='text'>
2004-03-10  Tor Lillqvist  &lt;tml@iki.fi&gt;

	* glib/gspawn-win32.c
	* glib/gspawn-win32-helper.c: Implement
	G_SPAWN_FILE_AND_ARGV_ZERO. (#136792, Bruce Hochstetler)

	* tests/spawn-test.c
	* tests/spawn-test-win32-gui.c: Test it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
2004-03-10  Tor Lillqvist  &lt;tml@iki.fi&gt;

	* glib/gspawn-win32.c
	* glib/gspawn-win32-helper.c: Implement
	G_SPAWN_FILE_AND_ARGV_ZERO. (#136792, Bruce Hochstetler)

	* tests/spawn-test.c
	* tests/spawn-test-win32-gui.c: Test it.
</pre>
</div>
</content>
</entry>
<entry>
<title>for msvc build</title>
<updated>2003-07-20T15:55:09+00:00</updated>
<author>
<name>Hans Breuer</name>
<email>hans@breuer.org</email>
</author>
<published>2003-07-20T15:55:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=2781d5f6b3cf40fcf63b041932e58cd9d228d99e'/>
<id>2781d5f6b3cf40fcf63b041932e58cd9d228d99e</id>
<content type='text'>
2003-07-20  Hans Breuer  &lt;hans@breuer.org&gt;

	* glib/trio/makefile.msc : (new file) for msvc build

	* glib/glib.def : removed some duplicated entries

	* glib/gscanner.c : add same workaround for MSVC(5.0)
	which does not allow to cast an uint64 to float.
	Same as in gvaluetransform.c
	Also move #include &lt;io.h&gt; behind inclusion of "glib.h"
	which defines the needed G_OS_WIN32

	* glib/makefile.msc.in : added gprintf.obj, trio\trio.lib
	as well as shell32.lib

	* tests/spawn-test.c : include &lt;io.h&gt; on win32
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
2003-07-20  Hans Breuer  &lt;hans@breuer.org&gt;

	* glib/trio/makefile.msc : (new file) for msvc build

	* glib/glib.def : removed some duplicated entries

	* glib/gscanner.c : add same workaround for MSVC(5.0)
	which does not allow to cast an uint64 to float.
	Same as in gvaluetransform.c
	Also move #include &lt;io.h&gt; behind inclusion of "glib.h"
	which defines the needed G_OS_WIN32

	* glib/makefile.msc.in : added gprintf.obj, trio\trio.lib
	as well as shell32.lib

	* tests/spawn-test.c : include &lt;io.h&gt; on win32
</pre>
</div>
</content>
</entry>
<entry>
<title>Ignore the G_SPAWN_DO_NOT_REAP_CHILD flag, can't be meaninfully</title>
<updated>2002-11-17T03:52:55+00:00</updated>
<author>
<name>Tor Lillqvist</name>
<email>tml@iki.fi</email>
</author>
<published>2002-11-17T03:52:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=1f04f2cce236311e79fef775890a5114123ced37'/>
<id>1f04f2cce236311e79fef775890a5114123ced37</id>
<content type='text'>
2002-11-17  Tor Lillqvist  &lt;tml@iki.fi&gt;

	* glib/gspawn-win32.c (g_spawn_async_with_pipes): Ignore the
	G_SPAWN_DO_NOT_REAP_CHILD flag, can't be meaninfully implemented
	on Windows, at least not now. Always pass dont_wait as TRUE to
	do_spawn_with_pipes(). The semantics of the dont_wait parameter is
	very different from the semantics of the intermediate_child
	parameter to fork_exec_with_pipes() in the Unix version. This
	fixes a serious bug, g_spawn_async() in fact behaved
	synchronously.

	(do_spawn_with_pipes, do_spawn): Rename from
	fork_exec_with_pipes() and do_exec(), those names were from the
	Unix bersion, and misleading.

	(close_and_invalidate): Don't try to close invalid fds.

	* glib/gspawn.c (g_spawn_async_with_pipes): Add warning about
	Windows behaviour. There is no fork(), so the child_setup()
	function is in fact called in the parent.

	* glib/gspawn-win32-helper.c (WinMain): Insert spaces in argv
	debugging output.

	* tests/spawn-test-win32-gui.c: New file. Test program to be
	linked as a GUI application. Behaves differently depending on how
	invoked (by spawn-test).

	* tests/spawn-test.c (run_tests): On Win32, run the
	spawn-test-win32-gui program, too, in several ways, synchronously
	and asynchronously.

	* tests/Makefile.am: Corresponding change.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
2002-11-17  Tor Lillqvist  &lt;tml@iki.fi&gt;

	* glib/gspawn-win32.c (g_spawn_async_with_pipes): Ignore the
	G_SPAWN_DO_NOT_REAP_CHILD flag, can't be meaninfully implemented
	on Windows, at least not now. Always pass dont_wait as TRUE to
	do_spawn_with_pipes(). The semantics of the dont_wait parameter is
	very different from the semantics of the intermediate_child
	parameter to fork_exec_with_pipes() in the Unix version. This
	fixes a serious bug, g_spawn_async() in fact behaved
	synchronously.

	(do_spawn_with_pipes, do_spawn): Rename from
	fork_exec_with_pipes() and do_exec(), those names were from the
	Unix bersion, and misleading.

	(close_and_invalidate): Don't try to close invalid fds.

	* glib/gspawn.c (g_spawn_async_with_pipes): Add warning about
	Windows behaviour. There is no fork(), so the child_setup()
	function is in fact called in the parent.

	* glib/gspawn-win32-helper.c (WinMain): Insert spaces in argv
	debugging output.

	* tests/spawn-test-win32-gui.c: New file. Test program to be
	linked as a GUI application. Behaves differently depending on how
	invoked (by spawn-test).

	* tests/spawn-test.c (run_tests): On Win32, run the
	spawn-test-win32-gui program, too, in several ways, synchronously
	and asynchronously.

	* tests/Makefile.am: Corresponding change.
</pre>
</div>
</content>
</entry>
</feed>
