This is the mail archive of the libc-alpha@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]

Re: Shell scripts requiring bash


Hi!

On Mon, 19 Mar 2012 16:17:56 -0400, David Miller <davem@davemloft.net> wrote:
> From: Thomas Schwinge <thomas@codesourcery.com>
> Date: Mon, 19 Mar 2012 21:11:06 +0100
> 
> > With /bin/sh being dash, the following compares a pristine run to one
> > with SHELL=/bin/bash passed.
> 
> These are all DASH bugs which have subsequently been fixed.

Thanks for the pointer, upgrading dash indeed helps.


> [...].  The dash in debian testing has all the other bugs fixed.

> [...].  And that makes all the remaining libc test failures
> go away.
> 
> All the real uses of bash specific features have been fixed by myself
> and others over the years.  I do all of my libc development using a
> machine that has dash as /bin/sh so I will notice and fix any new
> issues that crop up.
> 
> All of our scripts in the libc tree should be POSIX shell scripts and
> therefore there is no reason to require BASH explicitly anywhere.

Even though you repeated it five times, your understanding of *all* is
different from mine ;-) -- I'm still seeing the following issues:

|     -/bin/sh -e tst-tls6.sh /home/thomas/tmp/source/glibc/glibc.build/ /home/thomas/tmp/source/glibc/glibc.build/elf/ \
|     +/bin/bash -e tst-tls6.sh /home/thomas/tmp/source/glibc/glibc.build/ /home/thomas/tmp/source/glibc/glibc.build/elf/ \
|                         ld-linux-x86-64.so.2
|     -ERROR: ld.so: object '/home/thomas/tmp/source/glibc/glibc.build/nptl/tst-tls5mod{a,b,c,d}.so' from LD_PRELOAD cannot be preloaded: ignored.
|     -ERROR: ld.so: object '/home/thomas/tmp/source/glibc/glibc.build/nptl/tst-tls5mod{b,a,c,d}.so' from LD_PRELOAD cannot be preloaded: ignored.
|     -ERROR: ld.so: object '/home/thomas/tmp/source/glibc/glibc.build/nptl/tst-tls5mod{b,c,d,a}.so' from LD_PRELOAD cannot be preloaded: ignored.
|     -ERROR: ld.so: object '/home/thomas/tmp/source/glibc/glibc.build/nptl/tst-tls5mod{e,b,c,d}.so' from LD_PRELOAD cannot be preloaded: ignored.
|     -ERROR: ld.so: object '/home/thomas/tmp/source/glibc/glibc.build/nptl/tst-tls5mod{b,e,c,d}.so' from LD_PRELOAD cannot be preloaded: ignored.
|     -ERROR: ld.so: object '/home/thomas/tmp/source/glibc/glibc.build/nptl/tst-tls5mod{b,c,d,e}.so' from LD_PRELOAD cannot be preloaded: ignored.
|     -ERROR: ld.so: object '/home/thomas/tmp/source/glibc/glibc.build/nptl/tst-tls5mod{f,b,c,d}.so' from LD_PRELOAD cannot be preloaded: ignored.
|     -ERROR: ld.so: object '/home/thomas/tmp/source/glibc/glibc.build/nptl/tst-tls5mod{b,f,c,d}.so' from LD_PRELOAD cannot be preloaded: ignored.
|     -ERROR: ld.so: object '/home/thomas/tmp/source/glibc/glibc.build/nptl/tst-tls5mod{b,c,d,f}.so' from LD_PRELOAD cannot be preloaded: ignored.
|     -ERROR: ld.so: object '/home/thomas/tmp/source/glibc/glibc.build/nptl/tst-tls5mod{d,a,b,c,e}.so' from LD_PRELOAD cannot be preloaded: ignored.
|     -ERROR: ld.so: object '/home/thomas/tmp/source/glibc/glibc.build/nptl/tst-tls5mod{d,a,b,e,f}.so' from LD_PRELOAD cannot be preloaded: ignored.
|     +/home/thomas/tmp/source/glibc/glibc.build//nptl/tst-tls5: symbol lookup error: /home/thomas/tmp/source/glibc/glibc.build/nptl/tst-tls5modd.so: undefined symbol: tls_registry
|     +/home/thomas/tmp/source/glibc/glibc.build//nptl/tst-tls5: symbol lookup error: /home/thomas/tmp/source/glibc/glibc.build/nptl/tst-tls5modd.so: undefined symbol: tls_registry
|     +/home/thomas/tmp/source/glibc/glibc.build//nptl/tst-tls5: symbol lookup error: /home/thomas/tmp/source/glibc/glibc.build/nptl/tst-tls5moda.so: undefined symbol: tls_registry
|     +/home/thomas/tmp/source/glibc/glibc.build//nptl/tst-tls5: symbol lookup error: /home/thomas/tmp/source/glibc/glibc.build/nptl/tst-tls5modd.so: undefined symbol: tls_registry
|     +/home/thomas/tmp/source/glibc/glibc.build//nptl/tst-tls5: symbol lookup error: /home/thomas/tmp/source/glibc/glibc.build/nptl/tst-tls5modd.so: undefined symbol: tls_registry
|     +/home/thomas/tmp/source/glibc/glibc.build//nptl/tst-tls5: symbol lookup error: /home/thomas/tmp/source/glibc/glibc.build/nptl/tst-tls5mode.so: undefined symbol: tls_registry
|     +/home/thomas/tmp/source/glibc/glibc.build//nptl/tst-tls5: symbol lookup error: /home/thomas/tmp/source/glibc/glibc.build/nptl/tst-tls5modd.so: undefined symbol: tls_registry
|     +/home/thomas/tmp/source/glibc/glibc.build//nptl/tst-tls5: symbol lookup error: /home/thomas/tmp/source/glibc/glibc.build/nptl/tst-tls5modd.so: undefined symbol: tls_registry
|     +/home/thomas/tmp/source/glibc/glibc.build//nptl/tst-tls5: symbol lookup error: /home/thomas/tmp/source/glibc/glibc.build/nptl/tst-tls5modf.so: undefined symbol: tls_registry
|     +/home/thomas/tmp/source/glibc/glibc.build//nptl/tst-tls5: symbol lookup error: /home/thomas/tmp/source/glibc/glibc.build/nptl/tst-tls5mode.so: undefined symbol: tls_registry
|     +/home/thomas/tmp/source/glibc/glibc.build//nptl/tst-tls5: symbol lookup error: /home/thomas/tmp/source/glibc/glibc.build/nptl/tst-tls5modf.so: undefined symbol: tls_registry
|     +make[2]: *** [/home/thomas/tmp/source/glibc/glibc.build/nptl/tst-tls6.out] Error 1
| 
| Diff of tst-tls6.out:
| 
|     diff -ru glibc.build.dash.pristine/nptl/tst-tls6.out glibc.build.pristine/nptl/tst-tls6.out
|     --- glibc.build.dash.pristine/nptl/tst-tls6.out 2012-03-19 13:17:36.385772834 +0100
|     +++ glibc.build.pristine/nptl/tst-tls6.out      2012-03-19 15:46:33.598180736 +0100
|     @@ -1,44 +1,33 @@
|      preload tst-tls5mod{a,b,c,d}.so
|      ===============
|     -pthread_self () = 0x2b4580410700, size 2304, align 64
|      
|      preload tst-tls5mod{b,a,c,d}.so
|      ===============
|     -pthread_self () = 0x2b54fc25b700, size 2304, align 64
|      
|     [...]
| 
| This test gives different errors with dash vs. bash (not yet investigated
| whether any of these are expected).  In the bash case the test invocation
| actually fails, in the dash case it succeeds.


|     -/bin/sh -e run-conformtest.sh /home/thomas/tmp/source/glibc/glibc.build/conform/ /usr/bin/perl 'gcc -U_FORTIFY_SOURCE -fno-stack-protector' \
|     +/bin/bash -e run-conformtest.sh /home/thomas/tmp/source/glibc/glibc.build/conform/ /usr/bin/perl 'gcc -U_FORTIFY_SOURCE -fno-stack-protector' \
|               '-I../include -I/home/thomas/tmp/source/glibc/glibc.build -I../sysdeps/x86_64/elf -I../nptl/sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/wordsize-64 -I../nptl/sysdeps/unix/sys
|     -run-conformtest.sh: 8: Syntax error: "(" unexpected
|     -make[2]: [/home/thomas/tmp/source/glibc/glibc.build/conform/run-conformtest.out] Error 2 (ignored)
|     +ISO...
|     +ISO99...
|     +[...]
|     +make[2]: [/home/thomas/tmp/source/glibc/glibc.build/conform/run-conformtest.out] Error 1 (ignored)
| 
| run-conformtest.sh uses arrays, and thus fails if invoked with dash.


|     -/bin/sh -e ../sysdeps/x86_64/tst-xmmymm.sh /home/thomas/tmp/source/glibc/glibc.build/elf/ > /home/thomas/tmp/source/glibc/glibc.build/elf/tst-xmmymm.out
|     -../sysdeps/x86_64/tst-xmmymm.sh: 18: declare: not found
|     -make[2]: *** [/home/thomas/tmp/source/glibc/glibc.build/elf/tst-xmmymm.out] Error 127
|     +/bin/bash -e ../sysdeps/x86_64/tst-xmmymm.sh /home/thomas/tmp/source/glibc/glibc.build/elf/ > /home/thomas/tmp/source/glibc/glibc.build/elf/tst-xmmymm.out
| 
| Again arrays.


GrÃÃe,
 Thomas

Attachment: pgp00000.pgp
Description: PGP signature


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