|
Packit |
6c4009 |
#!/bin/bash
|
|
Packit |
6c4009 |
# A tls test.
|
|
Packit |
6c4009 |
# Copyright (C) 2003-2018 Free Software Foundation, Inc.
|
|
Packit |
6c4009 |
# This file is part of the GNU C Library.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# The GNU C Library is free software; you can redistribute it and/or
|
|
Packit |
6c4009 |
# modify it under the terms of the GNU Lesser General Public
|
|
Packit |
6c4009 |
# License as published by the Free Software Foundation; either
|
|
Packit |
6c4009 |
# version 2.1 of the License, or (at your option) any later version.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# The GNU C Library is distributed in the hope that it will be useful,
|
|
Packit |
6c4009 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
6c4009 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
6c4009 |
# Lesser General Public License for more details.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# You should have received a copy of the GNU Lesser General Public
|
|
Packit |
6c4009 |
# License along with the GNU C Library; if not, see
|
|
Packit |
6c4009 |
# <http://www.gnu.org/licenses/>.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
set -e
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
common_objpfx=$1; shift
|
|
Packit |
6c4009 |
test_via_rtld_prefix=$1; shift
|
|
Packit |
6c4009 |
test_wrapper_env=$1; shift
|
|
Packit |
6c4009 |
run_program_env=$1; shift
|
|
Packit |
6c4009 |
logfile=$common_objpfx/nptl/tst-tls6.out
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# We have to find libc and nptl
|
|
Packit |
6c4009 |
library_path=${common_objpfx}:${common_objpfx}nptl
|
|
Packit |
6c4009 |
tst_tls5="${test_via_rtld_prefix} ${common_objpfx}/nptl/tst-tls5"
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
> $logfile
|
|
Packit |
6c4009 |
fail=0
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
for aligned in a e f; do
|
|
Packit |
6c4009 |
echo "preload tst-tls5mod{$aligned,b,c,d}.so" >> $logfile
|
|
Packit |
6c4009 |
echo "===============" >> $logfile
|
|
Packit |
6c4009 |
${test_wrapper_env} \
|
|
Packit |
6c4009 |
${run_program_env} \
|
|
Packit |
6c4009 |
LD_PRELOAD="`echo ${common_objpfx}nptl/tst-tls5mod{$aligned,b,c,d}.so \
|
|
Packit |
6c4009 |
| sed 's/:$//;s/: /:/g'`" ${tst_tls5} >> $logfile || fail=1
|
|
Packit |
6c4009 |
echo >> $logfile
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
echo "preload tst-tls5mod{b,$aligned,c,d}.so" >> $logfile
|
|
Packit |
6c4009 |
echo "===============" >> $logfile
|
|
Packit |
6c4009 |
${test_wrapper_env} \
|
|
Packit |
6c4009 |
${run_program_env} \
|
|
Packit |
6c4009 |
LD_PRELOAD="`echo ${common_objpfx}nptl/tst-tls5mod{b,$aligned,c,d}.so \
|
|
Packit |
6c4009 |
| sed 's/:$//;s/: /:/g'`" ${tst_tls5} >> $logfile || fail=1
|
|
Packit |
6c4009 |
echo >> $logfile
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
echo "preload tst-tls5mod{b,c,d,$aligned}.so" >> $logfile
|
|
Packit |
6c4009 |
echo "===============" >> $logfile
|
|
Packit |
6c4009 |
${test_wrapper_env} \
|
|
Packit |
6c4009 |
${run_program_env} \
|
|
Packit |
6c4009 |
LD_PRELOAD="`echo ${common_objpfx}nptl/tst-tls5mod{b,c,d,$aligned}.so \
|
|
Packit |
6c4009 |
| sed 's/:$//;s/: /:/g'`" ${tst_tls5} >> $logfile || fail=1
|
|
Packit |
6c4009 |
echo >> $logfile
|
|
Packit |
6c4009 |
done
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
echo "preload tst-tls5mod{d,a,b,c,e}" >> $logfile
|
|
Packit |
6c4009 |
echo "===============" >> $logfile
|
|
Packit |
6c4009 |
${test_wrapper_env} \
|
|
Packit |
6c4009 |
${run_program_env} \
|
|
Packit |
6c4009 |
LD_PRELOAD="`echo ${common_objpfx}nptl/tst-tls5mod{d,a,b,c,e}.so \
|
|
Packit |
6c4009 |
| sed 's/:$//;s/: /:/g'`" ${tst_tls5} >> $logfile || fail=1
|
|
Packit |
6c4009 |
echo >> $logfile
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
echo "preload tst-tls5mod{d,a,b,e,f}" >> $logfile
|
|
Packit |
6c4009 |
echo "===============" >> $logfile
|
|
Packit |
6c4009 |
${test_wrapper_env} \
|
|
Packit |
6c4009 |
${run_program_env} \
|
|
Packit |
6c4009 |
LD_PRELOAD="`echo ${common_objpfx}nptl/tst-tls5mod{d,a,b,e,f}.so \
|
|
Packit |
6c4009 |
| sed 's/:$//;s/: /:/g'`" ${tst_tls5} >> $logfile || fail=1
|
|
Packit |
6c4009 |
echo >> $logfile
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
exit $fail
|