]>
Commit | Line | Data |
---|---|---|
9a9028b1 DL |
1 | #! /bin/sh |
2 | # A tls test. | |
57c69bef | 3 | # Copyright (C) 2003-2012 Free Software Foundation, Inc. |
9a9028b1 DL |
4 | # This file is part of the GNU C Library. |
5 | ||
6 | # The GNU C Library is free software; you can redistribute it and/or | |
7 | # modify it under the terms of the GNU Lesser General Public | |
8 | # License as published by the Free Software Foundation; either | |
9 | # version 2.1 of the License, or (at your option) any later version. | |
10 | ||
11 | # The GNU C Library is distributed in the hope that it will be useful, | |
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 | # Lesser General Public License for more details. | |
15 | ||
16 | # You should have received a copy of the GNU Lesser General Public | |
17 | # License along with the GNU C Library; if not, see | |
18 | # <http://www.gnu.org/licenses/>. | |
26c6ab80 | 19 | |
57c69bef DL |
20 | set -e |
21 | ||
26c6ab80 JJ |
22 | common_objpfx=$1; shift |
23 | elf_objpfx=$1; shift | |
24 | rtld_installed_name=$1; shift | |
cc1290d0 | 25 | test_wrapper_env=$1; shift |
26c6ab80 JJ |
26 | logfile=$common_objpfx/nptl/tst-tls6.out |
27 | ||
28 | # We have to find libc and nptl | |
29 | library_path=${common_objpfx}:${common_objpfx}nptl | |
30 | tst_tls5="${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ | |
31 | ${common_objpfx}/nptl/tst-tls5" | |
32 | ||
33 | LC_ALL=C | |
34 | export LC_ALL | |
35 | LANG=C | |
36 | export LANG | |
37 | ||
38 | > $logfile | |
39 | fail=0 | |
40 | ||
41 | for aligned in a e f; do | |
42 | echo "preload tst-tls5mod{$aligned,b,c,d}.so" >> $logfile | |
43 | echo "===============" >> $logfile | |
cc1290d0 JM |
44 | ${test_wrapper_env} \ |
45 | LD_PRELOAD="`echo ${common_objpfx}nptl/tst-tls5mod{$aligned,b,c,d}.so \ | |
46 | | sed 's/:$//;s/: /:/g'`" ${tst_tls5} >> $logfile || fail=1 | |
26c6ab80 JJ |
47 | echo >> $logfile |
48 | ||
49 | echo "preload tst-tls5mod{b,$aligned,c,d}.so" >> $logfile | |
50 | echo "===============" >> $logfile | |
cc1290d0 JM |
51 | ${test_wrapper_env} \ |
52 | LD_PRELOAD="`echo ${common_objpfx}nptl/tst-tls5mod{b,$aligned,c,d}.so \ | |
53 | | sed 's/:$//;s/: /:/g'`" ${tst_tls5} >> $logfile || fail=1 | |
26c6ab80 JJ |
54 | echo >> $logfile |
55 | ||
56 | echo "preload tst-tls5mod{b,c,d,$aligned}.so" >> $logfile | |
57 | echo "===============" >> $logfile | |
cc1290d0 JM |
58 | ${test_wrapper_env} \ |
59 | LD_PRELOAD="`echo ${common_objpfx}nptl/tst-tls5mod{b,c,d,$aligned}.so \ | |
60 | | sed 's/:$//;s/: /:/g'`" ${tst_tls5} >> $logfile || fail=1 | |
26c6ab80 JJ |
61 | echo >> $logfile |
62 | done | |
63 | ||
64 | echo "preload tst-tls5mod{d,a,b,c,e}" >> $logfile | |
65 | echo "===============" >> $logfile | |
cc1290d0 JM |
66 | ${test_wrapper_env} \ |
67 | LD_PRELOAD="`echo ${common_objpfx}nptl/tst-tls5mod{d,a,b,c,e}.so \ | |
68 | | sed 's/:$//;s/: /:/g'`" ${tst_tls5} >> $logfile || fail=1 | |
26c6ab80 JJ |
69 | echo >> $logfile |
70 | ||
71 | echo "preload tst-tls5mod{d,a,b,e,f}" >> $logfile | |
72 | echo "===============" >> $logfile | |
cc1290d0 JM |
73 | ${test_wrapper_env} \ |
74 | LD_PRELOAD="`echo ${common_objpfx}nptl/tst-tls5mod{d,a,b,e,f}.so \ | |
75 | | sed 's/:$//;s/: /:/g'`" ${tst_tls5} >> $logfile || fail=1 | |
26c6ab80 JJ |
76 | echo >> $logfile |
77 | ||
78 | exit $fail |