summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-01-10 20:47:24 +0000
committerNick Mathewson <nickm@torproject.org>2006-01-10 20:47:24 +0000
commit4a7ee9bd3d61932fd360c84ca435994700adc8b2 (patch)
tree4dcc4956b65cd33a51d74453d421f99c30a131d6
parentb2d79f278b27113d39077c6ab45c1efe86959eb8 (diff)
downloadtor-4a7ee9bd3d61932fd360c84ca435994700adc8b2.tar.gz
tor-4a7ee9bd3d61932fd360c84ca435994700adc8b2.zip
Make unittests pass again.
svn:r5773
-rw-r--r--src/or/test.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/or/test.c b/src/or/test.c
index a2979c1e94..866d97aa3d 100644
--- a/src/or/test.c
+++ b/src/or/test.c
@@ -1138,7 +1138,6 @@ test_dir_format(void)
char buf[8192], buf2[8192];
char platform[256];
char fingerprint[FINGERPRINT_LEN+1];
- char d[DIGEST_LEN];
char *pk1_str = NULL, *pk2_str = NULL, *pk3_str = NULL, *cp;
size_t pk1_str_len, pk2_str_len, pk3_str_len;
routerinfo_t r1, r2;
@@ -1148,7 +1147,6 @@ test_dir_format(void)
routerlist_t *dir1 = NULL, *dir2 = NULL;
tor_version_t ver1;
char *bw_lines = NULL;
- const char *m;
test_assert( (pk1 = crypto_new_pk_env()) );
test_assert( (pk2 = crypto_new_pk_env()) );
@@ -1309,6 +1307,11 @@ test_dir_format(void)
crypto_pk_get_fingerprint(pk1, buf, 1);
add_fingerprint_to_dir("Fred", buf, fingerprint_list);
}
+#if 0
+ {
+ char d[DIGEST_LEN];
+ const char *m;
+ /* XXXX NM re-enable. 011 */
/* Make sure routers aren't too far in the past any more. */
r1.cache_info.published_on = time(NULL);
r2.cache_info.published_on = time(NULL)-3*60*60;
@@ -1319,15 +1322,13 @@ test_dir_format(void)
get_options()->Nickname = tor_strdup("DirServer");
test_assert(!dirserv_dump_directory_to_string(&cp,pk3));
crypto_pk_get_digest(pk3, d);
-#if 0
- /* XXXX NM re-enable. 011 */
test_assert(!router_parse_directory(cp));
test_eq(2, smartlist_len(dir1->routers));
+ tor_free(cp);
+ }
#endif
dirserv_free_fingerprint_list();
- tor_free(cp);
-
tor_free(pk1_str);
tor_free(pk2_str);
if (pk1) crypto_free_pk_env(pk1);