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/>.
28 testroot
="${common_objpfx}elf/bug30125-test-directory"
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
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"