Update.
[glibc.git] / linuxthreads / tst-tls2.sh
blob0d13963d5e8ba0d801b5e198cd70a1f82f56879c
1 #!/bin/sh
3 common_objpfx=$1; shift
4 elf_objpfx=$1; shift
5 rtld_installed_name=$1; shift
6 logfile=$common_objpfx/linuxthreads/tst-tls2.out
8 # We have to find libc and linuxthreads
9 library_path=${common_objpfx}:${common_objpfx}linuxthreads
10 tst_tls1="${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
11 ${common_objpfx}/linuxthreads/tst-tls1"
13 LC_ALL=C
14 export LC_ALL
15 LANG=C
16 export LANG
18 > $logfile
19 fail=0
21 for aligned in a e f; do
22 echo "preload tst-tls1mod{$aligned,b,c,d}.so" >> $logfile
23 echo "===============" >> $logfile
24 LD_PRELOAD=`echo ${common_objpfx}linuxthreads/tst-tls1mod{$aligned,b,c,d}.so \
25 | sed 's/:$//;s/: /:/g'` ${tst_tls1} >> $logfile || fail=1
26 echo >> $logfile
28 echo "preload tst-tls1mod{b,$aligned,c,d}.so" >> $logfile
29 echo "===============" >> $logfile
30 LD_PRELOAD=`echo ${common_objpfx}linuxthreads/tst-tls1mod{b,$aligned,c,d}.so \
31 | sed 's/:$//;s/: /:/g'` ${tst_tls1} >> $logfile || fail=1
32 echo >> $logfile
34 echo "preload tst-tls1mod{b,c,d,$aligned}.so" >> $logfile
35 echo "===============" >> $logfile
36 LD_PRELOAD=`echo ${common_objpfx}linuxthreads/tst-tls1mod{b,c,d,$aligned}.so \
37 | sed 's/:$//;s/: /:/g'` ${tst_tls1} >> $logfile || fail=1
38 echo >> $logfile
39 done
41 echo "preload tst-tls1mod{d,a,b,c,e}" >> $logfile
42 echo "===============" >> $logfile
43 LD_PRELOAD=`echo ${common_objpfx}linuxthreads/tst-tls1mod{d,a,b,c,e}.so \
44 | sed 's/:$//;s/: /:/g'` ${tst_tls1} >> $logfile || fail=1
45 echo >> $logfile
47 echo "preload tst-tls1mod{d,a,b,e,f}" >> $logfile
48 echo "===============" >> $logfile
49 LD_PRELOAD=`echo ${common_objpfx}linuxthreads/tst-tls1mod{d,a,b,e,f}.so \
50 | sed 's/:$//;s/: /:/g'` ${tst_tls1} >> $logfile || fail=1
51 echo >> $logfile
53 exit $fail