<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>11748</bug_id>
          
          <creation_ts>2017-07-03 16:32:34 +0000</creation_ts>
          <short_desc>Machine given to runqemu util is overwritten</short_desc>
          <delta_ts>2017-09-11 02:57:42 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>QA/Testing</classification>
          <product>Build Testing</product>
          <component>general</component>
          <version>2.4</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>NOTABUG</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.4 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Humberto Ibarra">humberto.ibarra.lopez</reporter>
          <assigned_to name="Robert Yang">liezhi.yang</assigned_to>
          <cc>jair.de.jesus.gonzalez.plascencia</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>74716</commentid>
    <comment_count>0</comment_count>
    <who name="Humberto Ibarra">humberto.ibarra.lopez</who>
    <bug_when>2017-07-03 16:32:34 +0000</bug_when>
    <thetext>Trying to make a testcase giving a wrong machine to runqemu as follows:

    def test_wrong_machine(self):
        &quot;&quot;&quot;Test runqemu with wrong machine&quot;&quot;&quot;
        cmd = &quot;%s %s&quot; % (self.cmd_common, &apos;qemuarm&apos;)
        with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu:
            self.assertTrue(qemu.runner.logged, &quot;Failed: %s&quot; % cmd)

The build done was a qemux86-64, from selftest, so it was expected that giving qemuarm to runqemu would cause the test to fail. It didn&apos;t happen that way, the runqemu util seems to get the qemuarm value but at some point it overwrites it with qemux86-64 and the test passes. Here is the output:

Output from runqemu:
runqemu - INFO - Assuming MACHINE = qemuarm
runqemu - INFO - Running MACHINE=qemuarm bitbake -e...
runqemu - INFO - MACHINE: qemuarm
runqemu - INFO - DEPLOY_DIR_IMAGE: /home/humberto/poky/build/tmp/deploy/images/qemux86-64
runqemu - INFO - Running ls -t /home/humberto/poky/build/tmp/deploy/images/qemux86-64/*.qemuboot.conf...
runqemu - INFO - CONFFILE: /home/humberto/poky/build/tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64-20170703160717.qemuboot.conf
runqemu - INFO - Continuing with the following parameters:

runqemu - INFO - Running /usr/sbin/ip link...
runqemu - INFO - Acquiring lockfile /tmp/qemu-tap-locks/tap0.lock...
runqemu - INFO - Using preconfigured tap device tap0
runqemu - INFO - If this is not intended, touch /tmp/qemu-tap-locks/tap0.skip to make runqemu skip tap0.
runqemu - INFO - Network configuration: 192.168.7.2::192.168.7.1:255.255.255.0
runqemu - INFO - Running ldd tmp/work/x86_64-linux/qemu-helper-native/1.0-r1/recipe-sysroot-native/usr/bin//qemu-system-x86_64...
runqemu - INFO - Running tmp/work/x86_64-linux/qemu-helper-native/1.0-r1/recipe-sysroot-native/usr/bin//qemu-system-x86_64 -device virtio-net-pci,netdev=net0,mac=52:54:00:12:34:02 -netdev tap,id=net0,ifname=tap0,script=no,downscript=no -drive file=tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64-20170703160717.rootfs.ext4,if=virtio,format=raw -vga vmware -show-cursor -usb -usbdevice tablet -device virtio-rng-pci  -nographic -serial tcp:127.0.0.1:56917  -cpu core2duo -m 256 -serial tcp:127.0.0.1:48241 -kernel tmp/deploy/images/qemux86-64/bzImage--4.10.17+git0+4b89f331d4_6648a34e00-r0-qemux86-64-20170629102456.bin -append &apos;root=/dev/vda rw highres=off  console=ttyS0 mem=256M ip=192.168.7.2::192.168.7.1:255.255.255.0 vga=0 uvesafb.mode_option=640x480-32 oprofile.timer=1 uvesafb.task_timeout=-1 console=tty1 console=ttyS0,115200n8 printk.time=1&apos;


As seen, the qemuarm value is received, but it is soon changed to qemux86-64 when looking for a conf file.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76711</commentid>
    <comment_count>1</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2017-09-11 02:57:42 +0000</bug_when>
    <thetext>The real problem is DEPLOY_DIR_IMAGE is exported somewhere, runqemu doesn&apos;t know  whether qemuarm is a MACHINE or not, it needs guess. And then it will look DEPLOY_DIR_IMAGE, so you need unset DEPLOY_DIR_IMAGE to test it.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>