This was a bug on #23347 (moved), but now we're replacing uses of any_bridge_descriptors_known() iwith num_bridges_usable() > 0, we need to make this change there instead.
I spoke too soon -- the unit tests break when I merge this branch:
FAIL src/test/test_entrynodes.c:618: assert(gs_br OP_EQ NULL): 0x5585741f34b0 vs (nil)entrynodes/parse_from_state_full: [parse_from_state_full FAILED]entrynodes/get_guard_selection_by_name: FAIL src/test/test_entrynodes.c:802: assert(gs3 == get_guard_selection_info()) [get_guard_selection_by_name FAILED] FAIL src/test/test_entrynodes.c:2258: assert(r OP_EQ 0): -1 vs 0entrynodes/drop_guards: [drop_guards FAILED]entrynodes/outdated_dirserver_exclusion: FAIL src/test/test_entrynodes.c:2777: expected log to contain "No primary or confirmed guards available." Captured logs: 1. info: "Not setting md restriction: only 0 usable guards.\n" 2. info: "Trying to sample a reachable guard: We know of 0 in the USABLE_FILTERED set.\n" 3. info: " (That isn\'t enough. Trying to expand the sample.)\n" 4. info: "Expanding the sample guard set. We have 0 guards in the sample, and 0 eligible guards to extend it with.\n" 5. info: "Not expanding the guard sample any further; just ran out of eligible guards\n" 6. info: " (After filters [b], we have 0 guards to consider.)\n" 7. info: "Trying to sample a reachable guard: We know of 0 in the USABLE_FILTERED set.\n" 8. info: " (That isn\'t enough. Trying to expand the sample.)\n" 9. info: "Expanding the sample guard set. We have 0 guards in the sample, and 0 eligible guards to extend it with.\n" 10. info: "Not expanding the guard sample any further; just ran out of eligible guards\n" 11. info: " (After filters [7], we have 0 guards to consider.)\n" 12. info: "Absolutely no sampled guards were available. Marking all guards for retry and starting from top again.\n" 13. info: "No router found for microdescriptor fetch; falling back to dirserver list.\n" 14. notice: "While fetching directory info, no running dirservers known. Will try again later. (purpose 19)\n" [outdated_dirserver_exclusion FAILED]4/1031 TESTS FAILED. (31 skipped)
Trac: Milestone: Tor: 0.3.1.x-final to Tor: 0.3.2.x-final Status: merge_ready to needs_revision
Yes, #24392 (moved) is assigned to you (nickm) to fix the unit tests, because I don't understand the guard code well enough.
I split it off from #24367 (moved) because that ticket deals with a lot of different issues.
Okay, I found the problem: the entrynode tests were depending on some global-state that some of the earlier tests were munging. I haven't tracked down what global state exactly, though -- only enough to fix this.