<?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>7928</bug_id>
          
          <creation_ts>2015-06-27 22:01:23 +0000</creation_ts>
          <short_desc>devtool selftest assumes 192.168.7.2</short_desc>
          <delta_ts>2015-08-18 07:20:36 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>devtools / tool chain</component>
          <version>1.8</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>High</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.9 M2</target_milestone>
          
          <blocked>7994</blocked>
    
    <blocked>8176</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Richard Purdie">richard.purdie</reporter>
          <assigned_to name="Paul Eggleton">bluelightning</assigned_to>
          <cc>alexandru.c.georgescu</cc>
    
    <cc>bluelightning</cc>
    
    <cc>daniel.alexandrux.istrate</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
          
          <qa_contact name="Daniel Istrate">daniel.alexandrux.istrate</qa_contact>
          <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>51976</commentid>
    <comment_count>0</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-06-27 22:01:23 +0000</bug_when>
    <thetext>devtool selftest assumes 192.168.7.2 which breaks on the autobuilders since this isn&apos;t a valid assumption. This address isn&apos;t used on fedora22 which results in:

https://autobuilder.yoctoproject.org/main/builders/nightly-oe-selftest/builds/42/steps/Running%20oe-selftest/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51978</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-06-28 08:50:47 +0000</bug_when>
    <thetext>Note we have now fixed networking on the autobuilders. This test should figure out which IP address qemu is using though, not hardcode it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52230</commentid>
    <comment_count>2</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2015-07-09 09:48:14 +0000</bug_when>
    <thetext>How are the tap device(s) and routes setup in the autobuilder setup? Using the runqemu-* scripts or something else?

Do you think it would it be feasible to do something simple like
$ ip route | grep tap | awk &apos;{print $1}&apos;

to get the ip address?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52258</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-07-09 19:21:15 +0000</bug_when>
    <thetext>qemurunner.py is how we do this for the runtime tests. The autobuilder devices are setup by runqemu-gen-tapdevs.

Unfortunately other QA tests have now copied this code so we have the problem in multiple places. CC&apos;ing Daniel who is also looking at this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52274</commentid>
    <comment_count>4</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-07-10 09:54:31 +0000</bug_when>
    <thetext>I have to take the blame for devtool&apos;s QA test, the 192.168.7.2 assumption was very naive; but I&apos;m not sure that the image feature tests copied what was done there - the implementation there is separate. Whatever we come up with in terms of doing this properly they ought to be sharing code though, agreed.

However, the other concern here is if we have too many tests that run their own instances of qemu for each test, that&apos;s going to be quite a bit of overhead vs. the runtime tests which boot up an instance and then use it for multiple tests. We might be able to reduce that by using kvm instead of the default software emulation in qemu perhaps, but I can&apos;t help feeling that there ought to be some kind of bridge between the runtime tests and oe-selftest because the overlap is probably only going to get bigger as time goes on.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52276</commentid>
    <comment_count>5</comment_count>
    <who name="Daniel Istrate">daniel.alexandrux.istrate</who>
    <bug_when>2015-07-10 10:52:48 +0000</bug_when>
    <thetext>Hi,

If you need to determine the ip address of the qemu machine, you can take a look at it&apos;s start sequence and determine the ip address from there.
For instanse:
daniel@ubuntu-ws:~/poky-test/build$ runqemu qemux86

Continuing with the following parameters:
KERNEL: [/home/daniel/poky-test/build/tmp/deploy/images/qemux86/bzImage-qemux86.bin]
ROOTFS: [/home/daniel/poky-test/build/tmp/deploy/images/qemux86/core-image-minimal-qemux86-20150709115504.rootfs.ext4]
FSTYPE: [ext4]
Acquiring lockfile for tap2...
Acquiring lockfile for tap1...
Setting up tap interface under sudo
Acquiring lockfile for tap0...
Running qemu-system-i386...
/home/daniel/poky-test/build/tmp/sysroots/x86_64-linux/usr/bin/qemu-system-i386 -kernel /home/daniel/poky-test/build/tmp/deploy/images/qemux86/bzImage-qemux86.bin -net nic,vlan=0 -net tap,vlan=0,ifname=tap0,script=no,downscript=no -cpu qemu32 -drive file=/home/daniel/poky-test/build/tmp/deploy/images/qemux86/core-image-minimal-qemux86-20150709115504.rootfs.ext4,if=ide,format=raw -show-cursor -usb -usbdevice wacom-tablet -vga vmware -no-reboot -m 256 --append &quot;vga=0 uvesafb.mode_option=640x480-32 root=/dev/hda rw mem=256M ip=192.168.7.2::192.168.7.1:255.255.255.0 oprofile.timer=1 rootfstype=ext4 &quot;

On the last line you can see the ip as being ip=192.168.7.2
Determining the tap interface would be to look for this pattern:
&apos;Setting up tap interface under sudo
Acquiring lockfile for tap\d+...&apos;

--Daniel</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52304</commentid>
    <comment_count>6</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2015-07-13 07:51:28 +0000</bug_when>
    <thetext>What do you think about using QemuRunner for running qemu in the selftests, too? That way we could use all it&apos;s facilities directly, i.e. QemuRunner.ip et al.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52306</commentid>
    <comment_count>7</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-07-13 09:26:11 +0000</bug_when>
    <thetext>(In reply to comment #6)
&gt; What do you think about using QemuRunner for running qemu in the selftests,
&gt; too?

I think that would be a good start, yes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52642</commentid>
    <comment_count>8</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-07-28 08:37:04 +0000</bug_when>
    <thetext>Fix merged to master:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=67a3807c4cccc6b258e2e82038f3cdce453e709b
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=69bae0651e393cd5fe4fd196c4d60f4609aef05f
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=76d8c4e97c9dbf9e50d8e73805f77b8404a53caf
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=edc7780ab749534176780a247ab36d4a1575bc30</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53174</commentid>
    <comment_count>9</comment_count>
    <who name="Daniel Istrate">daniel.alexandrux.istrate</who>
    <bug_when>2015-08-18 07:20:36 +0000</bug_when>
    <thetext>Fixed with edc7780ab749534176780a247ab36d4a1575bc30</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>