<?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>6921</bug_id>
          
          <creation_ts>2014-10-31 20:21:24 +0000</creation_ts>
          <short_desc>ptest automated testing says passed when it failed</short_desc>
          <delta_ts>2015-02-19 16:19:40 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>QA/Testing</classification>
          <product>Runtime Testing</product>
          <component>general</component>
          <version>1.7</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</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 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ross Burton">ross.burton</reporter>
          <assigned_to name="Lucian Musat">georgex.l.musat</assigned_to>
          <cc>alexandru.c.georgescu</cc>
    
    <cc>georgex.l.musat</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>46713</commentid>
    <comment_count>0</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2014-10-31 20:21:24 +0000</bug_when>
    <thetext>So I added _ptest to TEST_SUITES and ptest-pkgs to IMAGE_FEATURES, built and image and ran the tests.

test_ptestrunner (oeqa.runtime._ptest.PtestRunnerTest) ... NOTE: Installing complementary packages ...
ok

Lies.  It either failed to install ptest-runner and assumed it worked, or it&apos;s eating the numerous errors that should have happened:

root@qemux86-64:/usr/lib/libpcre/ptest# ./run-ptest
make[1]: Entering directory &apos;/usr/lib/libpcre/ptest&apos;
PASS: pcre_stringpiece_unittest
FAIL: RunTest
PASS: RunGrepTest
============================================================================
Testsuite summary for PCRE 8.34
============================================================================
# TOTAL: 3
# PASS:  2
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0
============================================================================
See ./test-suite.log
============================================================================
Makefile:73: recipe for target &apos;test-suite.log&apos; failed
make[1]: *** [test-suite.log] Error 1
make[1]: Leaving directory &apos;/usr/lib/libpcre/ptest&apos;
Makefile:159: recipe for target &apos;check-TESTS&apos; failed
make: *** [check-TESTS] Error 2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46714</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2014-10-31 22:02:43 +0000</bug_when>
    <thetext>During an *in progress* ptest run:

root@qemux86-64:~# grep FAIL: /tmp/ptest.log  | wc -l
399

An hour later, it finished:

core-image-sato - Ran 24 tests in 5099.061s
core-image-sato - OK - All required tests passed (skipped=1)

Lies! :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46783</commentid>
    <comment_count>2</comment_count>
    <who name="Lucian Musat">georgex.l.musat</who>
    <bug_when>2014-11-06 09:34:56 +0000</bug_when>
    <thetext>Hello Ross,

To do a ptest succesfully I build a ptest capable image using these configurations in local.conf:

IMAGE_FEATURES_append = &quot; ptest-pkgs&quot;
IMAGE_INSTALL_append = &quot; ptest-runner&quot;
INHERIT += &quot;buildhistory&quot;
INHERIT += &quot;testimage&quot;
TEST_SUITES = &quot; _ptest&quot;

Buildhistory is mandatory and that test should fail without it. I also see that you skipped ptest-runner image install.

But you are right, it seems that a check to see if ptest-runner actually ran succesfully is missing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46784</commentid>
    <comment_count>3</comment_count>
    <who name="Lucian Musat">georgex.l.musat</who>
    <bug_when>2014-11-06 09:45:53 +0000</bug_when>
    <thetext>Also I need to underline here that is a difference between the ptest unittest running succesfully and the actual ptest output, that needs to be analyzed separately. 

Ex:

tmp/work/genericx86_64-poky-linux/core-image-sato-sdk/1.0-r0/testimage/ptest-20141106084139.log

That is then parsed into:
tmp/work/genericx86_64-poky-linux/core-image-sato-sdk/1.0-r0/core-image-sato-sdk-1.0/results$ ls
fail.acl  fail.attr  fail.perl  fail.quilt

For example we could make the unittest fail every time a &quot;fail.*&quot; file is resulted but I don&apos;t think that the test will ever pass with this condition.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48938</commentid>
    <comment_count>4</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2015-02-19 16:03:35 +0000</bug_when>
    <thetext>Lucian, is &quot;oeqa/ptest: Fixed complementary package install detection and added ptest-runner exit code check&quot; the fix for this?

(oe-core b214c7b901fe0fad081d7a97f9e91cc218c66bd6)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48942</commentid>
    <comment_count>5</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2015-02-19 16:19:40 +0000</bug_when>
    <thetext>Yes, it is.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>