Backport changes from head to shorten the filenames of the test cases.