Re: [OE-core] [PATCH] nfs-utils: add runtime depends for nfs-export-root
On 2018年08月11日 17:33, Richard Purdie wrote: On Fri, 2018-08-10 at 17:38 +0800, Dengke Du wrote: When DISTRO_FEATURE enable "systemd", the nfs-server.service in nfs- utils depends on /etc/exports, but the file "/etc/exports" installed by package nfs-export-root. Otherwise the service would failed. So we should add the runtime depends for nfs-export-root. Signed-off-by: Dengke Du --- meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.1.bb | 1 + 1 file changed, 1 insertion(+) I suspect that this may in fact be a feature, you enable the nfs server by adding nfs-export-root to the image. The behaviour may therefore be intended as not everyone installing nfs-utils wants a server. We should perhaps better document that. Yes, when enable IMAGE_FEATURE nfs-server, we install the nfs-server.service, when not enable nfs-server, we don't install the nfs-server.service, otherwise we install the nfs-utils, install the nfs-server. Also, when using sysvinit does this recipe generate an init script which starts an nfs-server? Yes, this bb would generate an init script for sysvinit, I should let the nfs-export-root working for sysvinit else. Cheers, Richard -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [oe-core][PATCH v3 2/2] runtime selftest: optimize the case of hw_breakpoint
1. So far, only qemux86 can support hw breakpoint qemuppc: Runqemu uses G4 as the default cpu. But qemu doesn't simulate the hw breakpoint register for G4, which belong to 74xx series. qemuarm: The arch more than v7 supports hw breakpoint, however arm use v5 as default. 2. Rsyslog maybe not started, so we use dmesg to confirm. 3. Adding the operation of 'ls' triggers hardware breakpoint. Signed-off-by: Hongzhi.Song --- meta/lib/oeqa/runtime/cases/ksample.py | 5 + 1 file changed, 5 insertions(+) diff --git a/meta/lib/oeqa/runtime/cases/ksample.py b/meta/lib/oeqa/runtime/cases/ksample.py index 26fbe9d8cb..eb8713351a 100644 --- a/meta/lib/oeqa/runtime/cases/ksample.py +++ b/meta/lib/oeqa/runtime/cases/ksample.py @@ -164,6 +164,11 @@ class KSampleTest(KSample): # hw breakpoint @OETestDepends(['ssh.SSHTest.test_ssh']) def test_hw_breakpoint_example(self): +# check arch +status, output = self.target.run("uname -m") +result = ("x86" in output) or ("aarch64" in output) +if not result: +self.skipTest("the arch doesn't support hw breakpoint" % output) # check config self.check_config("CONFIG_KALLSYMS_ALL") # make sure if module exists -- 2.11.0 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [oe-core][PATCH v2 1/2] runtime selftest: test_trace_events_sample of ksample.py
The debug info can not be written to trace buffer immediately by thread. So we should sleep some seconds. Signed-off-by: Hongzhi.Song --- meta/lib/oeqa/runtime/cases/ksample.py | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/meta/lib/oeqa/runtime/cases/ksample.py b/meta/lib/oeqa/runtime/cases/ksample.py index 260bc3cfbd..26fbe9d8cb 100644 --- a/meta/lib/oeqa/runtime/cases/ksample.py +++ b/meta/lib/oeqa/runtime/cases/ksample.py @@ -18,7 +18,8 @@ class KSample(OERuntimeTestCase): else: # check result result = ("%s" % match_string) in output -self.assertTrue(result) +msg = output +self.assertTrue(result, msg) self.assertEqual(status, 0, cmd) def check_config(self, config_opt=''): @@ -126,7 +127,16 @@ class KSampleTest(KSample): self.cmd_and_check("echo 1 > /sys/kernel/debug/tracing/events/sample-trace/enable") self.cmd_and_check("cat /sys/kernel/debug/tracing/events/sample-trace/enable") # check result -self.cmd_and_check("cat /sys/kernel/debug/tracing/trace | grep hello | head -n1 | cut -d\':\' -f2", " foo_bar") +status = 1 +count = 0 +while status != 0: +time.sleep(1) +status, output = self.target.run('cat /sys/kernel/debug/tracing/trace | grep hello | head -n1 | cut -d\':\' -f2') +if " foo_bar" in output: +break +count = count + 1 +if count > 5: +self.assertTrue(False, "Time out when check result") # disable trace self.cmd_and_check("echo 0 > /sys/kernel/debug/tracing/events/sample-trace/enable") # clean up trace -- 2.11.0 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [oe-core][v2 v3 PATCH 0/2] modify runtime test cases
v3: specify arch for the case of hw breakpoint v2: test_trace_events_sample of ksample.py Hongzhi.Song (2): runtime selftest: test_trace_events_sample of ksample.py runtime selftest: optimize the case of hw_breakpoint meta/lib/oeqa/runtime/cases/ksample.py | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) -- 2.11.0 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH v2] runqemu: exit gracefully with an error message if qemu system is not evaluated
Ping. I do not see this patch in August archive http://lists.openembedded.org/pipermail/openembedded-core/2018-August/thread.html. Do I need to re-send? Regards, Jagadeesh On Thu, Aug 9, 2018 at 9:53 PM, Jagadeesh Krishnanjanappa wrote: > It solves below error: > -- snip -- > return 'qemu-system-%s' % qbsys > UnboundLocalError: local variable 'qbsys' referenced before assignment > -- snip -- > > [Yocto 12846] > > Signed-off-by: Jagadeesh Krishnanjanappa > --- > scripts/runqemu | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/scripts/runqemu b/scripts/runqemu > index f52b9a8..409d17c 100755 > --- a/scripts/runqemu > +++ b/scripts/runqemu > @@ -1118,6 +1118,11 @@ class BaseConfig(object): > qbsys = 'riscv64' > elif mach == 'qemuriscv32': > qbsys = 'riscv32' > +else: > +logger.error("Unable to determine QEMU PC System emulator for %s > machine." % mach) > +logger.error("As %s is not among valid QEMU machines such as," % > mach) > +logger.error("qemux86-64, qemux86, qemuarm64, qemuarm, > qemumips64, qemumips64el, qemumipsel, qemumips, qemuppc") > +raise RunQemuError("Set qb_system_name with suitable QEMU PC > System emulator in .*qemuboot.conf.") > > return 'qemu-system-%s' % qbsys > > -- > 1.8.3.1 > -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [meta-oe][PATCH 1/3] testimage: Refactoring and fixing.
I found a bug in my code where changing a variable, for example in layer.conf does not re-trigger the generation of the json file containing the data store at the time of image creation. The json file is generated in ROOTFS_POSTPROCESS_COMMAND += "write_image_test_data ; " @ meta/classes/rootfs-postcommands.bbclass. Can anybody tell me if changing a variable in the datastore and accessing it in the postprocess_command will never trigger the postprocess_command? It happens that in this case this variable is not important for the rootfs task itself but only for the post-process. Paulo Neves On Fri, Aug 10, 2018 at 9:38 PM Paulo Neves wrote: > > The testimage.bbclass invocation of controllers besides > simpletarget and qemutarget was broken. Setting TEST_TARGET > to class names did not work, only hardcoded values set in > context.py were allowed. On the other hand the other > TEST_TARGETs available were supposedly available through the > class name convetion but none of them were working. See: > https://bugzilla.yoctoproject.org/show_bug.cgi?id=12842 > > In this commit qemuwrapper and simpletarget TEST_TARGETS are > now not available through these names, but through the > common convention of class names. > > The code for layer defined controllers was outdated and > broken because the example controllers in meta-yocto-bsp as > well as the controllers available in masterimage were > dependent only on the datastore d being available for > __init__ contruction, when the testimage.bbclass and > context.py, which initialize test controllers never passed > the datastore. This commit fixes all the openembedded > controllers to not use the datastore, but the testdata json > file that is loaded by the testimage.bbclass. This way the > tests can still be exported to be ran outside bitbake. The > kwargs and logger is still passed in the constructor and > there maybe some redundancies between the kwargs and the td > test datstore, but this is not addressed in this commit. > > In masterimage.py there was a duplicate SystemdbootTarget > which was removed. It is my opinion that all targets should > go to meta-yocto-bsp or meta/ and should not get special > treatment whether they come from poky or other layer. > > In this commit functionality that was lost in masterimage > about retrieving a fresh BB_ORIGENV. The test data json file > does not store this variable, so the build-time enviromental > variables cannot be retrieved later on, when running the > tests. > > The deploy() method invocation of the test cases was removed > in the refactoring and this commit re-adds it in the same > logical place. The deploy method was added as an abstract > method so that all Test controller classes have this method. > This method had been lost and was not used in the > simpleremote and qemuwrapper, because these controllers do > not need the functionality, but almost any real board > requires certain steps to deploy the new images, before the > tests can be ran. An example of this need was visible in the > master image and subclasses in meta-yocto-bsp. > > A dependency on images fstypes of qemu was removed from > testimage. The allowed file system types were not relevant > for other controllers, and made it so that there was an > import of the OEQemuTarget python class applicable to all > possible controllers, including non qemu. > > The SimpleRemoteTarget, OEQemuTarget and a custom > controller, developed according to the manual were > successfully tested. > > Signed-off-by: Paulo Neves > --- > meta/classes/testimage.bbclass | 18 +--- > meta/lib/oeqa/controllers/masterimage.py | 107 > ++--- > .../target/qemu.py => controllers/qemutarget.py} | 30 -- > meta/lib/oeqa/controllers/simpleremote.py | 33 +++ > .../target/ssh.py => controllers/sshtarget.py} | 9 +- > meta/lib/oeqa/core/target/__init__.py | 4 + > meta/lib/oeqa/runtime/context.py | 32 +- > meta/lib/oeqa/targetcontrol.py | 97 ++- > 8 files changed, 137 insertions(+), 193 deletions(-) > rename meta/lib/oeqa/{core/target/qemu.py => controllers/qemutarget.py} (58%) > create mode 100644 meta/lib/oeqa/controllers/simpleremote.py > rename meta/lib/oeqa/{core/target/ssh.py => controllers/sshtarget.py} (98%) > > diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass > index 6fa901b..2aa59b0 100644 > --- a/meta/classes/testimage.bbclass > +++ b/meta/classes/testimage.bbclass > @@ -75,7 +75,7 @@ DEFAULT_TEST_SUITES_remove_qemumips64 = "${MIPSREMOVE}" > TEST_SUITES ?= "${DEFAULT_TEST_SUITES}" > > TEST_QEMUBOOT_TIMEOUT ?= "1000" > -TEST_TARGET ?= "qemu" > +TEST_TARGET ?= "OEQemuTarget" > > TESTIMAGEDEPENDS = "" > TESTIMAGEDEPENDS_qemuall = "qemu-native:do_populate_sysroot > qemu-helper-native:do_populate_sysroot > qemu-helper-native:do_addto_recipe_sysroot" > @@ -147,7 +147,6 @@ def testimage_main(d)