Re: [PATCH] ld: Skip p33265-2 and pr33265-2 tests on Windows

Jan Dubiec <[email protected]> Sun, 26 Jul 2026 12:42:14 +0200
Newsgroups gmane.comp.gnu.binutils
Message-ID <[email protected]>
On 26.07.2026 08:25, Maciej W. Rozycki wrote:
> On Fri, 24 Jul 2026, Jan Dubiec wrote:
> 
>>> Can't the [ishost ...] you present use in the .exp file equally be used
>>> in the .d files:
>>>
>>> #xfail: [ishost *-mingw*]
>>
>> Unfortunately, it doesn't work. It probably requires some changes to
>> run_dump_test.
> 
>   You need to quote the separator, e.g.:
> 
> #xfail: [ishost\ *-mingw*]
> #xfail: {[ishost *-mingw*]}
Thanks! Both variants work as expected. However, I don't understand why 
— or, more specifically, why leaving the space unescaped doesn't work.

In the case of text enclosed in square brackets, the match_target 
procedure in testsuite/lib/binutils-common.exp should evaluate the 
entire text/expression and return its result (IMO):

proc match_target { target } {
    if [regexp {^!?\[.*\]$} $target] {
	return $target
    } else {
	return [istarget $target]
    }
}

Disclaimer: I don't know Tcl.

/J.D.