Up to 0.16 it was sufficient to only specify the -testnet command line option causing bitcoind to write data to the ~/.bitcoind/testnet3 directory by default and not messing with the mainnet directory ~/.bitcoin. However, with 0.17 and -testnet seems to use the old mainnet directory ~/.bitcoin.
Not sure if this intended or a bug. Do you have to explicitely specify a different datadir for TESTNET now, if you want to run TESTNET and MAINNET on the same machine?
 0$ /usr/local/bin/bitcoind -conf=/etc/bitcoin/test_bitcoin.conf -testnet
 1Bitcoin Core version v0.17.0 (release build)
 2InitParameterInteraction: parameter interaction: -proxy set -> setting -discover=0
 3InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1
 4 
 5************************
 6EXCEPTION: N5boost10filesystem16filesystem_errorE       
 7boost::filesystem::create_directory: Permission denied: "/mnt/data/bitcoind/.bitcoin/blocks"       
 8bitcoin in AppInit()       
 9
10
11
12************************
13EXCEPTION: N5boost10filesystem16filesystem_errorE       
14boost::filesystem::create_directory: Permission denied: "/mnt/data/bitcoind/.bitcoin/blocks"       
15bitcoin in AppInit()       
16
17Shutdown: In progress...
18Shutdown: done
ARM-32 (Armbian)