type TestSuite … // RegisterTests register the driver + pattern combination to the inside TestSuite // This function actually register tests inside testsuite func RegisterTests(suite TestSuite, driver TestDriver, pattern TestPattern) { … } // DefineTestSuites defines tests for all testpatterns and all testSuites for a driver func DefineTestSuites(driver TestDriver, tsInits []func() TestSuite) { … } type TestSuiteInfo … // SkipInvalidDriverPatternCombination will skip tests if the combination of driver, and testpattern // is not compatible to be tested. This function will be called in the RegisterTests() to make // sure all the testsuites we defined are valid. // // Whether it needs to be skipped is checked by following steps: // 0. Check with driver SkipUnsupportedTest // 1. Check if volType is supported by driver from its interface // 2. Check if fsType is supported // // Test suites can also skip tests inside their own skipUnsupportedTests function or in // individual tests. func SkipInvalidDriverPatternCombination(driver TestDriver, pattern TestPattern) { … }