[LTP] [PATCH 3/3] lib/tst_device.c: add support for overlayfs
Petr Vorel
pvorel@suse.cz
Fri Feb 7 12:23:53 CET 2025
Hi Jeff,
> Add checks for overlayfs in tst_find_backing_dev. As with btrfs, only
> a single device is checked (the upper one) and returned from
> tst_find_backing_dev().
...
> +++ b/INSTALL
> @@ -6,15 +6,15 @@ package in any Linux distribution (no specific version is required).
> Debian / Ubuntu
> - # apt install gcc git make pkgconf autoconf automake bison flex m4 linux-headers-$(uname -r) libc6-dev
> + # apt install gcc git make pkgconf autoconf automake bison flex m4 linux-headers-$(uname -r) libc6-dev libmount-dev
> openSUSE / SLES
> - # zypper install gcc git make pkg-config autoconf automake bison flex m4 linux-glibc-devel glibc-devel
> + # zypper install gcc git make pkg-config autoconf automake bison flex m4 linux-glibc-devel glibc-devel libmount-devel
> Fedora / CentOS / RHEL
> - # yum install gcc git make pkgconf autoconf automake bison flex m4 kernel-headers glibc-headers
> + # yum install gcc git make pkgconf autoconf automake bison flex m4 kernel-headers glibc-headers libmount-devel
FYI it's good to update docs, but this is not enough.
You need to add libmount devel packages to ci/*.sh scripts otherwise it fails,
see [1].
We have note about ci/*.sh in INSTALL, maybe we should explicitly state that
build dependencies must be updated there.
I updated it for you (see diff below or use branch
jmoyer/tst_device-overlayfs.fixes in my fork [2]), but it still not enough [3].
It is reproducible even locally:
$ make autotools && ./configure
$ cd lib && make
AR libltp_internal.a
RANLIB libltp_internal.a
/usr/bin/ld: cannot find -lltp: No such file or directory
collect2: error: ld returned 1 exit status
make[1]: *** [../../include/mk/rules.mk:48: test01] Error 1
make[1]: *** Waiting for unfinished jobs....
/usr/bin/ld: cannot find -lltp: No such file or directory
collect2: error: ld returned 1 exit status
make[1]: *** [../../include/mk/rules.mk:48: test02] Error 1
/usr/bin/ld: cannot find -lltp: No such file or directory
collect2: error: ld returned 1 exit status
make[1]: *** [../../include/mk/rules.mk:48: test04] Error 1
/usr/bin/ld: cannot find -lltp: No such file or directory
collect2: error: ld returned 1 exit status
make[1]: *** [../../include/mk/rules.mk:48: test03] Error 1
make: *** [../include/mk/generic_trunk_target.inc:92: all] Error 2
> --- /dev/null
> +++ b/lib/libltp.a
> @@ -0,0 +1 @@
> +INPUT (libltp_internal.a -lmount)
'rm -fv lib/libltp.a' is required to apply the patchset.
Kind regards,
Petr
[1] https://github.com/pevik/ltp/actions/runs/13198563478
[2] https://github.com/pevik/ltp/tree/refs/heads/jmoyer/tst_device-overlayfs.fixes
[3] https://github.com/pevik/ltp/actions/runs/13198676398/job/36845555749
Fix CI for missing packages.
diff --git ci/alpine.sh ci/alpine.sh
index 93acd6267b..26a3775ac6 100755
--- ci/alpine.sh
+++ ci/alpine.sh
@@ -26,7 +26,8 @@ apk add \
numactl-dev \
openssl-dev \
perl-json \
- pkgconfig
+ pkgconfig \
+ util-linux-dev
cat /etc/os-release
diff --git ci/debian.cross-compile.sh ci/debian.cross-compile.sh
index 95cf11da22..18ee44ef58 100755
--- ci/debian.cross-compile.sh
+++ ci/debian.cross-compile.sh
@@ -21,4 +21,5 @@ apt install -y --no-install-recommends \
gcc-${gcc_arch}-linux-gnu \
libc6-dev-${ARCH}-cross \
libmnl-dev:$ARCH \
+ libmount-dev:$ARCH \
libtirpc-dev:$ARCH
diff --git ci/debian.i386.sh ci/debian.i386.sh
index 2846053098..b0f916d05f 100755
--- ci/debian.i386.sh
+++ ci/debian.i386.sh
@@ -14,6 +14,7 @@ apt install -y --no-install-recommends \
libc6-dev-i386 \
libc6:i386 \
libkeyutils-dev:i386 \
+ libmount-dev:i386 \
libnuma-dev:i386 \
libssl-dev:i386 \
libtirpc-dev:i386 \
diff --git ci/debian.sh ci/debian.sh
index fc1c1b3ec6..5fe1bf18da 100755
--- ci/debian.sh
+++ ci/debian.sh
@@ -27,6 +27,7 @@ pkg_minimal="
git
iproute2
libc6-dev
+ libmount-dev
libtirpc-dev
linux-libc-dev
lsb-release
diff --git ci/fedora.sh ci/fedora.sh
index 623dbb5cb6..244e2dae37 100755
--- ci/fedora.sh
+++ ci/fedora.sh
@@ -15,6 +15,7 @@ $yum \
findutils \
iproute \
numactl-devel \
+ libmount-devel \
libtirpc \
libtirpc-devel \
perl-JSON \
More information about the ltp
mailing list