diff --git a/tests/runtests.pl b/tests/runtests.pl
index f0ca9963c96ef9f3d8e586fd63ab5af2d5e56c47..ffab484cb15e966c73b95475f18db6a0d81ecd2a 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -338,7 +338,7 @@ sub runhttpserver {
     if ( $data =~ /WE ROOLZ: (\d+)/ ) {
         $pid = 0+$1;
     }
-    elsif($data) {
+    elsif($data || ($res != 7)) {
         print "RUN: Unknown HTTP server is running on port $HOSTPORT\n";
         return -2;
     }