<?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>8263</bug_id>
          
          <creation_ts>2015-09-07 04:14:27 +0000</creation_ts>
          <short_desc>runqemu script gets confused if tap0 is already taken</short_desc>
          <delta_ts>2015-11-11 09:40:21 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>ADT</product>
          <component>adt</component>
          <version>1.8</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.8.2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Gianluigi Tiesi">sherpya</reporter>
          <assigned_to name="Joshua Lock">joshuagloe</assigned_to>
          <cc>joshuagloe</cc>
    
    <cc>poky.adt.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sherpya</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>53766</commentid>
    <comment_count>0</comment_count>
      <attachid>2710</attachid>
    <who name="Gianluigi Tiesi">sherpya</who>
    <bug_when>2015-09-07 04:14:27 +0000</bug_when>
    <thetext>Created attachment 2710
proposed fix

runqemu script fails in a strange way if tap0 is already taken.
It starts but no root is specified so the kernel panics. It&apos;s a bit misleading since has nothing to do with root fs.

Acquiring lockfile for tap0@NONE...                                                                                                                                                           
Using preconfigured tap device &apos;tap0@NONE&apos;                                                                                                                                                    
If this is not intended, touch /tmp/qemu-tap-locks/tap0@NONE.skip to make runqemu skip tap0@NONE.                                                                                             
/home/sherpya/poky/scripts/runqemu-internal: line 256: 0@NONE: value too great for base (error token is &quot;0@NONE&quot;)    

by touching the file, the scripts creates tap1 instead and it works

as I see the script uses ip link to get tap devices on my kernel 4.1.6
it shows them as:
5: tap0@NONE: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 100
    link/ether 72:15:34:8b:75:a9 brd ff:ff:ff:ff:ff:ff
7: tap1@NONE: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 500
    link/ether 32:f1:bb:36:25:c6 brd ff:ff:ff:ff:ff:ff

attached patch fixes the problem using a regexp instead, it&apos;s made against fido, but since it&apos;s one liner it should not be difficult to apply to master

a side note, you don&apos;t need to pipe grep, awk already does it</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53802</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-09-07 17:04:06 +0000</bug_when>
    <thetext>Was this fixed in master with http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=0968e3a68b0b06caeb827938ddf556f21bfce646 ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53808</commentid>
    <comment_count>2</comment_count>
    <who name="Gianluigi Tiesi">sherpya</who>
    <bug_when>2015-09-08 04:41:42 +0000</bug_when>
    <thetext>yes, anyway it does not prevent future name changes :D
please cherry-pick the fix on fido</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53910</commentid>
    <comment_count>3</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2015-09-10 10:47:57 +0000</bug_when>
    <thetext>I&apos;ve queued this cherry-pick in my joshuagl/fido-next branch

http://cgit.openembedded.org/openembedded-core-contrib/log/?h=joshuagl/fido-next</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56237</commentid>
    <comment_count>4</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-11-05 16:12:47 +0000</bug_when>
    <thetext>Fixed with http://git.yoctoproject.org/cgit.cgi/poky/commit/scripts/runqemu-internal?h=fido&amp;id=78b2eaa5163d61e051e0511a6223c344d1b1c2eb</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56376</commentid>
    <comment_count>5</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2015-11-11 09:40:21 +0000</bug_when>
    <thetext>Fixed in 1.8.1</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>2710</attachid>
            <date>2015-09-07 04:14:27 +0000</date>
            <delta_ts>2015-09-07 04:14:27 +0000</delta_ts>
            <desc>proposed fix</desc>
            <filename>qemu-tap-detection.diff</filename>
            <type>text/plain</type>
            <size>470</size>
            <attacher name="Gianluigi Tiesi">sherpya</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL3NjcmlwdHMvcnVucWVtdS1pbnRlcm5hbCBiL3NjcmlwdHMvcnVucWVtdS1p
bnRlcm5hbAppbmRleCBlMzQ2YzY0Li5hZWRiOTdhIDEwMDc1NQotLS0gYS9zY3JpcHRzL3J1bnFl
bXUtaW50ZXJuYWwKKysrIGIvc2NyaXB0cy9ydW5xZW11LWludGVybmFsCkBAIC0xNzksNyArMTc5
LDcgQEAgZWxzZQogICAgICAgICAgICAgICAgZXhpdCAxCiAgICAgICAgIGZpCiAKLSAgICAgICAg
UE9TU0lCTEU9YCRJRkNPTkZJRyBsaW5rIHwgZ3JlcCAndGFwJyB8IGF3ayAne3ByaW50ICQyfScg
fCBzZWQgcy86Ly9gCisgICAgICAgIFBPU1NJQkxFPWAkSUZDT05GSUcgbGluayB8IGF3ayAnbWF0
Y2goJDAsIC90YXBbMC05XSsvKSB7IHByaW50IHN1YnN0cigkMCwgUlNUQVJULCBSTEVOR1RIKTsg
fSdgCiAgICAgICAgIFRBUD0iIgogICAgICAgICBMT0NLRklMRT0iIgogICAgICAgICBVU0VfUFJF
Q09ORl9UQVA9Im5vIgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>