Replace the tolerant "rc == 0 or rc == 1" assertion with a strict
"rc == 0" check for the diagnostics --check command. In a clean test
environment, diagnostics should complete without finding errors, and the
previous assertion could not distinguish a legitimate diagnostic failure
from a command crash.