This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/18418] New: Failure of stdlib/tst-setcontext3.sh with dash shell


https://sourceware.org/bugzilla/show_bug.cgi?id=18418

            Bug ID: 18418
           Summary: Failure of stdlib/tst-setcontext3.sh with dash shell
           Product: glibc
           Version: 2.21
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: adhemerval.zanella at linaro dot org
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

The stdlib/tst-setcontext3 test script fails when invoked with dash:

$ /bin/sh /home/azanella/Projects/glibc/glibc-git/stdlib/tst-setcontext3.sh
/home/azanella/Projects/glibc/glibc-git-build-m64/ ' env'                 
'GCONV_PATH=/home/azanella/Projects/glibc/glibc-git-build-m64/iconvdata
LOCPATH=/home/azanella/Projects/glibc/glibc-git-build-m64/localedata LC_ALL=C'
' /home/azanella/Projects/glibc/glibc-git-build-m64/elf/ld-linux-x86-64.so.2
--library-path
/home/azanella/Projects/glibc/glibc-git-build-m64:/home/azanella/Projects/glibc/glibc-git-build-m64/math:/home/azanella/Projects/glibc/glibc-git-build-m64/elf:/home/azanella/Projects/glibc/glibc-git-build-m64/dlfcn:/home/azanella/Projects/glibc/glibc-git-build-m64/nss:/home/azanella/Projects/glibc/glibc-git-build-m64/nis:/home/azanella/Projects/glibc/glibc-git-build-m64/rt:/home/azanella/Projects/glibc/glibc-git-build-m64/resolv:/home/azanella/Projects/glibc/glibc-git-build-m64/crypt:/home/azanella/Projects/glibc/glibc-git-build-m64/mathvec:/home/azanella/Projects/glibc/glibc-git-build-m64/nptl'
                 /home/azanella/Projects/glibc/glibc-git-build-m64/stdlib/
/home/azanella/Projects/glibc/glibc-git/stdlib/tst-setcontext3.sh: 32:
/home/azanella/Projects/glibc/glibc-git/stdlib/tst-setcontext3.sh: Syntax
error: "(" unexpected

This is due it uses the non-portable array semantic:

 32 tempfiles=()
 33 cleanup() {
 34   rm -f "${tempfiles[@]}"
 35 }
 36 trap cleanup 0
 37 
 38 tempfile=$(mktemp "tst-setcontext3.XXXXXXXXXX")
 39 tempfiles+=("$tempfile")

Since it creates just one file, a possible solution is just rm 'tempfile'
directly.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]