Testing linear and log-linear regressions with autocorrelated errors