diff --git a/t/Makefile b/t/Makefile
index f9de24b4d2b..cf5f9e2e1eb 100644
--- a/t/Makefile
+++ b/t/Makefile
@@ -36,7 +36,7 @@ aggregate-results-and-cleanup: $(T)
 	$(MAKE) clean
 
 aggregate-results:
-	for f in test-results/t*-*; do \
+	for f in test-results/t*-*.counts; do \
 		echo "$$f"; \
 	done | '$(SHELL_PATH_SQ)' ./aggregate-results.sh
 
diff --git a/t/test-lib.sh b/t/test-lib.sh
index db8371cb170..e5523dd690a 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -636,7 +636,7 @@ test_done () {
 	GIT_EXIT_OK=t
 	test_results_dir="$TEST_DIRECTORY/test-results"
 	mkdir -p "$test_results_dir"
-	test_results_path="$test_results_dir/${0%.sh}-$$"
+	test_results_path="$test_results_dir/${0%.sh}-$$.counts"
 
 	echo "total $test_count" >> $test_results_path
 	echo "success $test_success" >> $test_results_path