public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 1/4] gas/testsuite: adjust a test for case insensitive file systems
@ 2023-02-20  8:22 Clément Chigot
  2023-02-20  8:22 ` [PATCH 2/4] ld/testsuite: don't output to /dev/null on mingw hosts Clément Chigot
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Clément Chigot @ 2023-02-20  8:22 UTC (permalink / raw)
  To: binutils; +Cc: Clément Chigot

When dealing with case insensitive file systems, ".file line.s" and
".file Line.s" are identical and thus gas won't change the current
input file.
However, in line.l test, it's expecting to trigger an input file switch.
As the second filename doesn't matter in it, change it to fit for those
file systems.

gas/ChangeLog:

	* testsuite/gas/elf/line.l: Change Line.s to new_line.s.
	* testsuite/gas/elf/line.s: Adjust output.
---
 gas/testsuite/gas/elf/line.l | 12 ++++++------
 gas/testsuite/gas/elf/line.s |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/gas/testsuite/gas/elf/line.l b/gas/testsuite/gas/elf/line.l
index 6fde80b7a85..f8511298bc1 100644
--- a/gas/testsuite/gas/elf/line.l
+++ b/gas/testsuite/gas/elf/line.l
@@ -15,17 +15,17 @@ line\.s:[0-9]*23:  Info: .*
 line\.s:4: Warning: m1/2: XYZ
 line\.s:[0-9]*23:  Info: .*
 line\.s:[0-9]*24: Warning: \.warning .*
-Line\.s:10: Warning: m2/1: 987
+new_line\.s:10: Warning: m2/1: 987
 line\.s:[0-9]*26:  Info: .*
-Line\.s:12: Warning: m2/2: 987
+new_line\.s:12: Warning: m2/2: 987
 line\.s:[0-9]*26:  Info: .*
-Line\.s:10: Warning: m2/1: zyx
+new_line\.s:10: Warning: m2/1: zyx
 line\.s:[0-9]*27:  Info: .*
-Line\.s:12: Warning: m2/2: zyx
+new_line\.s:12: Warning: m2/2: zyx
 line\.s:[0-9]*27:  Info: .*
-Line\.s:10: Warning: m2/1: CBA
+new_line\.s:10: Warning: m2/1: CBA
 line\.s:[0-9]*28:  Info: .*
-Line\.s:12: Warning: m2/2: CBA
+new_line\.s:12: Warning: m2/2: CBA
 line\.s:[0-9]*28:  Info: .*
 line\.s:[0-9]*29: Warning: \.warning .*
 line\.s:[0-9]*35: Warning: irp/1: 123
diff --git a/gas/testsuite/gas/elf/line.s b/gas/testsuite/gas/elf/line.s
index 2190cc3c225..e3a97887d96 100644
--- a/gas/testsuite/gas/elf/line.s
+++ b/gas/testsuite/gas/elf/line.s
@@ -5,7 +5,7 @@
 	.endm
 
 	.macro m2 args:vararg
-	.file "Line.s"
+	.file "new_line.s"
 	.line 9
 	.warning "m2/1: \args"
 	.nop
-- 
2.25.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 2/4] ld/testsuite: don't output to /dev/null on mingw hosts
  2023-02-20  8:22 [PATCH 1/4] gas/testsuite: adjust a test for case insensitive file systems Clément Chigot
@ 2023-02-20  8:22 ` Clément Chigot
  2023-02-20 10:59   ` Alan Modra
  2023-02-20  8:22 ` [PATCH 3/4] ld/testsuite: adjust to Windows path separator Clément Chigot
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 12+ messages in thread
From: Clément Chigot @ 2023-02-20  8:22 UTC (permalink / raw)
  To: binutils; +Cc: Clément Chigot

Mingw doesn't have /dev/null and thus "-o /dev/null" will fail.
Currently, all the options are checked using this "-o /dev/null",
resulting in them being disabled on mingw hosts. Fix that by
outputting to a real .exe file.

ld/ChangeLog:

	* testsuite/config/default.exp: Replace "-o /dev/null" by a file
	on mingw hosts.
---
 ld/testsuite/config/default.exp | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/ld/testsuite/config/default.exp b/ld/testsuite/config/default.exp
index 257fd4ba985..776b33842c2 100644
--- a/ld/testsuite/config/default.exp
+++ b/ld/testsuite/config/default.exp
@@ -383,6 +383,9 @@ proc compiler_supports { flag args } {
 	    append flags " [board_info [target_info name] ldflags]"
 	}
 	set fn "cs[pid].c"
+	if [ishost "*-*-mingw*"] {
+	    set fno "cs[pid].exe"
+	}
 	set f [open $fn "w"]
 	if { [llength $args] > 0 } {
 	    puts $f [lindex $args 0]
@@ -391,7 +394,12 @@ proc compiler_supports { flag args } {
 	}
 	close $f
 	set rfn [remote_download host $fn]
-	set avail [run_host_cmd_yesno "$CC_FOR_TARGET" "$flags $flag $rfn -o /dev/null"]
+	if [ishost "*-*-mingw*"] {
+	    set avail [run_host_cmd_yesno "$CC_FOR_TARGET" "$flags $flag $rfn -o $fno"]
+	    file delete $fno
+	} else {
+	    set avail [run_host_cmd_yesno "$CC_FOR_TARGET" "$flags $flag $rfn -o /dev/null"]
+	}
 	remote_file host delete $rfn
 	file delete $fn
 	return $avail
-- 
2.25.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 3/4] ld/testsuite: adjust to Windows path separator.
  2023-02-20  8:22 [PATCH 1/4] gas/testsuite: adjust a test for case insensitive file systems Clément Chigot
  2023-02-20  8:22 ` [PATCH 2/4] ld/testsuite: don't output to /dev/null on mingw hosts Clément Chigot
@ 2023-02-20  8:22 ` Clément Chigot
  2023-02-20 11:00   ` Alan Modra
  2023-02-20  8:22 ` [PATCH 4/4] ld/testsuite: handle Windows drive letter in a noinit test Clément Chigot
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 12+ messages in thread
From: Clément Chigot @ 2023-02-20  8:22 UTC (permalink / raw)
  To: binutils; +Cc: Clément Chigot

In some tests, the path reported on Windows will have a \ instead of a
/. This occurs when a file is concatened with the search path in
ldfile.c.:  "ld -Ltmpdir -ltext" will result into "tmpdir\libtext.a".

ld/ChangeLog:

	* testsuite/ld-elf/retain5.map: Allow \ path separator.
	* testsuite/ld-plugin/plugin-10.d: Likewise.
	* testsuite/ld-plugin/plugin-11.d: Likewise.
	* testsuite/ld-plugin/plugin-18.d: Likewise.
	* testsuite/ld-plugin/plugin-19.d: Likewise.
	* testsuite/ld-plugin/plugin-20.d: Likewise.
	* testsuite/ld-plugin/plugin-22.d: Likewise.
---
 ld/testsuite/ld-elf/retain5.map    | 2 +-
 ld/testsuite/ld-plugin/plugin-10.d | 2 +-
 ld/testsuite/ld-plugin/plugin-11.d | 2 +-
 ld/testsuite/ld-plugin/plugin-18.d | 2 +-
 ld/testsuite/ld-plugin/plugin-19.d | 2 +-
 ld/testsuite/ld-plugin/plugin-20.d | 2 +-
 ld/testsuite/ld-plugin/plugin-22.d | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/ld/testsuite/ld-elf/retain5.map b/ld/testsuite/ld-elf/retain5.map
index 6b97c2a2206..0e919113f72 100644
--- a/ld/testsuite/ld-elf/retain5.map
+++ b/ld/testsuite/ld-elf/retain5.map
@@ -1,5 +1,5 @@
 # Check that the library was actually loaded to catch any false PASS.
 
 #...
-LOAD tmpdir/libretain5.a
+LOAD tmpdir[/\\]libretain5.a
 #pass
diff --git a/ld/testsuite/ld-plugin/plugin-10.d b/ld/testsuite/ld-plugin/plugin-10.d
index 3818bf7bb2f..f92ee650c13 100644
--- a/ld/testsuite/ld-plugin/plugin-10.d
+++ b/ld/testsuite/ld-plugin/plugin-10.d
@@ -29,7 +29,7 @@ Hello from testplugin.
 hook called: claim_file tmpdir/main.o \[@0/.* not claimed
 hook called: claim_file tmpdir/func.o \[@0/.* CLAIMED
 #...
-hook called: claim_file tmpdir/libtext.a \[@.* not claimed
+hook called: claim_file tmpdir[/\\]libtext.a \[@.* not claimed
 #...
 hook called: all symbols read.
 Sym: '_?func' Resolution: LDPR_PREVAILING_DEF
diff --git a/ld/testsuite/ld-plugin/plugin-11.d b/ld/testsuite/ld-plugin/plugin-11.d
index 10b80288606..6a5abcfc060 100644
--- a/ld/testsuite/ld-plugin/plugin-11.d
+++ b/ld/testsuite/ld-plugin/plugin-11.d
@@ -32,7 +32,7 @@ Hello from testplugin.
 hook called: claim_file tmpdir/main.o \[@0/.* not claimed
 hook called: claim_file tmpdir/func.o \[@0/.* CLAIMED
 #...
-hook called: claim_file tmpdir/libtext.a \[@.* CLAIMED
+hook called: claim_file tmpdir[/\\]libtext.a \[@.* CLAIMED
 #...
 hook called: all symbols read.
 Sym: '_?func' Resolution: LDPR_PREVAILING_DEF
diff --git a/ld/testsuite/ld-plugin/plugin-18.d b/ld/testsuite/ld-plugin/plugin-18.d
index 0200a05cfd6..284fd057686 100644
--- a/ld/testsuite/ld-plugin/plugin-18.d
+++ b/ld/testsuite/ld-plugin/plugin-18.d
@@ -29,7 +29,7 @@ Hello from testplugin.
 hook called: claim_file tmpdir/main.o \[@0/.* not claimed
 hook called: claim_file .*/ld/testsuite/ld-plugin/func.c \[@0/.* CLAIMED
 #...
-hook called: claim_file tmpdir/libtext.a \[@.* not claimed
+hook called: claim_file tmpdir[/\\]libtext.a \[@.* not claimed
 #...
 hook called: all symbols read.
 Sym: '_?func' Resolution: LDPR_PREVAILING_DEF
diff --git a/ld/testsuite/ld-plugin/plugin-19.d b/ld/testsuite/ld-plugin/plugin-19.d
index e838028fd36..621ee7689f0 100644
--- a/ld/testsuite/ld-plugin/plugin-19.d
+++ b/ld/testsuite/ld-plugin/plugin-19.d
@@ -32,7 +32,7 @@ Hello from testplugin.
 hook called: claim_file tmpdir/main.o \[@0/.* not claimed
 hook called: claim_file .*/ld/testsuite/ld-plugin/func.c \[@0/.* CLAIMED
 #...
-hook called: claim_file tmpdir/libtext.a \[@.* CLAIMED
+hook called: claim_file tmpdir[/\\]libtext.a \[@.* CLAIMED
 #...
 hook called: all symbols read.
 Sym: '_?func' Resolution: LDPR_PREVAILING_DEF
diff --git a/ld/testsuite/ld-plugin/plugin-20.d b/ld/testsuite/ld-plugin/plugin-20.d
index 31bc3766162..e3c724df636 100644
--- a/ld/testsuite/ld-plugin/plugin-20.d
+++ b/ld/testsuite/ld-plugin/plugin-20.d
@@ -1,5 +1,5 @@
 hook called: all symbols read.
-Input: func.c \(tmpdir/libfunc.a\)
+Input: func.c \(tmpdir[/\\]libfunc.a\)
 Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
 Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
 .*: tmpdir/main.o: in function `main':
diff --git a/ld/testsuite/ld-plugin/plugin-22.d b/ld/testsuite/ld-plugin/plugin-22.d
index 1084a0b00cf..381ac03c052 100644
--- a/ld/testsuite/ld-plugin/plugin-22.d
+++ b/ld/testsuite/ld-plugin/plugin-22.d
@@ -1,4 +1,4 @@
-Claimed: tmpdir/libfunc.a \[@.*
+Claimed: tmpdir[/\\]libfunc.a \[@.*
 hook called: all symbols read.
 Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
 Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
-- 
2.25.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 4/4] ld/testsuite: handle Windows drive letter in a noinit test
  2023-02-20  8:22 [PATCH 1/4] gas/testsuite: adjust a test for case insensitive file systems Clément Chigot
  2023-02-20  8:22 ` [PATCH 2/4] ld/testsuite: don't output to /dev/null on mingw hosts Clément Chigot
  2023-02-20  8:22 ` [PATCH 3/4] ld/testsuite: adjust to Windows path separator Clément Chigot
@ 2023-02-20  8:22 ` Clément Chigot
  2023-02-20 11:02   ` Alan Modra
  2023-02-20 10:52 ` [PATCH 1/4] gas/testsuite: adjust a test for case insensitive file systems Alan Modra
  2023-02-21  8:40 ` Jan Beulich
  4 siblings, 1 reply; 12+ messages in thread
From: Clément Chigot @ 2023-02-20  8:22 UTC (permalink / raw)
  To: binutils; +Cc: Clément Chigot

The regexp in "noinit sections (ld -r)" is skipping the file path before
the first ":". However, on Windows, a path can start with "C:". Adjust
the regexp to allow such cases.

ld/ChangeLog:

	* testsuite/ld-elf/noinit-sections-2.l: Allow Windows paths
	(starting with C:).
---
 ld/testsuite/ld-elf/noinit-sections-2.l | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ld/testsuite/ld-elf/noinit-sections-2.l b/ld/testsuite/ld-elf/noinit-sections-2.l
index 0784c9e3e12..8ed2716c549 100644
--- a/ld/testsuite/ld-elf/noinit-sections-2.l
+++ b/ld/testsuite/ld-elf/noinit-sections-2.l
@@ -1,5 +1,5 @@
 #...
-[^:]*: warning: orphan section `.noinit.var_noinit' from \S+ being placed in section `.noinit.var_noinit'
+(|.:)[^:]*: warning: orphan section `.noinit.var_noinit' from \S+ being placed in section `.noinit.var_noinit'
 #...
-[^:]*: warning: orphan section `.gnu.linkonce.n.var_noinit2' from \S+ being placed in section `.gnu.linkonce.n.var_noinit2'
+(|.:)[^:]*: warning: orphan section `.gnu.linkonce.n.var_noinit2' from \S+ being placed in section `.gnu.linkonce.n.var_noinit2'
 #pass
-- 
2.25.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/4] gas/testsuite: adjust a test for case insensitive file systems
  2023-02-20  8:22 [PATCH 1/4] gas/testsuite: adjust a test for case insensitive file systems Clément Chigot
                   ` (2 preceding siblings ...)
  2023-02-20  8:22 ` [PATCH 4/4] ld/testsuite: handle Windows drive letter in a noinit test Clément Chigot
@ 2023-02-20 10:52 ` Alan Modra
  2023-02-21  8:30   ` Jan Beulich
  2023-02-21  8:40 ` Jan Beulich
  4 siblings, 1 reply; 12+ messages in thread
From: Alan Modra @ 2023-02-20 10:52 UTC (permalink / raw)
  To: Clément Chigot; +Cc: binutils

On Mon, Feb 20, 2023 at 09:22:21AM +0100, Clément Chigot via Binutils wrote:
> When dealing with case insensitive file systems, ".file line.s" and
> ".file Line.s" are identical and thus gas won't change the current
> input file.
> However, in line.l test, it's expecting to trigger an input file switch.
> As the second filename doesn't matter in it, change it to fit for those
> file systems.

I'm leaving this one to Jan to approve, because I suspect the capital
may have been a typo.

> gas/ChangeLog:
> 
> 	* testsuite/gas/elf/line.l: Change Line.s to new_line.s.
> 	* testsuite/gas/elf/line.s: Adjust output.
> ---
>  gas/testsuite/gas/elf/line.l | 12 ++++++------
>  gas/testsuite/gas/elf/line.s |  2 +-
>  2 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/gas/testsuite/gas/elf/line.l b/gas/testsuite/gas/elf/line.l
> index 6fde80b7a85..f8511298bc1 100644
> --- a/gas/testsuite/gas/elf/line.l
> +++ b/gas/testsuite/gas/elf/line.l
> @@ -15,17 +15,17 @@ line\.s:[0-9]*23:  Info: .*
>  line\.s:4: Warning: m1/2: XYZ
>  line\.s:[0-9]*23:  Info: .*
>  line\.s:[0-9]*24: Warning: \.warning .*
> -Line\.s:10: Warning: m2/1: 987
> +new_line\.s:10: Warning: m2/1: 987
>  line\.s:[0-9]*26:  Info: .*
> -Line\.s:12: Warning: m2/2: 987
> +new_line\.s:12: Warning: m2/2: 987
>  line\.s:[0-9]*26:  Info: .*
> -Line\.s:10: Warning: m2/1: zyx
> +new_line\.s:10: Warning: m2/1: zyx
>  line\.s:[0-9]*27:  Info: .*
> -Line\.s:12: Warning: m2/2: zyx
> +new_line\.s:12: Warning: m2/2: zyx
>  line\.s:[0-9]*27:  Info: .*
> -Line\.s:10: Warning: m2/1: CBA
> +new_line\.s:10: Warning: m2/1: CBA
>  line\.s:[0-9]*28:  Info: .*
> -Line\.s:12: Warning: m2/2: CBA
> +new_line\.s:12: Warning: m2/2: CBA
>  line\.s:[0-9]*28:  Info: .*
>  line\.s:[0-9]*29: Warning: \.warning .*
>  line\.s:[0-9]*35: Warning: irp/1: 123
> diff --git a/gas/testsuite/gas/elf/line.s b/gas/testsuite/gas/elf/line.s
> index 2190cc3c225..e3a97887d96 100644
> --- a/gas/testsuite/gas/elf/line.s
> +++ b/gas/testsuite/gas/elf/line.s
> @@ -5,7 +5,7 @@
>  	.endm
>  
>  	.macro m2 args:vararg
> -	.file "Line.s"
> +	.file "new_line.s"
>  	.line 9
>  	.warning "m2/1: \args"
>  	.nop
> -- 
> 2.25.1

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/4] ld/testsuite: don't output to /dev/null on mingw hosts
  2023-02-20  8:22 ` [PATCH 2/4] ld/testsuite: don't output to /dev/null on mingw hosts Clément Chigot
@ 2023-02-20 10:59   ` Alan Modra
  0 siblings, 0 replies; 12+ messages in thread
From: Alan Modra @ 2023-02-20 10:59 UTC (permalink / raw)
  To: Clément Chigot; +Cc: binutils

On Mon, Feb 20, 2023 at 09:22:22AM +0100, Clément Chigot via Binutils wrote:
> Mingw doesn't have /dev/null and thus "-o /dev/null" will fail.
> Currently, all the options are checked using this "-o /dev/null",
> resulting in them being disabled on mingw hosts. Fix that by
> outputting to a real .exe file.
> 
> ld/ChangeLog:
> 
> 	* testsuite/config/default.exp: Replace "-o /dev/null" by a file
> 	on mingw hosts.

I think I'd prefer this to always output to a file, which you should
delete afterwards.

> ---
>  ld/testsuite/config/default.exp | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/ld/testsuite/config/default.exp b/ld/testsuite/config/default.exp
> index 257fd4ba985..776b33842c2 100644
> --- a/ld/testsuite/config/default.exp
> +++ b/ld/testsuite/config/default.exp
> @@ -383,6 +383,9 @@ proc compiler_supports { flag args } {
>  	    append flags " [board_info [target_info name] ldflags]"
>  	}
>  	set fn "cs[pid].c"
> +	if [ishost "*-*-mingw*"] {
> +	    set fno "cs[pid].exe"
> +	}
>  	set f [open $fn "w"]
>  	if { [llength $args] > 0 } {
>  	    puts $f [lindex $args 0]
> @@ -391,7 +394,12 @@ proc compiler_supports { flag args } {
>  	}
>  	close $f
>  	set rfn [remote_download host $fn]
> -	set avail [run_host_cmd_yesno "$CC_FOR_TARGET" "$flags $flag $rfn -o /dev/null"]
> +	if [ishost "*-*-mingw*"] {
> +	    set avail [run_host_cmd_yesno "$CC_FOR_TARGET" "$flags $flag $rfn -o $fno"]
> +	    file delete $fno
> +	} else {
> +	    set avail [run_host_cmd_yesno "$CC_FOR_TARGET" "$flags $flag $rfn -o /dev/null"]
> +	}
>  	remote_file host delete $rfn
>  	file delete $fn
>  	return $avail
> -- 
> 2.25.1

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 3/4] ld/testsuite: adjust to Windows path separator.
  2023-02-20  8:22 ` [PATCH 3/4] ld/testsuite: adjust to Windows path separator Clément Chigot
@ 2023-02-20 11:00   ` Alan Modra
  0 siblings, 0 replies; 12+ messages in thread
From: Alan Modra @ 2023-02-20 11:00 UTC (permalink / raw)
  To: Clément Chigot; +Cc: binutils

On Mon, Feb 20, 2023 at 09:22:23AM +0100, Clément Chigot via Binutils wrote:
> In some tests, the path reported on Windows will have a \ instead of a
> /. This occurs when a file is concatened with the search path in
> ldfile.c.:  "ld -Ltmpdir -ltext" will result into "tmpdir\libtext.a".

OK, thanks.

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 4/4] ld/testsuite: handle Windows drive letter in a noinit test
  2023-02-20  8:22 ` [PATCH 4/4] ld/testsuite: handle Windows drive letter in a noinit test Clément Chigot
@ 2023-02-20 11:02   ` Alan Modra
  0 siblings, 0 replies; 12+ messages in thread
From: Alan Modra @ 2023-02-20 11:02 UTC (permalink / raw)
  To: Clément Chigot; +Cc: binutils

On Mon, Feb 20, 2023 at 09:22:24AM +0100, Clément Chigot via Binutils wrote:
> The regexp in "noinit sections (ld -r)" is skipping the file path before
> the first ":". However, on Windows, a path can start with "C:". Adjust
> the regexp to allow such cases.
> 
> ld/ChangeLog:
> 
> 	* testsuite/ld-elf/noinit-sections-2.l: Allow Windows paths
> 	(starting with C:).

OK.

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/4] gas/testsuite: adjust a test for case insensitive file systems
  2023-02-20 10:52 ` [PATCH 1/4] gas/testsuite: adjust a test for case insensitive file systems Alan Modra
@ 2023-02-21  8:30   ` Jan Beulich
  0 siblings, 0 replies; 12+ messages in thread
From: Jan Beulich @ 2023-02-21  8:30 UTC (permalink / raw)
  To: Alan Modra; +Cc: binutils, Clément Chigot

On 20.02.2023 11:52, Alan Modra via Binutils wrote:
> On Mon, Feb 20, 2023 at 09:22:21AM +0100, Clément Chigot via Binutils wrote:
>> When dealing with case insensitive file systems, ".file line.s" and
>> ".file Line.s" are identical and thus gas won't change the current
>> input file.
>> However, in line.l test, it's expecting to trigger an input file switch.
>> As the second filename doesn't matter in it, change it to fit for those
>> file systems.
> 
> I'm leaving this one to Jan to approve, because I suspect the capital
> may have been a typo.

No, it was deliberate.

Jan

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/4] gas/testsuite: adjust a test for case insensitive file systems
  2023-02-20  8:22 [PATCH 1/4] gas/testsuite: adjust a test for case insensitive file systems Clément Chigot
                   ` (3 preceding siblings ...)
  2023-02-20 10:52 ` [PATCH 1/4] gas/testsuite: adjust a test for case insensitive file systems Alan Modra
@ 2023-02-21  8:40 ` Jan Beulich
  2023-02-21  9:02   ` Clément Chigot
  4 siblings, 1 reply; 12+ messages in thread
From: Jan Beulich @ 2023-02-21  8:40 UTC (permalink / raw)
  To: Clément Chigot; +Cc: binutils

On 20.02.2023 09:22, Clément Chigot via Binutils wrote:
> When dealing with case insensitive file systems, ".file line.s" and
> ".file Line.s" are identical and thus gas won't change the current
> input file.
> However, in line.l test, it's expecting to trigger an input file switch.
> As the second filename doesn't matter in it, change it to fit for those
> file systems.
> 
> gas/ChangeLog:
> 
> 	* testsuite/gas/elf/line.l: Change Line.s to new_line.s.

Since I have a pretty sincere dislike for underscores in filenames, may
I ask that you use e.g. line2.s or even (preserving original case)
Line2.s? Other than that I'm okay with the change, albeit I'd like to
point out that libiberty's filename_cmp() isn't really international-
ready (works reliably only for ASCII), and hence there are apparently
bigger issues here. Plus file system properties cannot really be a build-
time constraint, as there could be a mix that is in use.

Jan

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/4] gas/testsuite: adjust a test for case insensitive file systems
  2023-02-21  8:40 ` Jan Beulich
@ 2023-02-21  9:02   ` Clément Chigot
  2023-02-21  9:28     ` Jan Beulich
  0 siblings, 1 reply; 12+ messages in thread
From: Clément Chigot @ 2023-02-21  9:02 UTC (permalink / raw)
  To: Jan Beulich; +Cc: binutils

On Tue, Feb 21, 2023 at 9:40 AM Jan Beulich <jbeulich@suse.com> wrote:
>
> On 20.02.2023 09:22, Clément Chigot via Binutils wrote:
> > When dealing with case insensitive file systems, ".file line.s" and
> > ".file Line.s" are identical and thus gas won't change the current
> > input file.
> > However, in line.l test, it's expecting to trigger an input file switch.
> > As the second filename doesn't matter in it, change it to fit for those
> > file systems.
> >
> > gas/ChangeLog:
> >
> >       * testsuite/gas/elf/line.l: Change Line.s to new_line.s.
>
> Since I have a pretty sincere dislike for underscores in filenames, may
> I ask that you use e.g. line2.s or even (preserving original case)
> Line2.s?

Yeah, no worry. I've updated it to Line2.s.

> Other than that I'm okay with the change, albeit I'd like to
> point out that libiberty's filename_cmp() isn't really international-
> ready (works reliably only for ASCII), and hence there are apparently
> bigger issues here.

It's not linked with internationalization, here. The issue is because
mingw file system is case insensitive, thus line.s and Line.s are
supposed to be the same file.
Looking at filename_cmp, it's already handling that.

> Plus file system properties cannot really be a build-
> time constraint, as there could be a mix that is in use.

Yeah, I can get that, and I'm not confident enough to say that it
won't be a problem in the future... But for now, this particular file
system property about case insensitive filename seems pretty well
handled by binutils, otherwise, I would have more issues raised while
running the testsuites I guess.

Thanks,
Clément

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/4] gas/testsuite: adjust a test for case insensitive file systems
  2023-02-21  9:02   ` Clément Chigot
@ 2023-02-21  9:28     ` Jan Beulich
  0 siblings, 0 replies; 12+ messages in thread
From: Jan Beulich @ 2023-02-21  9:28 UTC (permalink / raw)
  To: Clément Chigot; +Cc: binutils

On 21.02.2023 10:02, Clément Chigot wrote:
> On Tue, Feb 21, 2023 at 9:40 AM Jan Beulich <jbeulich@suse.com> wrote:
>> Other than that I'm okay with the change, albeit I'd like to
>> point out that libiberty's filename_cmp() isn't really international-
>> ready (works reliably only for ASCII), and hence there are apparently
>> bigger issues here.
> 
> It's not linked with internationalization, here. The issue is because
> mingw file system is case insensitive, thus line.s and Line.s are
> supposed to be the same file.
> Looking at filename_cmp, it's already handling that.

Sure, and I was pointing this out as a related issue, yet unrelated
to your concern. Clearly in the testsuite we can limit ourselves to
all-ASCII names. But that may not hold for people actually using
binutils on case-insensitive file systems.

Jan

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-02-21  9:28 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-20  8:22 [PATCH 1/4] gas/testsuite: adjust a test for case insensitive file systems Clément Chigot
2023-02-20  8:22 ` [PATCH 2/4] ld/testsuite: don't output to /dev/null on mingw hosts Clément Chigot
2023-02-20 10:59   ` Alan Modra
2023-02-20  8:22 ` [PATCH 3/4] ld/testsuite: adjust to Windows path separator Clément Chigot
2023-02-20 11:00   ` Alan Modra
2023-02-20  8:22 ` [PATCH 4/4] ld/testsuite: handle Windows drive letter in a noinit test Clément Chigot
2023-02-20 11:02   ` Alan Modra
2023-02-20 10:52 ` [PATCH 1/4] gas/testsuite: adjust a test for case insensitive file systems Alan Modra
2023-02-21  8:30   ` Jan Beulich
2023-02-21  8:40 ` Jan Beulich
2023-02-21  9:02   ` Clément Chigot
2023-02-21  9:28     ` Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).