]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Windows open() returns eacces when eisdir would be sane
authorNick Mathewson <nickm@torproject.org>
Fri, 1 Jul 2016 20:23:06 +0000 (16:23 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 1 Jul 2016 20:23:06 +0000 (16:23 -0400)
src/test/test_shared_random.c

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