[tor-commits] [tor/master] Some test and logic corrections