The ntor, backtrace and zero lengths keys tests are not integrated into the automake test suite. This means these tests not being include in the test results (with PASS/FAIL/etc), clutter up the terminal with their own output, and are potentially not being run parallel.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
For documentation purposes, @abs_top_srcdir@ is used deliberately in test_ntor.sh.in and test_bt.sh.in because autoconf ignores the non-recursive nature of Tor. Variable substitutions of relative paths are computed from the directory the substituted files are located in, but tests are executed from the build directory root.
For example, with test_ntor.sh the top_srcdir variable would result in ../../src/test. When executed from the build directory root it is obvious that this relative path won't find the files it is looking for. Therefore we use absolute paths.
I wonder if there's some way to do this without moving all our scripts into getting pre-processed by autoconf.
I have not found a way to pipe output from one command to another without using wrapper scripts as in the ntor and backtrace tests. With regards to the zero length test, i agree it is ugly to have the entire script be processed by autoconf.
A solution would be to give the path to the Tor binary as a parameter so it does not need to be hard coded into the script. As for the shell substitution (@SHELL@), it can be removed if the script does not need to call itself anymore. This be achieved by changing some logic within the script. These solutions would still require a wrapper script (similar to the ntor and backtrace tests) that calls the zero length script with the appropriate Tor binary but at least the zero length script itself would not require any pre-processing.
As final remarks, i think we will always need some pre-processing in the tests if we want to support out-of-tree builds properly. The best solution i can currently come up with is to concentrate the pre-processing to the wrapper scripts.
A fixup patch did not apply cleanly so i created a separate branch (hence the new patches). I took this opportunity to rebase the patches on the current master (0693955) and clean them up (there were some unintentional file mode changes). The old patches 0001, 0002 and 0003 are now deprecated, but patch 0004 can be reused as it only adds the changes file.
The new approach for the zero lengths keys test is described in its commit message.
Sorry for the incomplete patch. I tend to focus on portability but not so much on backwards compatibility. Great fix, i couldn't find the problem myself. However, i have two remarks on your fixes. Do with it what you want, it's nothing major.
commit ecf98313 doesn't do anything but make unprocessed files executable. AFAIK it didn't contribute in fixing the problem and smells like bad practice. Therefore, IMO the commit should be reverted.
all of the files generated in the build directory have permissions 600 (or 700 for executable files). For consistency the wrapper scripts should also be 700 (or maybe use chmod u+x).