tests: factor 350 fail=0 initializations into test-lib.sh