create_test_sourcelist: Fix linkage in generated test driver code

Mark private function/global with static linkage.
Merge topic 'create_test_sourcelist-clang-warnings' into next

ed675a9 create_test_sourcelist: Fix linkage in generated test driver code