Skip to content
Snippets Groups Projects
  1. Jul 10, 2013
    • Nick Mathewson's avatar
      Completely refactor how FILENAME_PRIVATE works · a3e0a87d
      Nick Mathewson authored
      We previously used FILENAME_PRIVATE identifiers mostly for
      identifiers exposed only to the unit tests... but also for
      identifiers exposed to the benchmarker, and sometimes for
      identifiers exposed to a similar module, and occasionally for no
      really good reason at all.
      
      Now, we use FILENAME_PRIVATE identifiers for identifiers shared by
      Tor and the unit tests.  They should be defined static when we
      aren't building the unit test, and globally visible otherwise. (The
      STATIC macro will keep us honest here.)
      
      For identifiers used only by the unit tests and never by Tor at all,
      on the other hand, we wrap them in #ifdef TOR_UNIT_TESTS.
      
      This is not the motivating use case for the split test/non-test
      build system; it's just a test example to see how it works, and to
      take a chance to clean up the code a little.
      a3e0a87d
    • Nick Mathewson's avatar
      Start work on fancy compiler tricks to expose extra stuff to our tests · f7d654b8
      Nick Mathewson authored
      This is mainly a matter of automake trickery: we build each static
      library in two versions now: one with the TOR_UNIT_TESTS macro
      defined, and one without.  When TOR_UNIT_TESTS is defined, we can
      enable mocking and expose more functions. When it's not defined, we
      can lock the binary down more.
      
      The alternatives would be to have alternate build modes: a "testing
      configuration" for building the libraries with test support, and a
      "production configuration" for building them without.  I don't favor
      that approach, since I think it would mean more people runnning
      binaries build for testing, or more people not running unit tests.
      f7d654b8
  2. Jul 08, 2013
  3. Jul 03, 2013
    • Nick Mathewson's avatar
      FIx undefined behavior in dirvote.c · 15cd79f8
      Nick Mathewson authored
       Fix a bug in the voting algorithm that could yield incorrect results
       when a non-naming authority declared too many flags. Fixes bug 9200;
       bugfix on 0.2.0.3-alpha.
      
      Found by coverity scan.
      15cd79f8
  4. Jun 29, 2013
  5. Jun 24, 2013
  6. Jun 18, 2013
  7. Jun 17, 2013
  8. Jun 16, 2013
  9. Jun 15, 2013
  10. Jun 14, 2013
Loading