Age | Commit message (Collapse) | Author | |
---|---|---|---|
2011-09-01 | Handle test case where fgets() sees EOF on the last read | Steven Murdoch | |
On some platforms, with non-blocking IO, on EOF you first get EAGAIN, and then on the second read you get zero bytes and EOF is set. However on others, the EOF flag is set as soon as the last byte is read. This patch fixes the test case in the latter scenario. | |||
2011-09-01 | Fix double-closing a stdio stream | Steven Murdoch | |
After a stream reached eof, we fclose it, but then test_util_spawn_background_partial_read() reads from it again, which causes an error and thus another fclose(). Some platforms are fine with this, others (e.g. debian-sid-i386) trigger a double-free() error. The actual code used by Tor (log_from_pipe() and tor_check_port_forwarding()) handle this case correctly. | |||
2011-08-31 | Tweaks on last process-launch patches | Nick Mathewson | |
2011-09-01 | Make a version of tor_read_all_handle() for non-Windows platforms | Steven Murdoch | |
Mainly used for testing reading from subprocesses. To be more generic we now pass in a pointer to a process_handle_t rather than a Windows- specific HANDLE. | |||
2011-08-31 | Fix off-by-one error when allocating memory in test_util_split_lines() | Steven Murdoch | |
Triggered "failed OVER picket-fence magic-number check (err 27)" when memory debugging using dmalloc is enabled (at 'low' or higher). | |||
2011-08-30 | Rename tor_join_cmdline to tor_join_win_cmdline; tweak doxygen | Nick Mathewson | |
2011-08-30 | Factor out and re-write code for splitting lines from a handle | Steven Murdoch | |
Now handles non-printable characters and will not output a spurious new-line if given a partial line. | |||
2011-08-29 | Refactor out command line formatting | Steven Murdoch | |
Now correctly handles whitespace, quotes and backslashes. Passes all unit tests. | |||
2011-08-29 | Replace two magic tristates with #define'd names | Steven Murdoch | |
- process_handle_t.status - return value of tor_get_exit_code() | |||
2011-08-28 | Make signature of tor_spawn_background more conventional | Steven Murdoch | |
Conventionally in Tor, structs are returned as pointers, so change tor_spawn_background() to return the process handle in a pointer rather than as return value. | |||
2011-08-24 | Appease "make check-spaces" | Steven Murdoch | |
2011-08-24 | We don't need to find our own path, just tell Windows to search | Steven Murdoch | |
2011-08-24 | Find test-child.exe by looking in same directory as test.exe | Steven Murdoch | |
2011-08-22 | Fix test cases to handle MSYS style paths (/c/foo rather than c:/foo) | Steven Murdoch | |
Also fix test case to expect 1 on successfully spawning a subprocess | |||
2011-08-22 | Tidy up subprocess code | Steven Murdoch | |
- Better error handling - Write description of functions - Don't assume non-negative process return values | |||
2011-08-22 | Fix some compiler warnings | Steven Murdoch | |
2011-08-18 | Complete logging of output from port forwarding helper | Steven Murdoch | |
2011-07-25 | Test case for reading the partial output of a background process | Steven Murdoch | |
2011-07-22 | Use PeekNamedPipe to avoid blocking ReadFile when there is nothing to read | Steven Murdoch | |
2011-07-22 | Add code to read all from a handle, but this block forever | Steven Murdoch | |
See http://stackoverflow.com/questions/3722409/windows-child-process-with-redirected-input-and-output for a potential solution | |||
2011-07-21 | Add Windows version of tor_spawn_background and ancillary functions | Steven Murdoch | |
2011-07-21 | Generalize process spawning so its test compiles (but fails) in Windows | Steven Murdoch | |
- pid, stdout/stderr_pipe now encapsulated in process_handle - read_all replaced by tor_read_all_from_process_stdin/stderr - waitpid replaced by tor_get_exit_code Untested on *nix | |||
2011-06-08 | Prefer tt_assert in unit tests, not tor_assert | Nick Mathewson | |
2011-06-08 | Fix a minor coverity-found bug in tests | Sebastian Hahn | |
2011-05-15 | Merge remote-tracking branch 'origin/maint-0.2.2' | Nick Mathewson | |
2011-05-15 | Add a function to pull off the final component of a path | Nick Mathewson | |
2011-05-15 | Fixup whitespace issues from 3122 commit in 0.2.3 | Nick Mathewson | |
2011-05-11 | Merge remote-tracking branch 'public/bug3122_memcmp_022' into bug3122_memcmp_023 | Nick Mathewson | |
Conflicts in various places, mainly node-related. Resolved them in favor of HEAD, with copying of tor_mem* operations from bug3122_memcmp_022. src/common/Makefile.am src/or/circuitlist.c src/or/connection_edge.c src/or/directory.c src/or/microdesc.c src/or/networkstatus.c src/or/router.c src/or/routerlist.c src/test/test_util.c | |||
2011-05-11 | fwd-port test_util_di_ops into tinytest format | Nick Mathewson | |
2011-05-04 | Use read_all() to read messages from spawn_background | Nick Mathewson | |
Using read() is an invitation to get some of the data you want, not all. Possible fix for bug 2462 | |||
2011-01-03 | Merge remote branch 'origin/maint-0.2.2' | Nick Mathewson | |
2011-01-03 | Merge remote branch 'sebastian/bug2314' into maint-0.2.2 | Nick Mathewson | |
2011-01-03 | Merge remote branch 'origin/maint-0.2.2' | Nick Mathewson | |
2011-01-03 | Bump copyright statements to 2011 (0.2.2) | Nick Mathewson | |
2010-12-27 | Fix compile wanrings revealed by gcc 4.5 on mingw | Sebastian Hahn | |
2010-10-11 | Fix running unit tests from outside of the build directory (fixes bug #2051) | Steven Murdoch | |
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. | |||
2010-10-11 | Merge remote branch 'sjmurdoch/bug1903' | Nick Mathewson | |
2010-10-11 | Skip running fgets_eagain test until we fix it | Steven Murdoch | |
2010-10-11 | Make tor_sscanf handle %x | Nick Mathewson | |
2010-10-10 | Add a unit test for tor_spawn_background | Steven Murdoch | |
- Test sucessfully starting a process - Test failing to find the executable | |||
2010-10-10 | Add a unit test for fgets (currently fails) | Steven Murdoch | |
- For a non-blocking pipe, check that on EAGAIN fgets returns NULL rather than a partial line | |||
2010-10-04 | Fix issues in nickm's review of format_helper_exit_status for bug #1903 | Steven Murdoch | |
- Responsibility of clearing hex_errno is no longer with caller - More conservative bounds checking - Length requirement of hex_errno documented - Output format documented | |||
2010-09-30 | Start tor-fw-helper in the background, and log whatever it outputs | Steven Murdoch | |
2010-09-27 | Merge remote branch 'public/bug1954' into maint-0.2.2 | Nick Mathewson | |
2010-09-23 | Add new torrc line continuation unit tests | Sebastian Hahn | |
We want to make sure that we don't break old torrc files that might have used something like this made-up example: ContactInfo UberUser <uber@user.com> # /// Fake email! \\\ Log info file /home/nick.mathewson/projects/tor-info.log And we also want to support the following style of writing your torrc: ExcludeNodes \ # Node1337 is run by the Bavarian Illuminati Node1337, \ # The operator of Node99 looked at me funny Node99 The code already handles both cases, but the unit test should help prove it. | |||
2010-09-21 | New function to load windows system libraries | Nick Mathewson | |
This function uses GetSystemDirectory() to make sure we load the version of the library from c:\windows\system32 (or local equivalent) rather than whatever version lives in the cwd. | |||
2010-09-11 | Allow comments for multi-line torrc options | Sebastian Hahn | |
2010-09-10 | Support mutli-line torrc options via the usual backslash syntax | Nick Mathewson | |
2010-08-20 | Add unit test for tor_listdir. | Nick Mathewson | |
2010-07-27 | Create control.h | Sebastian Hahn | |