Commit Graph

2 Commits

Author SHA1 Message Date
Daniel P. Berrangé
041857e677 tests: ensure compiler knows the argv[0] is non-NULL
../tests/redirect-test.c
/usr/i686-w64-mingw32/sys-root/mingw/include/winbase.h: In function 'WinMain':
../../tests/redirect-test.c:318:5: error: '%s' directive argument is null [-Werror=format-overflow=]
  318 |     fprintf(log_f, "argc %d argv[0] %s \n", argc, argv[0]);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../tests/redirect-test.c:318:5: error: '%s' directive argument is null [-Werror=format-overflow=]

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-22 16:14:40 +00:00
Frediano Ziglio
e732fa08c8 Add a program to test redirection on Windows
This program attempt multiple redirection combination:
- passing handles using either CreateProcess or SetStdHandle;
- having a console or not;
- redirection stdout/stderr yes or not.

Worth to mention that for running this test program the user will need
either a native MingW or Wine (with .exe executables enabled in Linux
binfmt).

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2016-05-04 11:16:05 +02:00