module_test: Fix some assignments to errno intended to be tests.
Reported by: vangyzen
Reviewed by: vangyzen, markj
Sponsored by: University of Cambridge, Google, Inc.
Differential Revision: https://reviews.freebsd.org/D34528
(cherry picked from commit 18207579a26bca553ec285f97a98fbe45316223b)