[LTP] [PATCH v3 2/2] tst_format_device.sh: Add e2fsprogs package for CI test
Wei Gao
wegao@suse.com
Sat Nov 1 02:20:22 CET 2025
For alpine platform we should mount /dev/loop device before df check.
Otherwise following error will be triggered
runtest TINFO: * shell/tst_format_device.sh
tst_format_device 1 TINFO: Running: tst_format_device.sh
tst_format_device 1 TINFO: Tested kernel: Linux 0ba9f024d6b7 6.11.0-1018-azure #18~24.04.1-Ubuntu SMP Sat Jun 28 04:46:03 UTC 2025 x86_64 Linux
tst_format_device 1 TINFO: Using /tmp/LTP_tst_format_device.XXXXOajpgN as tmpdir (UNKNOWN filesystem)
tst_device.c:98: TINFO: Found free device 0 '/dev/loop0'
tst_format_device 1 TINFO: Formatting ext2 with opts='-b 1024 /dev/loop0 5m'
tst_format_device 1 TINFO: timeout per run is 0h 5m 0s
tst_format_device 1 TPASS: device formatted
df: /dev/loop0: can't find mount point
tst_format_device 2 TFAIL: df /dev/loop0 | grep -q /dev failed unexpectedly
tst_format_device 3 TINFO: AppArmor enabled, this may affect test results
tst_format_device 3 TINFO: it can be disabled with TST_DISABLE_APPARMOR=1 (requires super/root)
tst_format_device 3 TINFO: loaded AppArmor profiles: none
Signed-off-by: Wei Gao <wegao@suse.com>
---
ci/alpine.sh | 1 +
ci/debian.sh | 1 +
ci/fedora.sh | 1 +
ci/tumbleweed.sh | 1 +
lib/newlib_tests/shell/tst_format_device.sh | 1 +
5 files changed, 5 insertions(+)
diff --git a/ci/alpine.sh b/ci/alpine.sh
index 254f4aaec..f3a1bf528 100755
--- a/ci/alpine.sh
+++ b/ci/alpine.sh
@@ -25,6 +25,7 @@ apk add \
musl-dev \
numactl-dev \
openssl-dev \
+ e2fsprogs-extra \
pkgconfig
cat /etc/os-release
diff --git a/ci/debian.sh b/ci/debian.sh
index 0445c92ec..767c9b985 100755
--- a/ci/debian.sh
+++ b/ci/debian.sh
@@ -33,6 +33,7 @@ pkg_minimal="
linux-libc-dev
lsb-release
pkg-config
+ e2fsprogs
"
pkg_nonessential="
diff --git a/ci/fedora.sh b/ci/fedora.sh
index f57806ebf..f4482a1da 100755
--- a/ci/fedora.sh
+++ b/ci/fedora.sh
@@ -26,6 +26,7 @@ $yum \
libtirpc \
libtirpc-devel \
pkg-config \
+ e2fsprogs \
redhat-lsb-core
# CentOS 8 fixes
diff --git a/ci/tumbleweed.sh b/ci/tumbleweed.sh
index 8a30b02c2..8f23229df 100755
--- a/ci/tumbleweed.sh
+++ b/ci/tumbleweed.sh
@@ -30,6 +30,7 @@ while [ $i != 0 ]; do
libtirpc-devel \
linux-glibc-devel \
lsb-release \
+ e2fsprogs \
pkg-config
ret=$?
diff --git a/lib/newlib_tests/shell/tst_format_device.sh b/lib/newlib_tests/shell/tst_format_device.sh
index dbe4ea9e7..bd4aa2ed9 100755
--- a/lib/newlib_tests/shell/tst_format_device.sh
+++ b/lib/newlib_tests/shell/tst_format_device.sh
@@ -3,6 +3,7 @@
# Copyright (c) 2022 Petr Vorel <pvorel@suse.cz>
TST_FORMAT_DEVICE=1
+TST_MOUNT_DEVICE=1
TST_NEEDS_ROOT=1
TST_TESTFUNC=test
TST_CNT=2
--
2.51.0
More information about the ltp
mailing list