diff options
author | Tom de Vries <tdevries@suse.de> | 2023-06-21 16:29:04 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2023-06-21 16:29:04 +0200 |
commit | 83aa25512de00bbbc469d3bf2414e99c8374e0d7 (patch) | |
tree | d71d4cca955f3b821cd7de2539daac87fcc25183 /gdb/testsuite/gdb.ada | |
parent | b96cac16078d282ee0924296817c6eee52196669 (diff) | |
download | binutils-83aa25512de00bbbc469d3bf2414e99c8374e0d7.zip binutils-83aa25512de00bbbc469d3bf2414e99c8374e0d7.tar.gz binutils-83aa25512de00bbbc469d3bf2414e99c8374e0d7.tar.bz2 |
[gdb/testsuite] Add have_host_locale
With test-case gdb.tui/pr30056.exp, I run into:
...
sh: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)^M
...
and then subsequently into:
...
WARNING: timeout in accept_gdb_output
FAIL: gdb.tui/pr30056.exp: Control-C
...
This is on a CentOS 7 distro for powerpc64le.
Either it has no C.UTF-8 support, or it's not installed:
...
$ locale -a | grep ^C
C
$
...
Fix this by:
- adding a new proc have_host_locale, and
- using it in all test-cases using setenv LC_ALL.
Tested on powerpc64le-linux and x86_64-linux.
Diffstat (limited to 'gdb/testsuite/gdb.ada')
-rw-r--r-- | gdb/testsuite/gdb.ada/non-ascii-latin-1.exp | 1 | ||||
-rw-r--r-- | gdb/testsuite/gdb.ada/non-ascii-latin-3.exp | 1 | ||||
-rw-r--r-- | gdb/testsuite/gdb.ada/non-ascii-utf-8.exp | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.ada/non-ascii-latin-1.exp b/gdb/testsuite/gdb.ada/non-ascii-latin-1.exp index 3cdf53d..877a864 100644 --- a/gdb/testsuite/gdb.ada/non-ascii-latin-1.exp +++ b/gdb/testsuite/gdb.ada/non-ascii-latin-1.exp @@ -18,6 +18,7 @@ load_lib "ada.exp" require allow_ada_tests +require {have_host_locale C.UTF-8} # Enable basic use of UTF-8. LC_ALL gets reset for each testfile. We # want this despite the program itself using Latin-1, as this test is diff --git a/gdb/testsuite/gdb.ada/non-ascii-latin-3.exp b/gdb/testsuite/gdb.ada/non-ascii-latin-3.exp index 5b5ae29..285fa23 100644 --- a/gdb/testsuite/gdb.ada/non-ascii-latin-3.exp +++ b/gdb/testsuite/gdb.ada/non-ascii-latin-3.exp @@ -18,6 +18,7 @@ load_lib "ada.exp" require allow_ada_tests +require {have_host_locale C.UTF-8} # Enable basic use of UTF-8. LC_ALL gets reset for each testfile. We # want this despite the program itself using Latin-1, as this test is diff --git a/gdb/testsuite/gdb.ada/non-ascii-utf-8.exp b/gdb/testsuite/gdb.ada/non-ascii-utf-8.exp index c121161..acf13fc 100644 --- a/gdb/testsuite/gdb.ada/non-ascii-utf-8.exp +++ b/gdb/testsuite/gdb.ada/non-ascii-utf-8.exp @@ -18,6 +18,7 @@ load_lib "ada.exp" require allow_ada_tests +require {have_host_locale C.UTF-8} # Enable basic use of UTF-8. LC_ALL gets reset for each testfile. setenv LC_ALL C.UTF-8 |