]> git.ipfire.org Git - thirdparty/glibc.git/blame - nptl/tst-tls6.sh
Add per-thread cache to malloc
[thirdparty/glibc.git] / nptl / tst-tls6.sh
CommitLineData
48d0341c 1#!/bin/bash
9a9028b1 2# A tls test.
bfff8b1b 3# Copyright (C) 2003-2017 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
20set -e
21
26c6ab80 22common_objpfx=$1; shift
740b3dbe 23test_via_rtld_prefix=$1; shift
cc1290d0 24test_wrapper_env=$1; shift
8540f6d2 25run_program_env=$1; shift
26c6ab80
JJ
26logfile=$common_objpfx/nptl/tst-tls6.out
27
28# We have to find libc and nptl
29library_path=${common_objpfx}:${common_objpfx}nptl
740b3dbe 30tst_tls5="${test_via_rtld_prefix} ${common_objpfx}/nptl/tst-tls5"
26c6ab80 31
26c6ab80
JJ
32> $logfile
33fail=0
34
35for aligned in a e f; do
36 echo "preload tst-tls5mod{$aligned,b,c,d}.so" >> $logfile
37 echo "===============" >> $logfile
cc1290d0 38 ${test_wrapper_env} \
686554bf 39 ${run_program_env} \
cc1290d0
JM
40 LD_PRELOAD="`echo ${common_objpfx}nptl/tst-tls5mod{$aligned,b,c,d}.so \
41 | sed 's/:$//;s/: /:/g'`" ${tst_tls5} >> $logfile || fail=1
26c6ab80
JJ
42 echo >> $logfile
43
44 echo "preload tst-tls5mod{b,$aligned,c,d}.so" >> $logfile
45 echo "===============" >> $logfile
cc1290d0 46 ${test_wrapper_env} \
686554bf 47 ${run_program_env} \
cc1290d0
JM
48 LD_PRELOAD="`echo ${common_objpfx}nptl/tst-tls5mod{b,$aligned,c,d}.so \
49 | sed 's/:$//;s/: /:/g'`" ${tst_tls5} >> $logfile || fail=1
26c6ab80
JJ
50 echo >> $logfile
51
52 echo "preload tst-tls5mod{b,c,d,$aligned}.so" >> $logfile
53 echo "===============" >> $logfile
cc1290d0 54 ${test_wrapper_env} \
686554bf 55 ${run_program_env} \
cc1290d0
JM
56 LD_PRELOAD="`echo ${common_objpfx}nptl/tst-tls5mod{b,c,d,$aligned}.so \
57 | sed 's/:$//;s/: /:/g'`" ${tst_tls5} >> $logfile || fail=1
26c6ab80
JJ
58 echo >> $logfile
59done
60
61echo "preload tst-tls5mod{d,a,b,c,e}" >> $logfile
62echo "===============" >> $logfile
cc1290d0 63${test_wrapper_env} \
686554bf 64${run_program_env} \
cc1290d0
JM
65LD_PRELOAD="`echo ${common_objpfx}nptl/tst-tls5mod{d,a,b,c,e}.so \
66 | sed 's/:$//;s/: /:/g'`" ${tst_tls5} >> $logfile || fail=1
26c6ab80
JJ
67echo >> $logfile
68
69echo "preload tst-tls5mod{d,a,b,e,f}" >> $logfile
70echo "===============" >> $logfile
cc1290d0 71${test_wrapper_env} \
686554bf 72${run_program_env} \
cc1290d0
JM
73LD_PRELOAD="`echo ${common_objpfx}nptl/tst-tls5mod{d,a,b,e,f}.so \
74 | sed 's/:$//;s/: /:/g'`" ${tst_tls5} >> $logfile || fail=1
26c6ab80
JJ
75echo >> $logfile
76
77exit $fail