test, sunos: code cleanup

Inverted #if condition & branches.

Squash this commit with previous one.