Hi,

I've just build the ksh93u with Version JM 93u+ 2011-05-03 and
run onto some error reports on several hardware and (open)SUSE
release versions:

On all s390x (not s390) platform I see (from Logfile.ksh.spec):

  test options begins at 2011-05-20+16:20:11
    options.sh[444]: function definition inside {...;} with HISTFILE unset 
fails -- got 'foo is a function', expected 'foo is a function'
  test options failed at 2011-05-20+16:20:17 with exit code 1 [ 141 tests 1 
error ]
  test options(en_US.UTF-8) begins at 2011-05-20+16:20:17
    options.sh[444]: function definition inside {...;} with HISTFILE unset 
fails -- got 'foo is a function', expected 'foo is a function'
  test options(en_US.UTF-8) failed at 2011-05-20+16:20:22 with exit code 1 [ 
141 tests 1 error ]
  test options(shcomp) begins at 2011-05-20+16:20:22
    shcomp-options.ksh[524]: pipefail causes script to hang
  test options(shcomp) failed at 2011-05-20+16:20:30 with exit code 1 [ 141 
tests 1 error ]

it should be noted that I've correct locale setup to avoid false
error reports from locale.sh (as with glibc there is no such
C_EU.UTF-8 nor C.UTF-8 locale beside C is an alias for POSIX)

On many platforms I see a timing issue

  test options begins at 2011-05-20+15:34:32
    options.sh[524]: pipefail causes script to hang
  test options failed at 2011-05-20+15:34:40 with exit code 1 [ 141 tests 1 
error ]
  test options(C.UTF-8) begins at 2011-05-20+15:34:40
    options.sh[524]: pipefail causes script to hang
  test options(C.UTF-8) failed at 2011-05-20+15:34:49 with exit code 1 [ 141 
tests 1 error ]
  test options(shcomp) begins at 2011-05-20+15:34:49
    shcomp-options.ksh[524]: pipefail causes script to hang
  test options(shcomp) failed at 2011-05-20+15:34:57 with exit code 1 [ 141 
tests 1 error ]

On all ppc (not ppc64) platforms I see

  test options begins at 2011-05-20+15:37:06
       options.sh[429]: option login not equivalent to l
       options.sh[429]: option restricted not equivalent to r
       options.sh[429]: option allexport not equivalent to a
       options.sh[429]: option notify not equivalent to b
       options.sh[429]: option errexit not equivalent to e
       options.sh[429]: option noglob not equivalent to f
       options.sh[429]: option trackall not equivalent to h
       options.sh[429]: option keyword not equivalent to k
       options.sh[429]: option noexec not equivalent to n
       options.sh[429]: option nounset not equivalent to u
       options.sh[429]: option verbose not equivalent to v
       options.sh[429]: option xtrace not equivalent to x
       options.sh[429]: option braceexpand not equivalent to B
       options.sh[429]: option noclobber not equivalent to C
       options.sh[429]: option globstar not equivalent to G
       options.sh[429]: option rc not equivalent to E
  test options failed at 2011-05-20+15:37:11 with exit code 16 [ 141 tests 16 
errors ]
  test options(en_US.UTF-8) begins at 2011-05-20+15:37:11
       options.sh[429]: option login not equivalent to l
       options.sh[429]: option restricted not equivalent to r
       options.sh[429]: option allexport not equivalent to a
       options.sh[429]: option notify not equivalent to b
       options.sh[429]: option errexit not equivalent to e
       options.sh[429]: option noglob not equivalent to f
       options.sh[429]: option trackall not equivalent to h
       options.sh[429]: option keyword not equivalent to k
       options.sh[429]: option noexec not equivalent to n
       options.sh[429]: option nounset not equivalent to u
       options.sh[429]: option verbose not equivalent to v
       options.sh[429]: option xtrace not equivalent to x
       options.sh[429]: option braceexpand not equivalent to B
       options.sh[429]: option noclobber not equivalent to C
       options.sh[429]: option globstar not equivalent to G
       options.sh[429]: option rc not equivalent to E
  test options(C.UTF-8) failed at 2011-05-20+15:37:17 with exit code 16 [ 141 
tests 16 errors ]
  test options(shcomp) begins at 2011-05-20+15:37:17
  test options(shcomp) passed at 2011-05-20+15:37:22 [ 141 tests 0 errors ]

On several ppc/ppc64 platforms I see

  test bracket begins at 2011-05-20+15:43:54
          bracket.sh[232]: test -N $tmp/*: st_mtime>st_atime after read
  test bracket failed at 2011-05-20+15:44:00 with exit code 1 [ 110 tests 1 
error ]
  test bracket(C.UTF-8) begins at 2011-05-20+15:44:00
          bracket.sh[232]: test -N $tmp/*: st_mtime>st_atime after read
  test bracket(C.UTF-8) failed at 2011-05-20+15:44:06 with exit code 1 [ 110 
tests 1 error ]
  test bracket(shcomp) begins at 2011-05-20+15:44:06
          shcomp-bracket.ksh[232]: test -N $tmp/*: st_mtime>st_atime after read
  test bracket(shcomp) failed at 2011-05-20+15:44:11 with exit code 1 [ 110 
tests 1 e

At last but not least my Shift-IJS test script (see attachment) fails on all
platforms with

  test sjis begins at 2011-05-20+15:42:26
   \x81\x5c failed with 201\intf} != 201\
   \x81\x7c failed with 201\| != 201|
       sjis.sh[65]: Shift-JIS encoding failed
  test sjis failed at 2011-05-20+15:42:26 with exit code 2 [ 2 tests 2 errors ]
  test sjis(C.UTF-8) begins at 2011-05-20+15:42:26
   \x81\x5c failed with 201\intf} != 201\
   \x81\x7c failed with 201\| != 201|
       sjis.sh[65]: Shift-JIS encoding failed
  test sjis(C.UTF-8) failed at 2011-05-20+15:42:26 with exit code 2 [ 2 tests 2 
errors ]
  test sjis(shcomp) begins at 2011-05-20+15:42:26
   \x81\x5c failed with 201\intf} != 201\
   \x81\x7c failed with 201\| != 201|
       shcomp-sjis.ksh[65]: Shift-JIS encoding failed
  test sjis(shcomp) failed at 2011-05-20+15:42:26 with exit code 2 [ 2 tests 2 
errors ]

which seems a parser problem as the output of the program
/usr/bin/printf is broken if and only if it is used in the
way I've done this in my sjis.sh scriptlet:

   typeset printf=$(type -p printf 2>/dev/null)
   second=$(printf '%x' 92)
   export LANG=ja_JP.SJIS
   echo $(${printf} "\x81\x${second}")


   Werner

-- 
  "Having a smoking section in a restaurant is like having
          a peeing section in a swimming pool." -- Edward Burr
########################################################################
#                                                                      #
#   Copyright (c) 2007 SuSE Linux Products GmbH, Nuernberg, Germany    #
#                                                                      #
#   This library is free software; you can redistribute it and/or      #
#   modify it under the terms of the GNU Lesser General Public         #
#   License as published by the Free Software Foundation;              #
#   version 2.1 of the License.                                        #
#                                                                      #
#   This library is distributed in the hope that it will be useful,    #
#   but WITHOUT ANY WARRANTY; without even the implied warranty of     #
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      #
#   GNU Lesser General Public License at                               #
#   http://www.gnu.org/licenses/lgpl-2.1.html for more details         #
#                                                                      #
#   Author: Werner Fink <[email protected]>                               #
#                                                                      #
########################################################################

#
# Byte ranges for Shift-JIS encoding (hexadecimal):
# First byte:   81-9F, E0-EF
# Second byte:  40-7E, 80-FC
#
# Now test out some multi byte characters which
# include 7bit aka ASCII bytes with 0x81 0x{40-7E}
#

typeset -i chr=0
typeset -i err=0
typeset printf=$(type -p printf 2>/dev/null)

unset LC_ALL
unset LC_CTYPE
export LANG=ja_JP.SJIS

for second in $(seq 64 126); do
    let chr++
    second=$(printf '%x' ${second})
    mbchar="$(printf "\x81\x${second}")"
    if test -z "${mbchar}" ; then
        let err++               # ERROR in builtin printf
        echo ' builtin printf with \\x81\\x'${second} failed as result is empty
        continue
    fi
    if test -x "${printf}" ; then
        if test $(${printf} "\x81\x${second}") != ${mbchar} ; then
            let err++           # ERROR in builtin printf
            echo -n ' \\x81\\x'${second} 'failed with '
            echo -n $(${printf} "\x81\x${second}") '!= '
            echo ${mbchar}
            continue
        fi
    fi
    uq=$(echo ${mbchar})
    dq=$(echo "${mbchar}")
    test "$uq" != "$dq" && let err+=1
    test ${#uq} -ne 1 -o ${#dq} -ne 1 && let err+=1
done

if test $err -ne 0 ; then
    : err_exit
    : err_exit
    print -u2 -n "\t"
    print -u2 -r ${0##*/}[$LINENO]: "Shift-JIS encoding failed"
fi
exit $err
_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to