diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index a14a2b14824c144d885b7401d80bde9c06a2e14f..55929c1666aad996a37962dfccfdceb6ac4d5108 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -971,7 +971,9 @@ circuit_send_next_onion_skin(origin_circuit_t *circ)
         // The circuit is usable; we already marked the guard as okay.
         r = GUARD_USABLE_NOW;
       } else if (! circ->guard_state) {
-        if (circuit_get_cpath_len(circ) != 1) {
+        if (circuit_get_cpath_len(circ) != 1 &&
+            circ->base_.purpose != CIRCUIT_PURPOSE_TESTING &&
+            get_options()->UseEntryGuards) {
           log_warn(LD_BUG, "%d-hop circuit %p with purpose %d has no "
                    "guard state",
                    circuit_get_cpath_len(circ), circ, circ->base_.purpose);