pkg: networkfs: etchosts: fixed tests

This patch fixes the fact that the tests for pkg/networkfs/etchosts
couldn't build due to syntax errors.

Docker-DCO-1.1-Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (github: cyphar)
Merge pull request #5626 from cyphar/networkfs-etchosts-tests

Fixed broken tests for pkg/networkfs/etchosts