[tor-bugs] #19999 [Core Tor/Tor]: Maybe test-cases should complete without BUG warnings?

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Sep 8 22:30:20 UTC 2016


#19999: Maybe test-cases should complete without BUG warnings?
---------------------------------------+-----------------------------------
 Reporter:  nickm                      |          Owner:  nickm
     Type:  defect                     |         Status:  closed
 Priority:  High                       |      Milestone:  Tor:
                                       |  0.2.9.x-final
Component:  Core Tor/Tor               |        Version:
 Severity:  Normal                     |     Resolution:  fixed
 Keywords:  testing TorCoreTeam201609  |  Actual Points:  3
Parent ID:                             |         Points:  2
 Reviewer:                             |        Sponsor:
---------------------------------------+-----------------------------------

Comment (by rubiate):

 If util/time fails it doesn't call teardown_capture_of_logs()


 {{{
 diff --git a/src/test/test_util.c b/src/test/test_util.c
 index 5949eb9..224ec7b 100644
 --- a/src/test/test_util.c
 +++ b/src/test/test_util.c
 @@ -262,7 +262,6 @@ test_util_time(void *arg)
    time_t t_res;
    int i;
    struct timeval tv;
 -  int old_log_level = 0;

    /* Test tv_udiff and tv_mdiff */

 @@ -1112,8 +1111,7 @@ test_util_time(void *arg)
  #undef CHECK_TIMEGM_ARG_OUT_OF_RANGE

   done:
 -  if (old_log_level)
 -    teardown_capture_of_logs();
 +  teardown_capture_of_logs();
  }

  static void
 }}}


 Similarly for tortls:

 {{{
 diff --git a/src/test/test_tortls.c b/src/test/test_tortls.c
 index 790c331..8502e8a 100644
 --- a/src/test/test_tortls.c
 +++ b/src/test/test_tortls.c
 @@ -2278,7 +2278,6 @@ test_tortls_finish_handshake(void *ignored)

    X509 *c1 = read_cert_from(validCertString);
    SESS_CERT_local *sess = NULL;
 -  int log_level = 0;

    ctx = SSL_CTX_new(method);

 @@ -2298,7 +2297,6 @@ test_tortls_finish_handshake(void *ignored)
    expect_single_log_msg_containing("For some reason, wasV2Handshake
 didn't "
                                     "get set.");
    teardown_capture_of_logs();
 -  log_level = 0;

    tls->wasV2Handshake = 1;
    ret = tor_tls_finish_handshake(tls);
 @@ -2337,8 +2335,7 @@ test_tortls_finish_handshake(void *ignored)
    tor_free(tls);
    SSL_CTX_free(ctx);
    tor_free(method);
 -  if (log_level)
 -    teardown_capture_of_logs();
 +  teardown_capture_of_logs();
  }
  #endif
 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/19999#comment:7>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list