]> git.feebdaed.xyz Git - 0xmirror/curl.git/commitdiff
test96: fix to accept non-unity memdump content with MSVC
authorViktor Szakats <commit@vsz.me>
Sun, 21 Dec 2025 10:28:42 +0000 (11:28 +0100)
committerViktor Szakats <commit@vsz.me>
Sun, 21 Dec 2025 11:11:56 +0000 (12:11 +0100)
In unity builds the source filename (via `__FILE__`) has no path (or
uses slashes?), while in non-unity ones it does contain backslashes
on Windows, with MSVC. Fix the test to recognize backslashes in the
`stripfile` regexp.

Seen in MSVC jobs in CI:
```diff
-MEM tool_cfgable.c[LF]
-MEM tool_paramhlp.c[LF]
-MEM tool_cfgable.c[LF]
-MEM tool_cfgable.c[LF]
-MEM tool_cfgable.c[LF]
-MEM tool_cfgable.c[LF]
+MEM D:\a\curl\curl\src\tool_cfgable.c[LF]
+MEM D:\a\curl\curl\src\tool_paramhlp.c[LF]
+MEM D:\a\curl\curl\src\tool_cfgable.c[LF]
+MEM D:\a\curl\curl\src\tool_cfgable.c[LF]
+MEM D:\a\curl\curl\src\tool_cfgable.c[LF]
+MEM D:\a\curl\curl\src\tool_cfgable.c[LF]
```
Ref: https://github.com/curl/curl/actions/runs/20408366058/job/58641468316?pr=20061#step:13:303
Ref: https://github.com/curl/curl/actions/runs/20408522070/job/58641826216?pr=20064#step:13:298

Closes #20064

tests/data/test96

index 1eaa7f9651eef9439b5582ef76782780015c36c2..eb82903b30713c02c6d8a43e104b53e1bfd19766 100644 (file)
@@ -37,7 +37,7 @@ MEM tool_cfgable.c
 <stripfile>
 $_ = '' if((($_ !~ /tool_paramhlp/) and ($_ !~ /tool_cfgable/)) || ($_ =~ /free\(\(nil\)\)/))
 s/:\d+.*//
-s:^(MEM )(.*/)(.*):$1$3:
+s:^(MEM )(.*[/\\])(.*):$1$3:
 </stripfile>
 </verify>