<?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>594</bug_id>
          
          <creation_ts>2010-12-14 13:23:33 +0000</creation_ts>
          <short_desc>Display an error when IMAGETEST is set but DISPLAY is not.</short_desc>
          <delta_ts>2011-04-18 15:59:35 +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>Meta-yocto</product>
          <component>meta-yocto</component>
          <version>1.0</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>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.0 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Scott Garman">scott.a.garman</reporter>
          <assigned_to name="Jiajun Xu">jiajun.xu</assigned_to>
          <cc>ke.yu</cc>
    
    <cc>kevin.tian</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>11158</commentid>
    <comment_count>0</comment_count>
    <who name="Scott Garman">scott.a.garman</who>
    <bug_when>2010-12-14 13:23:33 +0000</bug_when>
    <thetext>Because the qemu sanity tests need to open windows under Xorg, the DISPLAY variable needs to be set. If IMAGETEST is set in local.conf but DISPLAY is not, the following python error will occur:

Source: http://autobuilder.pokylinux.org:8010/builders/poky-incremental/builds/29/steps/shell_20/logs/stdio

NOTE: package poky-image-lsb-1.0-r0: task do_qemuimagetest: Started
ERROR: There was an error when executing a python function in: /builds1/pokybuild/poky-slave/poky-incremental/build/meta/recipes-extended/images/poky-image-lsb.bb
ERROR: Exception:&lt;type &apos;exceptions.TypeError&apos;&gt; Message:putenv() argument 2 must be string, not None
ERROR: The stack trace of python calls that resulted in thie exception/failure was:
ERROR:   File &quot;do_qemuimagetest&quot;, line 4, in &lt;module&gt;
ERROR: 
ERROR:   File &quot;do_qemuimagetest&quot;, line 2, in do_qemuimagetest
ERROR: 
ERROR:   File &quot;imagetest-qemu.bbclass&quot;, line 111, in qemuimagetest_main
ERROR: 
ERROR:   File &quot;imagetest-qemu.bbclass&quot;, line 34, in runtest
ERROR: 
ERROR:   File &quot;/usr/lib64/python2.6/os.py&quot;, line 471, in __setitem__
ERROR:     putenv(key, item)
ERROR: 
ERROR: The code that was being executed was:
ERROR:      0001:def do_qemuimagetest(d):
ERROR:      0002:    qemuimagetest_main(d)
ERROR:      0003:
ERROR:  *** 0004:do_qemuimagetest(d)
ERROR: (file: &apos;do_qemuimagetest&apos;, lineno: 4, function: &lt;module&gt;)
ERROR:      0001:def do_qemuimagetest(d):
ERROR:  *** 0002:    qemuimagetest_main(d)
ERROR:      0003:
ERROR:      0004:do_qemuimagetest(d)
ERROR: (file: &apos;do_qemuimagetest&apos;, lineno: 2, function: do_qemuimagetest)
ERROR: Task failed: (&apos;Function do_qemuimagetest failed&apos;, &apos;/builds1/pokybuild/poky-slave/poky-incremental/build/build/tmp/work/qemuarm-poky-linux-gnueabi/poky-image-lsb-1.0-r0/temp/log.do_qemuimagetest.5017&apos;)
ERROR: Logfile of failure stored in: /builds1/pokybuild/poky-slave/poky-incremental/build/build/tmp/work/qemuarm-poky-linux-gnueabi/poky-image-lsb-1.0-r0/temp/log.do_qemuimagetest.5017
Log data follows:
| ERROR: There was an error when executing a python function in: /builds1/pokybuild/poky-slave/poky-incremental/build/meta/recipes-extended/images/poky-image-lsb.bb
| ERROR: Exception:&lt;type &apos;exceptions.TypeError&apos;&gt; Message:putenv() argument 2 must be string, not None
| ERROR: The stack trace of python calls that resulted in thie exception/failure was:
| ERROR:   File &quot;do_qemuimagetest&quot;, line 4, in &lt;module&gt;
| ERROR:
| ERROR:   File &quot;do_qemuimagetest&quot;, line 2, in do_qemuimagetest
| ERROR:
| ERROR:   File &quot;imagetest-qemu.bbclass&quot;, line 111, in qemuimagetest_main
| ERROR:
| ERROR:   File &quot;imagetest-qemu.bbclass&quot;, line 34, in runtest
| ERROR:
| ERROR:   File &quot;/usr/lib64/python2.6/os.py&quot;, line 471, in __setitem__
| ERROR:     putenv(key, item)
| ERROR:
| ERROR: The code that was being executed was:
| ERROR:      0001:def do_qemuimagetest(d):
| ERROR:      0002:    qemuimagetest_main(d)
| ERROR:      0003:
| ERROR:  *** 0004:do_qemuimagetest(d)
| ERROR: (file: &apos;do_qemuimagetest&apos;, lineno: 4, function: &lt;module&gt;)
| ERROR:      0001:def do_qemuimagetest(d):
| ERROR:  *** 0002:    qemuimagetest_main(d)
| ERROR:      0003:
| ERROR:      0004:do_qemuimagetest(d)
| ERROR: (file: &apos;do_qemuimagetest&apos;, lineno: 2, function: do_qemuimagetest)
| ERROR: Task failed: (&apos;Function do_qemuimagetest failed&apos;, &apos;/builds1/pokybuild/poky-slave/poky-incremental/build/build/tmp/work/qemuarm-poky-linux-gnueabi/poky-image-lsb-1.0-r0/temp/log.do_qemuimagetest.5017&apos;)

To fix this, Richard suggested that we should error out immediately if this condition is detected. This is something that could be added to sanity.bbclass.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11220</commentid>
    <comment_count>1</comment_count>
    <who name="Ke Yu">ke.yu</who>
    <bug_when>2010-12-16 18:04:35 +0000</bug_when>
    <thetext>Fixed in commit b99fd0374e554f4d2183f349f271220951299c9a</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13348</commentid>
    <comment_count>2</comment_count>
    <who name="Scott Garman">scott.a.garman</who>
    <bug_when>2011-04-18 15:59:35 +0000</bug_when>
    <thetext>Verified that the following error is displayed when IMAGETEST is set but DISPLAY is not:

&quot;qemuimagetest needs a X desktop to start qemu, please set DISPLAY correctly (e.g. DISPLAY=:1.0)&quot;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>