1. 26 Dec, 2018 1 commit
    • Vasily Galkin's avatar
      gspawn, tests: extend spawn_test, run it on win32 · 50cb4f22
      Vasily Galkin authored
      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)
  2. 03 Aug, 2017 1 commit
    • Philip Withnall's avatar
      Consistently save errno immediately after the operation setting it · 5cddde1f
      Philip Withnall authored
      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
        int errsv, ret;
        ret = some_call_which_might_set_errno ();
        errsv = errno;
        if (ret < 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 () && 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.
  3. 29 May, 2017 1 commit
  4. 31 Jan, 2014 1 commit
  5. 07 Nov, 2007 1 commit
    • Tor Lillqvist's avatar
      Not needed, just use -DPCRE_STATIC. · 7d2ec70a
      Tor Lillqvist authored
      2007-11-07  Tor Lillqvist  <tml@novell.com>
      	* 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
  6. 14 Jul, 2005 1 commit
    • Matthias Clasen's avatar
      Make the tests silent on success. · 7221f500
      Matthias Clasen authored
      2005-07-14  Matthias Clasen  <mclasen@redhat.com>
      	* 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.
  7. 20 Mar, 2005 1 commit
    • Tor Lillqvist's avatar
      Print more detailled output from the timer tests. Don't print home · 20378332
      Tor Lillqvist authored
      2005-03-20  Tor Lillqvist  <tml@novell.com>
      	* tests/testglib.c (main): Print more detailled output from the
      	timer tests. Don't print home directory twice. Test
      	* 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.
  8. 10 Mar, 2004 1 commit
  9. 20 Jul, 2003 1 commit
    • Hans Breuer's avatar
      for msvc build · 2781d5f6
      Hans Breuer authored
      2003-07-20  Hans Breuer  <hans@breuer.org>
      	* 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 <io.h> 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 <io.h> on win32
  10. 17 Nov, 2002 1 commit
    • Tor Lillqvist's avatar
      Ignore the G_SPAWN_DO_NOT_REAP_CHILD flag, can't be meaninfully · 1f04f2cc
      Tor Lillqvist authored
      2002-11-17  Tor Lillqvist  <tml@iki.fi>
      	* 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
      	(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.
  11. 30 Aug, 2001 1 commit
    • Tor Lillqvist's avatar
      After being away for about five months, I'm back working on this... For · 74b4d8c2
      Tor Lillqvist authored
      2001-08-30  Tor Lillqvist  <tml@iki.fi>
      	After being away for about five months, I'm back working on
      	this...  For now, still using same build setup for Win32. Probably
      	will change to not including version numbers in the import library
      	names, though. (But the DLL names would still include them,
      	possibly even also the micro version number.) That would be more
      	Unix-like. Also, will have to check out newest mingw tool versions
      	to see if the build-dll script now can be retired.
      	* makefile.mingw
      	* makefile.msc: New files, no need to generate from .in as
      	they don't contain references to automake variables.
      	* makefile.mingw.in
      	* makefile.msc.in: Removed.
      	* glib.rc.in: Remove
      	* glib/glib.rc.in: Moved here.
      	* Makefile.am
      	* glib/Makefile.am: Corresponding changes.
      	* glib/glib.def: Fix typo, add new entries.
      	* glib/gspawn-win32-helper.c: More debugging. Doesn't work
      	currently (or then it never has on Win2k, which I now use?)
      	* glib/gstrfuncs.c
      	* glib/gstrfuncs.h: Mark g_ascii_table for export/import on Win32.
      	* */makefile.mingw.in: Reflect new location of glib library.
  12. 19 Jul, 2001 1 commit
    • Darin Adler's avatar
      Add missing const. (g_strsplit): Add g_return_val_if_fail for case of · 3fa620d4
      Darin Adler authored
      	* glib/gstrfuncs.c: (g_ascii_strdown), (g_ascii_strup): Add
      	missing const.
      	(g_strsplit): Add g_return_val_if_fail for case of empty
      	delimiter, which can result in an infinite loop otherwise.
      	* glib/gstrfuncs.h: Add missing const.
      	* tests/.cvsignore: Ignore a generated file.
      	* tests/array-test.c:
      	* tests/dirname-test.c:
      	* tests/hash-test.c:
      	* tests/list-test.c:
      	* tests/node-test.c:
      	* tests/relation-test.c:
      	* tests/shell-test.c:
      	* tests/slist-test.c:
      	* tests/spawn-test.c:
      	* tests/strfunc-test.c:
      	* tests/string-test.c:
      	* tests/testglib.c:
      	* tests/tree-test.c:
      	* tests/type-test.c:
      	Add an #undef G_DISABLE_ASSERT so all tests will assert even if
      	asserts are disabled inside glib itself.
  13. 16 Oct, 2000 1 commit
    • Tor Lillqvist's avatar
      Some more debugging output. (g_io_channel_win32_poll): Remove unused vars. · fb4de1c5
      Tor Lillqvist authored
      2000-10-16  Tor Lillqvist  <tml@iki.fi>
      	* giowin32.c (reader_thread): Some more debugging output.
      	(g_io_channel_win32_poll): Remove unused vars.
      	* gfileutils.c: Changes for Win32, with no unistd.h and no
      	* gspawn-win32.c: Implementation of the g_spwan_* functions for
      	Win32. Due to the general non-Unixness of Win32, much of the
      	functionality that is relatively clean to implement on Unix, is
      	hard to do on Win32. We must use a separate helper program to
      	change directory, close extra file descriptors, redirect the std
      	ones, as needed, and only then start the child process. No child
      	process pid can be returned, unfortunately. Or if we used
      	CreateProcess directly, it probably could. (Now we use the spawnv*
      	functions from msvcrt.)
      	* glib.def: Add new entry points.
      	* glib.def
      	* giowin32.c: Remove g_io_channel_win32_wait_for_condition(),
      	g_io_channel_win32_poll() subsumes it.
      	* gbacktrace.h: G_BREAKPOINT for MSVC (on the ix86).
      	* gwin32.c (g_win32_getlocale): Use "sp" for
      	* makefile.{mingw,msc}.in (glib_OBJECTS): Add new files.
      	Add gspawn-win32-helper.exe rule.
      	* tests/makefile.{mingw,msc}.in (TESTS): Add shell-test and
      	* tests/spawn-test.c: (run_tests): On Win32, don't try to run
      	/bin/sh, but ipconfig (no special significance in choosing that,
      	just a program that outputs something to stdout).
  14. 09 Oct, 2000 1 commit
    • Havoc Pennington's avatar
      Add new files. · 8e3a3eef
      Havoc Pennington authored
      2000-10-09  Havoc Pennington  <hp@redhat.com>
              * Makefile.am, tests/Makefile.am: Add new files.
      	* tests/spawn-test.c, tests/shell-test.c: new tests for
      	the shell/spawn stuff
      	* gutils.c (g_find_program_in_path): convert a relative
      	program name into an absolute pathname to an existing
      	* gspawn.h, gspawn.c: New fork/exec API
      	* gshell.h, gshell.c: Shell-related utilities, at the moment
      	simply routines to parse argv and quote/unquote strings
      	* guniprop.c (g_unichar_isspace): Return TRUE for the
      	ASCII space characters isspace() returns TRUE for.
      	* gfileutils.c (g_file_get_contents): Convenience function
      	to slurp entire file into a string and return it. Partially
      	written by Joel Becker.
      	(g_file_test): file test function