Merge changes I219c287b,I6adee670

* changes:
  Call encoder control before running ethread test.
  Don't copy thread data for the main thread.