]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Test: fix shared random test checking bad errno
authorDavid Goulet <dgoulet@torproject.org>
Tue, 5 Jul 2016 17:54:37 +0000 (13:54 -0400)
committerDavid Goulet <dgoulet@torproject.org>
Tue, 5 Jul 2016 18:00:06 +0000 (14:00 -0400)
The test was checking for EISDIR which is a Linux-ism making other OSes
unhappy. Instead of checking for a negative specific errno value, just make
sure it's negative indicating an error. We don't need more for this test.

Signed-off-by: David Goulet <dgoulet@torproject.org>
src/test/test_shared_random.c

index 4f05e75783b62f2c48f24eede5cbe33cb7d80d66..d6787e4f4589801359e5c88e45f5de5fb61e4aab 100644 (file)
@@ -638,11 +638,7 @@ test_state_load_from_disk(void *arg)
 
   /* Try to load the directory itself. Should fail. */
   ret = disk_state_load_from_disk_impl(dir);
-#ifdef _WIN32
-  tt_int_op(ret, OP_EQ, -EACCES);
-#else
-  tt_int_op(ret, OP_EQ, -EISDIR);
-#endif
+  tt_int_op(ret, OP_LT, 0);
 
   /* State should be non-existent at this point. */
   the_sr_state = get_sr_state();