Blame elf/tst-rtld-preload.sh
|
Packit Service |
0c6af5 |
#!/bin/sh
|
|
Packit Service |
0c6af5 |
# Test --preload argument ld.so.
|
|
Packit Service |
0c6af5 |
# Copyright (C) 2019 Free Software Foundation, Inc.
|
|
Packit Service |
0c6af5 |
# This file is part of the GNU C Library.
|
|
Packit Service |
0c6af5 |
#
|
|
Packit Service |
0c6af5 |
# The GNU C Library is free software; you can redistribute it and/or
|
|
Packit Service |
0c6af5 |
# modify it under the terms of the GNU Lesser General Public
|
|
Packit Service |
0c6af5 |
# License as published by the Free Software Foundation; either
|
|
Packit Service |
0c6af5 |
# version 2.1 of the License, or (at your option) any later version.
|
|
Packit Service |
0c6af5 |
#
|
|
Packit Service |
0c6af5 |
# The GNU C Library is distributed in the hope that it will be useful,
|
|
Packit Service |
0c6af5 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
0c6af5 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
0c6af5 |
# Lesser General Public License for more details.
|
|
Packit Service |
0c6af5 |
#
|
|
Packit Service |
0c6af5 |
# You should have received a copy of the GNU Lesser General Public
|
|
Packit Service |
0c6af5 |
# License along with the GNU C Library; if not, see
|
|
Packit Service |
0c6af5 |
# <http://www.gnu.org/licenses/>.
|
|
Packit Service |
0c6af5 |
|
|
Packit Service |
0c6af5 |
set -e
|
|
Packit Service |
0c6af5 |
|
|
Packit Service |
0c6af5 |
rtld=$1
|
|
Packit Service |
0c6af5 |
test_program=$2
|
|
Packit Service |
0c6af5 |
test_wrapper=$3
|
|
Packit Service |
0c6af5 |
test_wrapper_env=$4
|
|
Packit Service |
0c6af5 |
run_program_env=$5
|
|
Packit Service |
0c6af5 |
library_path=$6
|
|
Packit Service |
0c6af5 |
preload=$7
|
|
Packit Service |
0c6af5 |
|
|
Packit Service |
0c6af5 |
echo "# [${test_wrapper}] [$rtld] [--library-path] [$library_path]" \
|
|
Packit Service |
0c6af5 |
"[--preload] [$preload] [$test_program]"
|
|
Packit Service |
0c6af5 |
${test_wrapper_env} \
|
|
Packit Service |
0c6af5 |
${run_program_env} \
|
|
Packit Service |
0c6af5 |
${test_wrapper} $rtld --library-path "$library_path" \
|
|
Packit Service |
0c6af5 |
--preload "$preload" $test_program 2>&1 && rc=0 || rc=$?
|
|
Packit Service |
0c6af5 |
echo "# exit status $rc"
|
|
Packit Service |
0c6af5 |
|
|
Packit Service |
0c6af5 |
exit $rc
|