Bug 5664

Summary: systemd ptest introduces infinite symlink cycle
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Ross Burton <ross.burton>
Component: coreAssignee: Chen Qi <Qi.Chen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: meta.mr.watcher, meta.watcher, sgw
Version: 1.5   
Target Milestone: 1.6 M2   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: Regression (Used to work)
Verified: Documentation change: No (bug/feature does not impact docs)

Description Ross Burton 2013-12-13 16:51:47 UTC
The ptest logic in systemd.bb extracts sys.tar.xz which then introduces infinite symlink cycles.  An infinite-looping qemu at rootfs time produces messages like this:

open("/data/poky-master/tmp/work/qemux86_64-poky-linux/core-image-sato/1.0-r0/rootfs/usr/lib/systemd/ptest/test/sys/dev/block/8:17/subsystem/sr0/device/block/sr0/device/block/sr0/device/block/sr0/device/block/sr0/device/block/sr0/device/block/sr0/device/block/sr0/device/block/sr0/device/block/sr0/device/block/sr0/device/block/sr0/device/block/sr0/device/block/sr0/device/block/sr0/device/block/sr0/device/block/sr0/device/block/sr0/device/block/sr0/device/block/sr0/device/block/sr0/device/block/sr0/device/block/sr0/device/block/sr0/device/block/sr0/device/block/sr0/device/block/sr0/device/block/sr0/device/block/sr0/device/block/sr0/device/block/sr0/device/block/sr0/device/block/sr0/device/block/sr0/device/block/sr0/subsystem/sda/sda9/subsystem/md0", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1 ELOOP (Too many levels of symbolic links)

Instead of extracting the sys.tar.xz at packaging time we should just ship the tarball as-is and do something like extract/run tests/delete in run-ptests.
Comment 1 Chen Qi 2013-12-17 06:50:44 UTC
Hi Ross,

I cannot reproduce the problem. Is there any special configuration to trigger this error? Or maybe this only occurs on some distributions?

My build machine is ubuntu 12.04 LTS.
My local.conf file is as follows.
BB_NUMBER_THREADS ?= "4"
PARALLEL_MAKE ?= "-j 4"
MACHINE ??= "qemux86"
DL_DIR ?= "/home/chenqi/downloads"
#SSTATE_DIR ?= "/home/chenqi/yocto-sstate-pr"
#PRSERV_HOST = "localhost:0"
# INHERIT += "buildhistory"
# BUILDHISTORY_COMMIT = "1"
#TMPDIR = "${TOPDIR}/tmp"
DISTRO ?= "poky"
PACKAGE_CLASSES ?= "package_rpm"
#SDKMACHINE ?= "i686"
#EXTRA_IMAGE_FEATURES = "debug-tweaks ptest-pkgs dev-pkgs dbg-pkgs doc-pkgs staticdev-pkgs"
EXTRA_IMAGE_FEATURES = "debug-tweaks ptest-pkgs"
USER_CLASSES ?= "buildstats image-mklibs image-prelink"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS = "\
    STOPTASKS,${TMPDIR},1G,100K \
    STOPTASKS,${DL_DIR},1G,100K \
    STOPTASKS,${SSTATE_DIR},1G,100K \
    ABORT,${TMPDIR},100M,1K \
    ABORT,${DL_DIR},100M,1K \
    ABORT,${SSTATE_DIR},100M,1K" 

DISTRO_FEATURES_append = " systemd ptest"
VIRTUAL-RUNTIME_init_manager = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"

CONF_VERSION = "1"


//Chen Qi
Comment 2 Chen Qi 2013-12-17 08:13:56 UTC
The ptest for systemd cannot actually work on target. So it needs rework anyway.

https://bugzilla.yoctoproject.org/show_bug.cgi?id=5673

//Chen Qi
Comment 3 Ross Burton 2013-12-18 17:42:24 UTC
RPM-based images without that change to rootfs_rpm don't get systemd-ptest installed.  I was replicating with core-image-sato using ipk.
Comment 4 Chen Qi 2013-12-20 02:51:56 UTC
(In reply to comment #3)
> RPM-based images without that change to rootfs_rpm don't get systemd-ptest
> installed.  I was replicating with core-image-sato using ipk.

I used rpm as the package backend. I added 'perl' to the RDEPENDS of systemd-ptest and the systemd-ptest was installed. Anyway, systemd's ptest implementation might need rework because it doesn't work out well on target.

//Chen Qi
Comment 5 Chen Qi 2014-02-10 05:49:08 UTC
Module: openembedded-core.git
Branch: master
Commit: 03ed9095b1ca54a060407f355be0ad9ec86b7610
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=03ed9095b1ca54a060407f355be0ad9ec86b7610

//Chen Qi