bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: test-xalloc-die note


From: Jarno Rajahalme
Subject: Re: test-xalloc-die note
Date: Fri, 9 Apr 2010 11:28:37 -0700

Thanks for the instructions..

OS: Darwin 10.3.0
tr: /usr/bin/tr
locale:
LANG=
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=

I get this kind of behavior both before and after the proposed patch:

tests$ ./test-xalloc-die.sh
tr: Illegal byte sequence
tests$ ./test-xalloc-die.sh
tests$ ./test-xalloc-die.sh
tr: Illegal byte sequence
tests$ ./test-xalloc-die.sh
tr: Illegal byte sequence
tests$ ./test-xalloc-die.sh
tr: Illegal byte sequence
tests$ ./test-xalloc-die.sh
tests$ ./test-xalloc-die.sh
tr: Illegal byte sequence

I.e., most of the time tr complains, but not always.

With set -x:

tests$ ./test-xalloc-die.sh
+ . ./init.sh
++ gl_shell_test_script_='
test $(echo y) = y || exit 1
test -z "$EXEEXT" && exit 0
shopt -s expand_aliases
alias a-b="echo zoo"
v=abx
     test ${v%x} = ab \
  && test ${v#a} = bx \
  && test $(a-b) = zoo
'
++ test x = x--no-reexec
++ for re_shell_ in '"${CONFIG_SHELL:-no_shell}"' /bin/sh bash dash zsh pdksh 
fail
++ test no_shell = no_shell
++ continue
++ for re_shell_ in '"${CONFIG_SHELL:-no_shell}"' /bin/sh bash dash zsh pdksh 
fail
++ test /bin/sh = no_shell
++ test /bin/sh = fail
++ /bin/sh -c '
test $(echo y) = y || exit 1
test -z "$EXEEXT" && exit 0
shopt -s expand_aliases
alias a-b="echo zoo"
v=abx
     test ${v%x} = ab \
  && test ${v#a} = bx \
  && test $(a-b) = zoo
'
++ exec /bin/sh ./test-xalloc-die.sh --no-reexec
+ . ./init.sh
++ gl_shell_test_script_='
test $(echo y) = y || exit 1
test -z "$EXEEXT" && exit 0
shopt -s expand_aliases
alias a-b="echo zoo"
v=abx
     test ${v%x} = ab \
  && test ${v#a} = bx \
  && test $(a-b) = zoo
'
++ test x--no-reexec = x--no-reexec
++ shift
++ test -n ''
++ : 2
++ diff --version
++ grep GNU
++ test -f ./init.cfg
++ setup_
++ test '' = yes
++ initial_cwd_=/Users/rajahalm/amhello-1.0/tests
+++ expr ././test-xalloc-die.sh : '.*/\(.*\)$'
++ ME_=test-xalloc-die.sh
+++ testdir_prefix_
+++ printf gt
++ pfx_=gt
+++ mktempd_ /Users/rajahalm/amhello-1.0/tests gt-test-xalloc-die.sh.XXXX
+++ case $# in
+++ destdir_=/Users/rajahalm/amhello-1.0/tests
+++ template_=gt-test-xalloc-die.sh.XXXX
+++ MAX_TRIES_=4
+++ case $destdir_ in
+++ case $template_ in
+++ fail=0
++++ unset TMPDIR
++++ mktemp -d -t -p /Users/rajahalm/amhello-1.0/tests 
gt-test-xalloc-die.sh.XXXX
+++ d='/tmp/-p.iymArqLv
gt-test-xalloc-die.sh.Gdum'
+++ fail=1
+++ case $d in
+++ fail=1
+++ test -d '/tmp/-p.iymArqLv
gt-test-xalloc-die.sh.Gdum'
+++ fail=1
++++ ls -dgo '/tmp/-p.iymArqLv
gt-test-xalloc-die.sh.Gdum'
++++ tr S -
+++ perms=
+++ case $perms in
+++ fail=1
+++ test 1 = 0
++++ echo gt-test-xalloc-die.sh.XXXX
++++ sed 's/XX*$//'
+++ base_template_=gt-test-xalloc-die.sh.
++++ echo gt-test-xalloc-die.sh.XXXX
++++ wc -c
+++ template_length_='      27'
++++ echo gt-test-xalloc-die.sh.
++++ wc -c
+++ nx_='      23'
++++ expr 27 - 23
+++ nx_=4
+++ err_=
+++ i_=1
+++ :
++++ rand_bytes_ 4
++++ n_=4
++++ chars_=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
++++ dev_rand_=/dev/urandom
++++ test -r /dev/urandom
++++ dd ibs=4 count=1 if=/dev/urandom
++++ tr -c abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 
01234567abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
tr: Illegal byte sequence
++++ return
+++ X_=
+++ candidate_dir_=/Users/rajahalm/amhello-1.0/tests/gt-test-xalloc-die.sh.
++++ mkdir -m 0700 /Users/rajahalm/amhello-1.0/tests/gt-test-xalloc-die.sh.
+++ err_=
+++ echo /Users/rajahalm/amhello-1.0/tests/gt-test-xalloc-die.sh.
+++ return
++ test_dir_=/Users/rajahalm/amhello-1.0/tests/gt-test-xalloc-die.sh.
++ cd /Users/rajahalm/amhello-1.0/tests/gt-test-xalloc-die.sh.
++ trap remove_tmp_ 0
++ trap 'Exit $?' 1 2 13 15
+ path_prepend_ .
+ test 1 '!=' 0
+ path_dir_=.
+ case $path_dir_ in
++ cd /Users/rajahalm/amhello-1.0/tests/.
++ echo /Users/rajahalm/amhello-1.0/tests
+ abs_path_dir_=/Users/rajahalm/amhello-1.0/tests
+ case $abs_path_dir_ in
+ 
PATH=/Users/rajahalm/amhello-1.0/tests:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin:/usr/X11/bin
+ create_exe_shims_ /Users/rajahalm/amhello-1.0/tests
+ case $EXEEXT in
+ return 0
+ shift
+ test 0 '!=' 0
+ export PATH
+ LC_ALL=C
+ export LC_ALL
+ test-xalloc-die
+ case $? in
+ tr -d '\015'
+ sed 's,.*test-xalloc-die[.ex]*:,test-xalloc-die:,'
+ compare - err2
+ diff -u - err2
+ test -s out
+ Exit
+ set +e
+ exit
+ exit
+ remove_tmp_
+ __st=0
+ cleanup_
+ :
+ cd /Users/rajahalm/amhello-1.0/tests
+ chmod -R u+rwx /Users/rajahalm/amhello-1.0/tests/gt-test-xalloc-die.sh.
+ rm -rf /Users/rajahalm/amhello-1.0/tests/gt-test-xalloc-die.sh.
+ exit 0

tests$ ./test-xalloc-die.sh
+ . ./init.sh
++ gl_shell_test_script_='
test $(echo y) = y || exit 1
test -z "$EXEEXT" && exit 0
shopt -s expand_aliases
alias a-b="echo zoo"
v=abx
     test ${v%x} = ab \
  && test ${v#a} = bx \
  && test $(a-b) = zoo
'
++ test x = x--no-reexec
++ for re_shell_ in '"${CONFIG_SHELL:-no_shell}"' /bin/sh bash dash zsh pdksh 
fail
++ test no_shell = no_shell
++ continue
++ for re_shell_ in '"${CONFIG_SHELL:-no_shell}"' /bin/sh bash dash zsh pdksh 
fail
++ test /bin/sh = no_shell
++ test /bin/sh = fail
++ /bin/sh -c '
test $(echo y) = y || exit 1
test -z "$EXEEXT" && exit 0
shopt -s expand_aliases
alias a-b="echo zoo"
v=abx
     test ${v%x} = ab \
  && test ${v#a} = bx \
  && test $(a-b) = zoo
'
++ exec /bin/sh ./test-xalloc-die.sh --no-reexec
+ . ./init.sh
++ gl_shell_test_script_='
test $(echo y) = y || exit 1
test -z "$EXEEXT" && exit 0
shopt -s expand_aliases
alias a-b="echo zoo"
v=abx
     test ${v%x} = ab \
  && test ${v#a} = bx \
  && test $(a-b) = zoo
'
++ test x--no-reexec = x--no-reexec
++ shift
++ test -n ''
++ : 2
++ diff --version
++ grep GNU
++ test -f ./init.cfg
++ setup_
++ test '' = yes
++ initial_cwd_=/Users/rajahalm/amhello-1.0/tests
+++ expr ././test-xalloc-die.sh : '.*/\(.*\)$'
++ ME_=test-xalloc-die.sh
+++ testdir_prefix_
+++ printf gt
++ pfx_=gt
+++ mktempd_ /Users/rajahalm/amhello-1.0/tests gt-test-xalloc-die.sh.XXXX
+++ case $# in
+++ destdir_=/Users/rajahalm/amhello-1.0/tests
+++ template_=gt-test-xalloc-die.sh.XXXX
+++ MAX_TRIES_=4
+++ case $destdir_ in
+++ case $template_ in
+++ fail=0
++++ unset TMPDIR
++++ mktemp -d -t -p /Users/rajahalm/amhello-1.0/tests 
gt-test-xalloc-die.sh.XXXX
+++ d='/tmp/-p.ZTWWuk4D
gt-test-xalloc-die.sh.Xh4J'
+++ fail=1
+++ case $d in
+++ fail=1
+++ test -d '/tmp/-p.ZTWWuk4D
gt-test-xalloc-die.sh.Xh4J'
+++ fail=1
++++ ls -dgo '/tmp/-p.ZTWWuk4D
gt-test-xalloc-die.sh.Xh4J'
++++ tr S -
+++ perms=
+++ case $perms in
+++ fail=1
+++ test 1 = 0
++++ echo gt-test-xalloc-die.sh.XXXX
++++ sed 's/XX*$//'
+++ base_template_=gt-test-xalloc-die.sh.
++++ echo gt-test-xalloc-die.sh.XXXX
++++ wc -c
+++ template_length_='      27'
++++ echo gt-test-xalloc-die.sh.
++++ wc -c
+++ nx_='      23'
++++ expr 27 - 23
+++ nx_=4
+++ err_=
+++ i_=1
+++ :
++++ rand_bytes_ 4
++++ n_=4
++++ chars_=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
++++ dev_rand_=/dev/urandom
++++ test -r /dev/urandom
++++ dd ibs=4 count=1 if=/dev/urandom
++++ tr -c abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 
01234567abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
++++ return
+++ X_=r03v
+++ candidate_dir_=/Users/rajahalm/amhello-1.0/tests/gt-test-xalloc-die.sh.r03v
++++ mkdir -m 0700 /Users/rajahalm/amhello-1.0/tests/gt-test-xalloc-die.sh.r03v
+++ err_=
+++ echo /Users/rajahalm/amhello-1.0/tests/gt-test-xalloc-die.sh.r03v
+++ return
++ test_dir_=/Users/rajahalm/amhello-1.0/tests/gt-test-xalloc-die.sh.r03v
++ cd /Users/rajahalm/amhello-1.0/tests/gt-test-xalloc-die.sh.r03v
++ trap remove_tmp_ 0
++ trap 'Exit $?' 1 2 13 15
+ path_prepend_ .
+ test 1 '!=' 0
+ path_dir_=.
+ case $path_dir_ in
++ cd /Users/rajahalm/amhello-1.0/tests/.
++ echo /Users/rajahalm/amhello-1.0/tests
+ abs_path_dir_=/Users/rajahalm/amhello-1.0/tests
+ case $abs_path_dir_ in
+ 
PATH=/Users/rajahalm/amhello-1.0/tests:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin:/usr/X11/bin
+ create_exe_shims_ /Users/rajahalm/amhello-1.0/tests
+ case $EXEEXT in
+ return 0
+ shift
+ test 0 '!=' 0
+ export PATH
+ LC_ALL=C
+ export LC_ALL
+ test-xalloc-die
+ case $? in
+ tr -d '\015'
+ sed 's,.*test-xalloc-die[.ex]*:,test-xalloc-die:,'
+ compare - err2
+ diff -u - err2
+ test -s out
+ Exit
+ set +e
+ exit
+ exit
+ remove_tmp_
+ __st=0
+ cleanup_
+ :
+ cd /Users/rajahalm/amhello-1.0/tests
+ chmod -R u+rwx /Users/rajahalm/amhello-1.0/tests/gt-test-xalloc-die.sh.r03v
+ rm -rf /Users/rajahalm/amhello-1.0/tests/gt-test-xalloc-die.sh.r03v
+ exit 0
tests$ 


repeating the test, 9/10 times tr complains.

  Jarno

On Apr 9, 2010, at 2:33 AM, ext Bruno Haible wrote:

> Hi Jarno,
> 
> Please keep bug-gnulib in CC when you reply to me. We have a mailing list
> because the expertise for gnulib is spread across several people.
> 

OK. Somehow I thought that the tr complaining would not be a "bug" as the test 
"passed", and therefore thought that spamming bug-gnulib would not be 
appropriate.

> Jarno Rajahalme wrote:
>> I just did that and got passes, but one skip and one "note":
>> 
>> ...
>> PASS: test-wctype
>> tr: Illegal byte sequence
>> PASS: test-xalloc-die.sh
>> ====================
>> All 116 tests passed
>> ====================
>> 
>> 
>> What does thes mean? is it an pass or an error?
> 
> Please, always when you report a malfunctioning, or a possible
> malfunctioning, include relevant details about your platform,
> about tools that might affect this malfunctioning, and a "how to
> reproduce". Always.
> 
> In this case, this means:
>  - What's your OS? ("uname -sr")?
>  - Where's the 'tr' program coming from? ("which tr")?
>  - What's your locale? ("locale")?
> 
> Also, when you report a problem that arises during execution of a
> shell script, it's a good idea to modify the script by adding
>  set -x
> near the beginning, so that it produces some traces.
> 
> After having done and reported that, can you please try this
> attempted workaround (not yet committed)?
> 
> 
> 2010-04-09  Bruno Haible  <address@hidden>
> 
>       * tests/test-xalloc-die.sh: Run test in C locale.
> 
> --- tests/test-xalloc-die.sh.orig     Fri Apr  9 11:16:31 2010
> +++ tests/test-xalloc-die.sh  Fri Apr  9 11:16:09 2010
> @@ -18,6 +18,9 @@
> 
> . "${srcdir=.}/init.sh"; path_prepend_ .
> 
> +LC_ALL=C
> +export LC_ALL
> +
> test-xalloc-die${EXEEXT} 2> err > out
> case $? in
>   1) ;;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]