----- Mail original ----- > De: "Bruce Dubbs" <bruce.du...@gmail.com> > À: "LFS Developers Mailinglist" <lfs-dev@linuxfromscratch.org> > Envoyé: Mercredi 29 Mai 2013 19:25:18 > Objet: [lfs-dev] util-linux regression tests > > util-linux now has a test suite. In chroot, 'make check' fails > because > it is running as root. > If I run as a non-root user, the tests pass, but many are skipped. > > The actual command beeing run in the Makefile is: > > tests/run.sh --srcdir=$(abs_top_srcdir) > --builddir=$(abs_top_builddir) > --nonroot > > If I remove --nonroot, the tests can be run as root, but I get a lot of > failures because it can't find the scsi_debug module so it is kernel > dependent. The tests also hang after a while for me. > > I'm looking for someone to verify so we can come up with the best > approach for the book. > > -- Bruce > I have modified my build system during util-linux-2.22 time to supply needed kernel modules inside the chroot while building.
For loop, there is a special trick to make loop available without depending on running loop module available. In my like chap-6.6, I do # mknod one /dev/loop allow losetup (from inside) to mount loop module (from running kernel outside the chroot) # That will allow some tests using loop to run rm -f /dev/loop0 && mknod /dev/loop0 b 7 0 For the other modules, I copy modules from running kernel inside the chroot and create a limited .alias and .dep files like this. echo -e 'alias block-major-9-* md_mod\nalias md md_mod' >${LFS}/${flavor}/modules.alias echo -e 'crc-t10dif.ko:\nscsi_mod.ko:\nmd-mod.ko:\nscsi_debug.ko: scsi_mod.ko crc-t10dif.ko' >${LFS}/${flavor}/modules.dep But any modprobe for those modules does not work during util-linux build as no modprobe is yet build. So I am running only non-root test and that was enought to find some of the 2.23 issues (on 32bits build). If running as root, I am a bit afraid too by the big warning banner on test start. I am unsure that running as root could destroy something on the host, like mounted loop files as loop numbers are hardcoded in the tests. Anyway, I have manually tested running util-linux tests as root. For that, I build again util-linux after full LFS has build (so modprobe was available). I don't remember to have test failures as root with util-linux-2.22 test suite. I added on my like chap-6.6 # To silent fsck on util-linux tests touch /etc/fstab Running more tests with running kernel modules was a bit of fun to discover some trick but I do not think that was a great success. I fail to find an appropriate recipe for mdadm (it fail after a few tests and I haven't seen a log from someone running the full mdadm test suite). And I am really unsure running mdadm tests would not detroy a config using mdadm for real on boot device. parted-3.1 fail one test (that are not run without the scsi_debug kernel modules) and emit many messages (not enough memory). I haven't investigated that issue. I didn't build anything else that use scsi_debug (to my knowledge). Gilles -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page