Fixes for systemd's ptest
cover Fixes for systemd's ptest
From: Chen Qi <[email protected]>
The current status for systemd's ptest is not good. It has only two test cases. However, it's better to have something than nothing. So we need to make these two test cases actually have effect. This is what this patchset is trying to achieve.
//Chen Qi
The following changes since commit 005af45191ded6185c618c708181b31281e43092:
bitbake: fetch2: avoid printing "no checksum" error message twice (2013-12-22 14:29:13 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib ChenQi/systemd-ptest
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/systemd-ptest
Chen Qi (2):
busybox: enable SEAMLESS_XZ by default
systemd: fix ptest to make it able to run on target
meta/recipes-core/busybox/busybox/defconfig | 2 +- meta/recipes-core/systemd/systemd/run-ptest | 1 + meta/recipes-core/systemd/systemd_208.bb | 12 ++++++++++-- 3 files changed, 12 insertions(+), 3 deletions(-)
Signature · 1 line
1.7.9.5
PATCH 1/2 busybox: enable SEAMLESS_XZ by default
From: Chen Qi <[email protected]>
We have enabled SEAMLESS_GZ and SEAMLESS_BZ2 in defconfig, it's reasonable for us to enable SEAMLESS_XZ as well. Otherwise, we couldn't extract tar.xz file while we could extract tar.gz file. Such situation would be somewhat confusing.
--- meta/recipes-core/busybox/busybox/defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/busybox/busybox/defconfig +1 -1
@@ -125,7 +125,7 @@ CONFIG_FEATURE_HWIB=y # # Archival Utilities # -# CONFIG_FEATURE_SEAMLESS_XZ is not set +CONFIG_FEATURE_SEAMLESS_XZ=y CONFIG_FEATURE_SEAMLESS_LZMA=y CONFIG_FEATURE_SEAMLESS_BZ2=y CONFIG_FEATURE_SEAMLESS_GZ=y
Signature · 1 line
1.7.9.5
Re: [PATCH 1/2] busybox: enable SEAMLESS_XZ by default
Quoted 7 lines · On 12/23/2013 12:36 AM, [email protected] wrote:
From: Chen Qi <[email protected]>
We have enabled
SEAMLESS_GZandSEAMLESS_BZ2in defconfig, it's reasonable for us to enableSEAMLESS_XZas well. Otherwise, we couldn't extract tar.xz file while we could extract tar.gz file. Such situation would be somewhat confusing.
It's also important to note how much bigger the busybox image grows when adding a new config options, so what's the increase in # of bytes?
Thanks
Sau!
Quoted 19 lines
Signed-off-by Chen Qi <[email protected]>--- meta/recipes-core/busybox/busybox/defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/recipes-core/busybox/busybox/defconfig +1
-1@@ -125,7 +125,7 @@ CONFIG_FEATURE_HWIB=y # # Archival Utilities # -# CONFIG_FEATURE_SEAMLESS_XZ is not set +CONFIG_FEATURE_SEAMLESS_XZ=y CONFIG_FEATURE_SEAMLESS_LZMA=y CONFIG_FEATURE_SEAMLESS_BZ2=y CONFIG_FEATURE_SEAMLESS_GZ=y
Re: [PATCH 1/2] busybox: enable SEAMLESS_XZ by default
Quoted 10 lines · Saul Wold
Quoted 7 lines · On 12/23/2013 12:36 AM, [email protected] wrote:
From: Chen Qi <[email protected]>
We have enabled
SEAMLESS_GZandSEAMLESS_BZ2in defconfig, it's reasonable for us to enableSEAMLESS_XZas well. Otherwise, we couldn't extract tar.xz file while we could extract tar.gz file. Such situation would be somewhat confusing.It's also important to note how much bigger the busybox image grows when adding a new config options, so what's the increase in # of bytes?
Hi Saul,
The total size increase is (511116 + 47184 - 499980 - 47184 = 11136) bytes.
Here's more data.
*) Before the change:
-rwxr-xr-x 2 chenqi chenqi 511116 Dec 23 02:44 tmp/work/i586-poky-linux/busybox/1.21.1-r0/packages-split/busybox/bin/busybox.nosuid -rwsr-xr-x 2 chenqi chenqi 47184 Dec 23 02:44 tmp/work/i586-poky-linux/busybox/1.21.1-r0/packages-split/busybox/bin/busybox.suid *) After the change:
-rwxr-xr-x 2 chenqi chenqi 499980 Dec 23 20:25 tmp/work/i586-poky-linux/busybox/1.21.1-r0/packages-split/busybox/bin/busybox.nosuid -rwsr-xr-x 2 chenqi chenqi 47184 Dec 23 20:25 tmp/work/i586-poky-linux/busybox/1.21.1-r0/packages-split/busybox/bin/busybox.suid
Best Regards,
Chen Qi
Quoted 23 lines
Thanks
Sau!Quoted 19 lines
Signed-off-by Chen Qi <[email protected]>--- meta/recipes-core/busybox/busybox/defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/recipes-core/busybox/busybox/defconfig +1
-1@@ -125,7 +125,7 @@ CONFIG_FEATURE_HWIB=y # # Archival Utilities # -# CONFIG_FEATURE_SEAMLESS_XZ is not set +CONFIG_FEATURE_SEAMLESS_XZ=y CONFIG_FEATURE_SEAMLESS_LZMA=y CONFIG_FEATURE_SEAMLESS_BZ2=y CONFIG_FEATURE_SEAMLESS_GZ=y
PATCH 2/2 systemd: fix ptest to make it able to run on target
In reply to [email protected]From: Chen Qi <[email protected]>
This patch mainly involves four changes.
1. Ship the sys.tar.xz and extract it on target to avoid ELOOP error.
2. Make systemd-ptest rdepend on bash and perl as the test cases need them.
3. Fix paths in Makefile so that the test cases could run on target.
4. Install ${libdir}/udev/rules.d directory to make udev-test.pl work.
[YOCTO #5664]
[YOCTO #5673]
[YOCTO #5674]
--- meta/recipes-core/systemd/systemd/run-ptest | 1 + meta/recipes-core/systemd/systemd_208.bb | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-)
meta/recipes-core/systemd/systemd/run-ptest +1 -0
@@ -1,2 +1,3 @@ +tar -C test -xJf test/sys.tar.xz make test/rules-test.sh.log make test/udev-test.pl.log
meta/recipes-core/systemd/systemd_208.bb +10 -2
@@ -120,11 +120,15 @@ do_install_ptest () { install ${S}/test/* ${D}${PTEST_PATH}/test install -m 0755 ${B}/test-udev ${D}${PTEST_PATH}/ install -d ${D}${PTEST_PATH}/build-aux + cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/ cp -rf ${B}/rules ${D}${PTEST_PATH}/ + # This directory needs to be there for udev-test.pl to work. + install -d ${D}${libdir}/udev/rules.d cp ${B}/Makefile ${D}${PTEST_PATH}/ - cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/ - tar -C ${D}${PTEST_PATH}/test -xJf ${S}/test/sys.tar.xz + cp ${S}/test/sys.tar.xz ${D}${PTEST_PATH}/test sed -i 's/"tree"/"ls"/' ${D}${PTEST_PATH}/test/udev-test.pl + sed -i 's#${S}#${PTEST_PATH}#g' ${D}${PTEST_PATH}/Makefile + sed -i 's#${B}#${PTEST_PATH}#g' ${D}${PTEST_PATH}/Makefile } python populate_packages_prepend (){
@@ -147,6 +151,10 @@ FILES_${PN}-analyze = "${bindir}/systemd-analyze" FILES_${PN}-initramfs = "/init" RDEPENDS_${PN}-initramfs = "${PN}" +# The test cases need perl and bash to run correctly. +RDEPENDS_${PN}-ptest += "perl bash" +FILES_${PN}-ptest += "${libdir}/udev/rules.d" + FILES_${PN}-gui = "${bindir}/systemadm" FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \
Signature · 1 line
1.7.9.5