tests: fix spurious error when run directly with Solaris /usr/xpg4/bin/sh