x86_64: Fix missing wcsncat function definition without multiarch (x86-64-v4)
[glibc.git] / elf / tst-ldconfig-soname.sh
blob39b36a8aee3c1653bc600e5afa129a88a6a9e875
1 #!/bin/sh
2 # Test that ldconfig creates symlinks according to the library's soname
3 # (and in particular, does not create symlinks for libraries without a soname)
4 # Copyright (C) 2000-2024 Free Software Foundation, Inc.
5 # Copyright The GNU Toolchain Authors.
6 # This file is part of the GNU C Library.
8 # The GNU C Library is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU Lesser General Public
10 # License as published by the Free Software Foundation; either
11 # version 2.1 of the License, or (at your option) any later version.
13 # The GNU C Library is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 # Lesser General Public License for more details.
18 # You should have received a copy of the GNU Lesser General Public
19 # License along with the GNU C Library; if not, see
20 # <https://www.gnu.org/licenses/>.
22 set -ex
24 common_objpfx=$1
25 test_wrapper_env=$2
26 run_program_env=$3
28 testroot="${common_objpfx}elf/bug30125-test-directory"
29 cleanup () {
30 rm -rf "$testroot"
32 trap cleanup 0
34 rm -rf "$testroot"
35 mkdir -p $testroot/lib
36 cp "${common_objpfx}elf/tst-ldconfig-soname-lib-with-soname.so" \
37 $testroot/lib/libtst-ldconfig-soname-lib-with-soname.so.1.2.3
38 cp "${common_objpfx}elf/tst-ldconfig-soname-lib-without-soname.so" \
39 $testroot/lib/libtst-ldconfig-soname-lib-without-soname.so.1.2.3
41 ${test_wrapper_env} \
42 ${run_program_env} \
43 ${common_objpfx}elf/ldconfig -vn $testroot/lib
45 LINKS=$(cd $testroot/lib && find . -type l)
46 if [ "$LINKS" != "./libtst-ldconfig-soname-lib-with-soname.so.1" ]; then
47 echo "error: $0 - extra symlinks found"
48 exit 1