Tim, as a follow-on to your above patch, it would be useful if prepare-commit-msg could add a "real" Test-Parameters: lines (not just examples) based on the output of "git diff $DIFFOPT --stat".
For example, if the patch is only modifying files like "lustre/tests/conf-sanity.sh" then the commit message could add:
Similarly, though a bit more complex, would be if patches add lines in test scripts with version_code then it makes sense to automatically add lines that run interop testing:
This is a bit tricky if it is kernel or distro versions being checked, but it couldn't hurt to highlight this at least (maybe also checkpatch.pl, so that it is posted in Gerrit as a reminder for reviewers).
Also, commit-msg could potentially sanity-check any existing Test-Parameters: lines to confirm that either no trivial keyword is added, or that every test script in lustre/tests/*.sh is explicitly listed with testlist= (excluding "sanity.sh because that is always run regardless of any Test-Parameters: specified). However, I'd prefer the "carrot" approach that automatically adds the Test-Parameters: lines rather than complaining afterward.
To a limited extent, we now have this with the "review-subtest-change" sessions, that automatically run extra iterations of new/modified test sessions in the test scripts.
As yet, there is no mapping from code changes to test scripts, so patches without extra test scripts will not trigger additional testing.