# How does R's auto.arima() function determine the order of differencing when estimating a regression with seasonal ARIMA errors?

The authors' paper about the method (Hyndman and Khandakar 2008) states that an extended an extended Canova-Hansen test is used, although the helpfile updates this to say than an OCSB test is used.

I have two questions, therefore:

1. What is an OCSB test?
2. Is the method of determining seasonal differencing the same for regression with ARIMA errors as it is for ARIMA modelling with no covariates?

2. When regressors are used, auto.arima() fits the linear model using lm() and applies the unit root tests to the residuals.