* [PATCH V3] dnf.py: installroot support usrmerge
@ 2019-09-03 4:46 changqing.li
2019-09-04 8:04 ` Changqing Li
0 siblings, 1 reply; 6+ messages in thread
From: changqing.li @ 2019-09-03 4:46 UTC (permalink / raw)
To: openembedded-core
From: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
meta/lib/oeqa/runtime/cases/dnf.py | 34 +++++++++++++++++++++++++++++++++-
1 file changed, 33 insertions(+), 1 deletion(-)
diff --git a/meta/lib/oeqa/runtime/cases/dnf.py b/meta/lib/oeqa/runtime/cases/dnf.py
index 629b9af..80cc86a 100644
--- a/meta/lib/oeqa/runtime/cases/dnf.py
+++ b/meta/lib/oeqa/runtime/cases/dnf.py
@@ -9,7 +9,7 @@ from oeqa.utils.httpserver import HTTPService
from oeqa.runtime.case import OERuntimeTestCase
from oeqa.core.decorator.depends import OETestDepends
-from oeqa.core.decorator.data import skipIfNotDataVar, skipIfNotFeature
+from oeqa.core.decorator.data import skipIfNotDataVar, skipIfNotFeature, skipIfInDataVar, skipIfNotInDataVar
from oeqa.runtime.decorator.package import OEHasPackage
class DnfTest(OERuntimeTestCase):
@@ -116,6 +116,7 @@ class DnfRepoTest(DnfTest):
self.dnf_with_repo('reinstall -y run-postinsts-dev')
@OETestDepends(['dnf.DnfRepoTest.test_dnf_makecache'])
+ @skipIfInDataVar('DISTRO_FEATURES', 'usrmerge', 'Test run when not enable usrmerge')
def test_dnf_installroot(self):
rootpath = '/home/root/chroot/test'
#Copy necessary files to avoid errors with not yet installed tools on
@@ -141,6 +142,37 @@ class DnfRepoTest(DnfTest):
self.assertEqual(0, status, output)
@OETestDepends(['dnf.DnfRepoTest.test_dnf_makecache'])
+ @skipIfNotInDataVar('DISTRO_FEATURES', 'usrmerge', 'Test run when enable usrmege')
+ def test_dnf_installroot_usrmerge(self):
+ rootpath = '/home/root/chroot/test'
+ #Copy necessary files to avoid errors with not yet installed tools on
+ #installroot directory.
+ self.target.run('mkdir -p %s/etc' % rootpath, 1500)
+ self.target.run('mkdir -p %s/usr/bin %s/usr/sbin' % (rootpath, rootpath), 1500)
+ self.target.run('ln -sf -r %s/usr/bin %s/bin' % (rootpath, rootpath), 1500)
+ self.target.run('ln -sf -r %s/usr/sbin %s/sbin' % (rootpath, rootpath), 1500)
+ self.target.run('mkdir -p %s/dev' % rootpath, 1500)
+ #Handle different architectures lib dirs
+ self.target.run('mkdir -p %s/usr/lib' % rootpath, 1500)
+ self.target.run('mkdir -p %s/usr/libx32' % rootpath, 1500)
+ self.target.run('mkdir -p %s/usr/lib64' % rootpath, 1500)
+ self.target.run('cp /lib/libtinfo.so.5 %s/usr/lib' % rootpath, 1500)
+ self.target.run('cp /libx32/libtinfo.so.5 %s/usr/libx32' % rootpath, 1500)
+ self.target.run('cp /lib64/libtinfo.so.5 %s/usr/lib64' % rootpath, 1500)
+ self.target.run('ln -sf -r %s/lib %s/usr/lib' % (rootpath,rootpath), 1500)
+ self.target.run('ln -sf -r %s/libx32 %s/usr/libx32' % (rootpath,rootpath), 1500)
+ self.target.run('ln -sf -r %s/lib64 %s/usr/lib64' % (rootpath,rootpath), 1500)
+ self.target.run('cp -r /etc/rpm %s/etc' % rootpath, 1500)
+ self.target.run('cp -r /etc/dnf %s/etc' % rootpath, 1500)
+ self.target.run('cp /bin/sh %s/bin' % rootpath, 1500)
+ self.target.run('mount -o bind /dev %s/dev/' % rootpath, 1500)
+ self.dnf_with_repo('install --installroot=%s -v -y --rpmverbosity=debug busybox run-postinsts' % rootpath)
+ status, output = self.target.run('test -e %s/var/cache/dnf' % rootpath, 1500)
+ self.assertEqual(0, status, output)
+ status, output = self.target.run('test -e %s/bin/busybox' % rootpath, 1500)
+ self.assertEqual(0, status, output)
+
+ @OETestDepends(['dnf.DnfRepoTest.test_dnf_makecache'])
def test_dnf_exclude(self):
excludepkg = 'curl-dev'
self.dnf_with_repo('install -y curl*')
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH V3] dnf.py: installroot support usrmerge
2019-09-03 4:46 [PATCH V3] dnf.py: installroot support usrmerge changqing.li
@ 2019-09-04 8:04 ` Changqing Li
2019-09-04 8:15 ` Richard Purdie
0 siblings, 1 reply; 6+ messages in thread
From: Changqing Li @ 2019-09-04 8:04 UTC (permalink / raw)
To: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 5494 bytes --]
Ping
Test with/without usrmege feature passed.
With usrmerge:
*NOTE: test_dnf_installroot (dnf.DnfRepoTest)
DEBUG: Checking if 'DISTRO_FEATURES' value contains 'usrmerge' to skip
the test
NOTE: ... skipped 'Test run when not enable usrmerge'
Test run when not enable usrmerge
NOTE: test_dnf_installroot_usrmerge (dnf.DnfRepoTest)
DEBUG: Checking if 'DISTRO_FEATURES' value contains 'usrmerge' to run
the test
DEBUG: [Running]$ ssh -l root -o UserKnownHostsFile=/dev/null -o
StrictHostKeyChecking=no -o LogLevel=ERROR 192.168.7.16 export
PATH=/usr/sbin:/sbin:/usr/bin:/bin; mkdir -p /home/root/chroot/test/etc
....*
Without usrmerge:
*NOTE: test_dnf_installroot (dnf.DnfRepoTest)**
**DEBUG: Checking if 'DISTRO_FEATURES' value contains 'usrmerge' to skip
the test**
**DEBUG: [Running]$ ssh -l root -o UserKnownHostsFile=/dev/null -o
StrictHostKeyChecking=no -o LogLevel=ERROR 192.168.7.10 export
PATH=/usr/sbin:/sbin:/usr/bin:/bin; mkdir -p /home/root/chroot/test/etc**
**DEBUG: time: 1567404974.8490767, endtime: 1567406474.8424258**
**DEBUG: [Command returned '0' after 0.13 seconds]**
**DEBUG: Command: mkdir -p /home/root/chroot/test/etc**
**Output: **
**...*
*NOTE: ... ok**
**NOTE: test_dnf_installroot_usrmerge (dnf.DnfRepoTest)**
**DEBUG: Checking if 'DISTRO_FEATURES' value contains 'usrmerge' to run
the test**
**NOTE: ... skipped 'Test run when enable usrmege'**
**Test run when enable usrmege*
On 9/3/19 12:46 PM, changqing.li@windriver.com wrote:
> From: Changqing Li <changqing.li@windriver.com>
>
> Signed-off-by: Changqing Li <changqing.li@windriver.com>
> ---
> meta/lib/oeqa/runtime/cases/dnf.py | 34 +++++++++++++++++++++++++++++++++-
> 1 file changed, 33 insertions(+), 1 deletion(-)
>
> diff --git a/meta/lib/oeqa/runtime/cases/dnf.py b/meta/lib/oeqa/runtime/cases/dnf.py
> index 629b9af..80cc86a 100644
> --- a/meta/lib/oeqa/runtime/cases/dnf.py
> +++ b/meta/lib/oeqa/runtime/cases/dnf.py
> @@ -9,7 +9,7 @@ from oeqa.utils.httpserver import HTTPService
>
> from oeqa.runtime.case import OERuntimeTestCase
> from oeqa.core.decorator.depends import OETestDepends
> -from oeqa.core.decorator.data import skipIfNotDataVar, skipIfNotFeature
> +from oeqa.core.decorator.data import skipIfNotDataVar, skipIfNotFeature, skipIfInDataVar, skipIfNotInDataVar
> from oeqa.runtime.decorator.package import OEHasPackage
>
> class DnfTest(OERuntimeTestCase):
> @@ -116,6 +116,7 @@ class DnfRepoTest(DnfTest):
> self.dnf_with_repo('reinstall -y run-postinsts-dev')
>
> @OETestDepends(['dnf.DnfRepoTest.test_dnf_makecache'])
> + @skipIfInDataVar('DISTRO_FEATURES', 'usrmerge', 'Test run when not enable usrmerge')
> def test_dnf_installroot(self):
> rootpath = '/home/root/chroot/test'
> #Copy necessary files to avoid errors with not yet installed tools on
> @@ -141,6 +142,37 @@ class DnfRepoTest(DnfTest):
> self.assertEqual(0, status, output)
>
> @OETestDepends(['dnf.DnfRepoTest.test_dnf_makecache'])
> + @skipIfNotInDataVar('DISTRO_FEATURES', 'usrmerge', 'Test run when enable usrmege')
> + def test_dnf_installroot_usrmerge(self):
> + rootpath = '/home/root/chroot/test'
> + #Copy necessary files to avoid errors with not yet installed tools on
> + #installroot directory.
> + self.target.run('mkdir -p %s/etc' % rootpath, 1500)
> + self.target.run('mkdir -p %s/usr/bin %s/usr/sbin' % (rootpath, rootpath), 1500)
> + self.target.run('ln -sf -r %s/usr/bin %s/bin' % (rootpath, rootpath), 1500)
> + self.target.run('ln -sf -r %s/usr/sbin %s/sbin' % (rootpath, rootpath), 1500)
> + self.target.run('mkdir -p %s/dev' % rootpath, 1500)
> + #Handle different architectures lib dirs
> + self.target.run('mkdir -p %s/usr/lib' % rootpath, 1500)
> + self.target.run('mkdir -p %s/usr/libx32' % rootpath, 1500)
> + self.target.run('mkdir -p %s/usr/lib64' % rootpath, 1500)
> + self.target.run('cp /lib/libtinfo.so.5 %s/usr/lib' % rootpath, 1500)
> + self.target.run('cp /libx32/libtinfo.so.5 %s/usr/libx32' % rootpath, 1500)
> + self.target.run('cp /lib64/libtinfo.so.5 %s/usr/lib64' % rootpath, 1500)
> + self.target.run('ln -sf -r %s/lib %s/usr/lib' % (rootpath,rootpath), 1500)
> + self.target.run('ln -sf -r %s/libx32 %s/usr/libx32' % (rootpath,rootpath), 1500)
> + self.target.run('ln -sf -r %s/lib64 %s/usr/lib64' % (rootpath,rootpath), 1500)
> + self.target.run('cp -r /etc/rpm %s/etc' % rootpath, 1500)
> + self.target.run('cp -r /etc/dnf %s/etc' % rootpath, 1500)
> + self.target.run('cp /bin/sh %s/bin' % rootpath, 1500)
> + self.target.run('mount -o bind /dev %s/dev/' % rootpath, 1500)
> + self.dnf_with_repo('install --installroot=%s -v -y --rpmverbosity=debug busybox run-postinsts' % rootpath)
> + status, output = self.target.run('test -e %s/var/cache/dnf' % rootpath, 1500)
> + self.assertEqual(0, status, output)
> + status, output = self.target.run('test -e %s/bin/busybox' % rootpath, 1500)
> + self.assertEqual(0, status, output)
> +
> + @OETestDepends(['dnf.DnfRepoTest.test_dnf_makecache'])
> def test_dnf_exclude(self):
> excludepkg = 'curl-dev'
> self.dnf_with_repo('install -y curl*')
--
BRs
Sandy(Li Changqing)
[-- Attachment #2: Type: text/html, Size: 6634 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH V3] dnf.py: installroot support usrmerge
2019-09-04 8:04 ` Changqing Li
@ 2019-09-04 8:15 ` Richard Purdie
2019-09-04 8:36 ` Changqing Li
0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2019-09-04 8:15 UTC (permalink / raw)
To: Changqing Li, openembedded-core
On Wed, 2019-09-04 at 16:04 +0800, Changqing Li wrote:
> Ping
> Test with/without usrmege feature passed.
> With usrmerge:
> NOTE: test_dnf_installroot (dnf.DnfRepoTest)
> DEBUG: Checking if 'DISTRO_FEATURES' value contains 'usrmerge' to
> skip the test
> NOTE: ... skipped 'Test run when not enable usrmerge'
> Test run when not enable usrmerge
> NOTE: test_dnf_installroot_usrmerge (dnf.DnfRepoTest)
> DEBUG: Checking if 'DISTRO_FEATURES' value contains 'usrmerge' to run
> the test
> DEBUG: [Running]$ ssh -l root -o UserKnownHostsFile=/dev/null -o
> StrictHostKeyChecking=no -o LogLevel=ERROR 192.168.7.16 export
> PATH=/usr/sbin:/sbin:/usr/bin:/bin; mkdir -p
> /home/root/chroot/test/etc
> ....
>
> Without usrmerge:
> NOTE: test_dnf_installroot (dnf.DnfRepoTest)
> DEBUG: Checking if 'DISTRO_FEATURES' value contains 'usrmerge' to
> skip the test
> DEBUG: [Running]$ ssh -l root -o UserKnownHostsFile=/dev/null -o
> StrictHostKeyChecking=no -o LogLevel=ERROR 192.168.7.10 export
> PATH=/usr/sbin:/sbin:/usr/bin:/bin; mkdir -p
> /home/root/chroot/test/etc
> DEBUG: time: 1567404974.8490767, endtime: 1567406474.8424258
> DEBUG: [Command returned '0' after 0.13 seconds]
> DEBUG: Command: mkdir -p /home/root/chroot/test/etc
> Output:
> ...
> NOTE: ... ok
> NOTE: test_dnf_installroot_usrmerge (dnf.DnfRepoTest)
> DEBUG: Checking if 'DISTRO_FEATURES' value contains 'usrmerge' to run
> the test
> NOTE: ... skipped 'Test run when enable usrmege'
> Test run when enable usrmege
In a previous version of this patch, it introduced a failure in the
parselogs test as an error was generated into the logs. I haven't
tested the new version of the patch, was that issue addressed?
Cheers,
Richard
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH V3] dnf.py: installroot support usrmerge
2019-09-04 8:15 ` Richard Purdie
@ 2019-09-04 8:36 ` Changqing Li
2019-09-05 18:25 ` Randy MacLeod
0 siblings, 1 reply; 6+ messages in thread
From: Changqing Li @ 2019-09-04 8:36 UTC (permalink / raw)
To: Richard Purdie, openembedded-core
On 9/4/19 4:15 PM, Richard Purdie wrote:
> On Wed, 2019-09-04 at 16:04 +0800, Changqing Li wrote:
>> Ping
>> Test with/without usrmege feature passed.
>> With usrmerge:
>> NOTE: test_dnf_installroot (dnf.DnfRepoTest)
>> DEBUG: Checking if 'DISTRO_FEATURES' value contains 'usrmerge' to
>> skip the test
>> NOTE: ... skipped 'Test run when not enable usrmerge'
>> Test run when not enable usrmerge
>> NOTE: test_dnf_installroot_usrmerge (dnf.DnfRepoTest)
>> DEBUG: Checking if 'DISTRO_FEATURES' value contains 'usrmerge' to run
>> the test
>> DEBUG: [Running]$ ssh -l root -o UserKnownHostsFile=/dev/null -o
>> StrictHostKeyChecking=no -o LogLevel=ERROR 192.168.7.16 export
>> PATH=/usr/sbin:/sbin:/usr/bin:/bin; mkdir -p
>> /home/root/chroot/test/etc
>> ....
>>
>> Without usrmerge:
>> NOTE: test_dnf_installroot (dnf.DnfRepoTest)
>> DEBUG: Checking if 'DISTRO_FEATURES' value contains 'usrmerge' to
>> skip the test
>> DEBUG: [Running]$ ssh -l root -o UserKnownHostsFile=/dev/null -o
>> StrictHostKeyChecking=no -o LogLevel=ERROR 192.168.7.10 export
>> PATH=/usr/sbin:/sbin:/usr/bin:/bin; mkdir -p
>> /home/root/chroot/test/etc
>> DEBUG: time: 1567404974.8490767, endtime: 1567406474.8424258
>> DEBUG: [Command returned '0' after 0.13 seconds]
>> DEBUG: Command: mkdir -p /home/root/chroot/test/etc
>> Output:
>> ...
>> NOTE: ... ok
>> NOTE: test_dnf_installroot_usrmerge (dnf.DnfRepoTest)
>> DEBUG: Checking if 'DISTRO_FEATURES' value contains 'usrmerge' to run
>> the test
>> NOTE: ... skipped 'Test run when enable usrmege'
>> Test run when enable usrmege
> In a previous version of this patch, it introduced a failure in the
> parselogs test as an error was generated into the logs. I haven't
> tested the new version of the patch, was that issue addressed?
>
> Cheers,
>
> Richard
I didn't met failure in test_parselog during test, the whole testimage
is passed.
Could you help to send me the link of the failure test if the new
version still
met test_parselog failure? Thanks.
>
>
>
--
BRs
Sandy(Li Changqing)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH V3] dnf.py: installroot support usrmerge
2019-09-04 8:36 ` Changqing Li
@ 2019-09-05 18:25 ` Randy MacLeod
2019-09-06 21:50 ` richard.purdie
0 siblings, 1 reply; 6+ messages in thread
From: Randy MacLeod @ 2019-09-05 18:25 UTC (permalink / raw)
To: Changqing Li, Richard Purdie, openembedded-core
On 9/4/19 4:36 AM, Changqing Li wrote:
>
> On 9/4/19 4:15 PM, Richard Purdie wrote:
>> On Wed, 2019-09-04 at 16:04 +0800, Changqing Li wrote:
>>> Ping
>>> Test with/without usrmege feature passed.
>>> With usrmerge:
>>> NOTE: test_dnf_installroot (dnf.DnfRepoTest)
>>> DEBUG: Checking if 'DISTRO_FEATURES' value contains 'usrmerge' to
>>> skip the test
>>> NOTE: ... skipped 'Test run when not enable usrmerge'
>>> Test run when not enable usrmerge
>>> NOTE: test_dnf_installroot_usrmerge (dnf.DnfRepoTest)
>>> DEBUG: Checking if 'DISTRO_FEATURES' value contains 'usrmerge' to run
>>> the test
>>> DEBUG: [Running]$ ssh -l root -o UserKnownHostsFile=/dev/null -o
>>> StrictHostKeyChecking=no -o LogLevel=ERROR 192.168.7.16 export
>>> PATH=/usr/sbin:/sbin:/usr/bin:/bin; mkdir -p
>>> /home/root/chroot/test/etc
>>> ....
>>>
>>> Without usrmerge:
>>> NOTE: test_dnf_installroot (dnf.DnfRepoTest)
>>> DEBUG: Checking if 'DISTRO_FEATURES' value contains 'usrmerge' to
>>> skip the test
>>> DEBUG: [Running]$ ssh -l root -o UserKnownHostsFile=/dev/null -o
>>> StrictHostKeyChecking=no -o LogLevel=ERROR 192.168.7.10 export
>>> PATH=/usr/sbin:/sbin:/usr/bin:/bin; mkdir -p
>>> /home/root/chroot/test/etc
>>> DEBUG: time: 1567404974.8490767, endtime: 1567406474.8424258
>>> DEBUG: [Command returned '0' after 0.13 seconds]
>>> DEBUG: Command: mkdir -p /home/root/chroot/test/etc
>>> Output:
>>> ...
>>> NOTE: ... ok
>>> NOTE: test_dnf_installroot_usrmerge (dnf.DnfRepoTest)
>>> DEBUG: Checking if 'DISTRO_FEATURES' value contains 'usrmerge' to run
>>> the test
>>> NOTE: ... skipped 'Test run when enable usrmege'
>>> Test run when enable usrmege
>> In a previous version of this patch, it introduced a failure in the
>> parselogs test as an error was generated into the logs. I haven't
>> tested the new version of the patch, was that issue addressed?
>>
>> Cheers,
>>
>> Richard
>
> I didn't met failure in test_parselog during test, the whole
> testimage is passed.
>
> Could you help to send me the link of the failure test if the new
> version still
>
> met test_parselog failure? Thanks.
Sandy,
Richard shouldn't have to do that since many people have such requests and
if he helped everyone he would (and has in the past) spend/t too much
time helping people.
We should be able to setup the autobuilder locally to reproduce the problem.
Also during the YP bug review call, someone suggested that you check if the
dnf install tests are running in a deterministic order. If they are not,
then that
might explain why the AB sees the problem but you do not.
../Randy
>
>>
>>
>>
--
# Randy MacLeod
# Wind River Linux
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH V3] dnf.py: installroot support usrmerge
2019-09-05 18:25 ` Randy MacLeod
@ 2019-09-06 21:50 ` richard.purdie
0 siblings, 0 replies; 6+ messages in thread
From: richard.purdie @ 2019-09-06 21:50 UTC (permalink / raw)
To: Randy MacLeod, Changqing Li, openembedded-core
On Thu, 2019-09-05 at 14:25 -0400, Randy MacLeod wrote:
> On 9/4/19 4:36 AM, Changqing Li wrote:
> > I didn't met failure in test_parselog during test, the whole
> > testimage is passed.
> >
> > Could you help to send me the link of the failure test if the new
> > version still
> >
> > met test_parselog failure? Thanks.
>
> Sandy,
>
> Richard shouldn't have to do that since many people have such
> requests and
>
> if he helped everyone he would (and has in the past) spend/t too
> much
> time helping people.
>
> We should be able to setup the autobuilder locally to reproduce the
> problem.
>
>
> Also during the YP bug review call, someone suggested that you check
> if the
>
> dnf install tests are running in a deterministic order. If they are
> not,
> then that
>
> might explain why the AB sees the problem but you do not.
It wasn't clear if the issue was fixed in the revised patch or not so I
did include this in the last round of tests and those passed. I
therefore suspect whatever the issue was did get fixed in the v3.
Of course a different patch failed (mdadm) so I've replied about that
one separately (I've confirmed which patch it was manually, it did
reproduce).
Cheers,
Richard
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-09-06 21:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-03 4:46 [PATCH V3] dnf.py: installroot support usrmerge changqing.li
2019-09-04 8:04 ` Changqing Li
2019-09-04 8:15 ` Richard Purdie
2019-09-04 8:36 ` Changqing Li
2019-09-05 18:25 ` Randy MacLeod
2019-09-06 21:50 ` richard.purdie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.