Skip to content

Commit e229ffd

Browse files
committed
fix(ci): anchor LEAKED TEST SUMMARY grep to line start
The check `! grep -e 'LEAKED TEST SUMMARY'` was too broad: it matched the phrase as a substring anywhere in valgrind-run-tests.out, including inside the PHPINFO section where run-tests.php writes phpinfo() output. Before this fix, the check was masked on PHP 7.0/7.1 because `bailout_double_hook_clear.phpt` leaked under valgrind, causing run-tests.php to exit 1, which short-circuited the && and skipped grep. After adding the SKIPIF to that test, run-tests.php exits 0 and grep runs, finding 6 embedded occurrences that were always there. The actual section header written by run-tests.php is: LEAKED TEST SUMMARY at line start with no leading spaces. The false-positive lines look like: " valgrind LEAKED TEST SUMMARY. The test still runs in the normal" with leading spaces — clearly not the section header. Anchoring with ^ matches only the real header.
1 parent 7601bcc commit e229ffd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ test_extension_ci: $(SO_FILE) $(TEST_FILES) $(TEST_STUB_FILES) $(BUILD_DIR)/run-
211211
\
212212
export TEST_PHP_JUNIT=$(JUNIT_RESULTS_DIR)/valgrind-extension-test.xml; \
213213
export TEST_PHP_OUTPUT=$(JUNIT_RESULTS_DIR)/valgrind-run-tests.out; \
214-
$(ALL_TEST_ENV_OVERRIDE) $(RUN_TESTS_CMD) -d extension=$(SO_FILE) -m -s $$TEST_PHP_OUTPUT $(BUILD_DIR)/$(TESTS) && ! grep -e 'LEAKED TEST SUMMARY' $$TEST_PHP_OUTPUT; \
214+
$(ALL_TEST_ENV_OVERRIDE) $(RUN_TESTS_CMD) -d extension=$(SO_FILE) -m -s $$TEST_PHP_OUTPUT $(BUILD_DIR)/$(TESTS) && ! grep -e '^LEAKED TEST SUMMARY' $$TEST_PHP_OUTPUT; \
215215
)
216216

217217
build_tea: TEA_BUILD_TESTS=ON

0 commit comments

Comments
 (0)