mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 13:43:47 +01:00
06eafb3fcc
Currently the unit tests test_util_spawn_background_* assume that they are run from the Tor build directory. This is not the case when running make distcheck, so the test will fail. This problem is fixed by autoconf setting BUILDDIR to be the root of the Tor build directory, and this preprocessor variable being used to specify the absolute path to test-child. Also, in test-child, do not print out argv[0] because this will no longer be predictable. Found by Sebastian Hahn.
19 lines
355 B
C
19 lines
355 B
C
#include <stdio.h>
|
|
|
|
/** Trivial test program which prints out its command line arguments so we can
|
|
* check if tor_spawn_background() works */
|
|
int
|
|
main(int argc, char **argv)
|
|
{
|
|
int i;
|
|
|
|
fprintf(stdout, "OUT\n");
|
|
fprintf(stderr, "ERR\n");
|
|
for (i = 1; i < argc; i++)
|
|
fprintf(stdout, "%s\n", argv[i]);
|
|
fprintf(stdout, "DONE\n");
|
|
|
|
return 0;
|
|
}
|
|
|