<?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>13815</bug_id>
          
          <creation_ts>2020-02-25 20:45:56 +0000</creation_ts>
          <short_desc>Reproducibility test failure occurs for deb even if package_deb is not set</short_desc>
          <delta_ts>2020-06-04 12:10:06 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>QA/Testing</classification>
          <product>Functional (self) Testing</product>
          <component>oe-selftest</component>
          <version>unspecified</version>
          <rep_platform>x86</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>3.2 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Trevor Gamblin">tvgamblin</reporter>
          <assigned_to name="Trevor Gamblin">tvgamblin</assigned_to>
          <cc>paul</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>tvgamblin</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>86587</commentid>
    <comment_count>0</comment_count>
    <who name="Trevor Gamblin">tvgamblin</who>
    <bug_when>2020-02-25 20:45:56 +0000</bug_when>
    <thetext>When running reproducible build tests with &quot;oe-selftest -r reproducible.ReproducibleTests.test_reproducible_builds&quot; and PACKAGE_CLASSES ?= &quot;package_ipk&quot; as set by default in local.conf, the reproducibility test fails while looking for a path for .deb files:

2020-02-24 11:38:22,777 - oe-selftest - INFO - Adding layer libraries:
2020-02-24 11:38:22,778 - oe-selftest - INFO -  /ala-lpggp31/tgamblin/yocto/oe-core.git/meta/lib
2020-02-24 11:38:22,778 - oe-selftest - INFO -  /ala-lpggp31/tgamblin/yocto/oe-core.git/meta-selftest/lib
2020-02-24 11:38:22,778 - oe-selftest - INFO -  /ala-lpggp31/tgamblin/yocto/meta-oe.git/meta-oe/lib
2020-02-24 11:38:22,779 - oe-selftest - INFO - Running bitbake -e to test the configuration is valid/parsable
2020-02-24 11:38:26,090 - oe-selftest - INFO - test_reproducible_builds (reproducible.ReproducibleTests)
2020-02-24 12:09:11,043 - oe-selftest - INFO - Reproducibility summary for ipk: same=7883 different=0 missing=0 total=7883
2020-02-24 12:09:11,072 - oe-selftest - INFO -  ... ======================================================================
2020-02-24 12:09:11,072 - oe-selftest - INFO - ERROR: test_reproducible_builds (reproducible.ReproducibleTests) (package_class=&apos;deb&apos;)
2020-02-24 12:09:11,072 - oe-selftest - INFO - ----------------------------------------------------------------------
2020-02-24 12:09:11,072 - oe-selftest - INFO - Traceback (most recent call last):
  File &quot;/ala-lpggp31/tgamblin/yocto/oe-core.git/meta/lib/oeqa/selftest/cases/reproducible.py&quot;, line 204, in test_reproducible_builds
    result = self.compare_packages(deploy_A, deploy_B, diffutils_sysroot)
  File &quot;/ala-lpggp31/tgamblin/yocto/oe-core.git/meta/lib/oeqa/selftest/cases/reproducible.py&quot;, line 115, in compare_packages
    os.chdir(test_dir)
FileNotFoundError: [Errno 2] No such file or directory: &apos;/ala-lpggp31/tgamblin/yocto/build-st/tmp-glibc/deploy/deb&apos;

2020-02-24 12:09:11,072 - oe-selftest - INFO - ----------------------------------------------------------------------
2020-02-24 12:09:11,073 - oe-selftest - INFO - Ran 1 test in 1844.983s
2020-02-24 12:09:11,073 - oe-selftest - INFO - FAILED
2020-02-24 12:09:11,073 - oe-selftest - INFO -  (errors=1)
2020-02-24 12:09:13,964 - oe-selftest - INFO - RESULTS:
2020-02-24 12:09:13,966 - oe-selftest - INFO - RESULTS - reproducible.ReproducibleTests.test_reproducible_builds: UNKNOWN (1844.98s)
2020-02-24 12:09:13,967 - oe-selftest - INFO - SUMMARY:
2020-02-24 12:09:13,967 - oe-selftest - INFO - oe-selftest () - Ran 1 test in 1846.735s
2020-02-24 12:09:13,968 - oe-selftest - INFO - oe-selftest - FAIL - Required tests failed (successes=0, skipped=0, failures=0, errors=1)
tgamblin@ala-lpggp3$

This looks like a problem with the way package_classes is defined in meta/lib/oeqa/selftest/cases/reproducible.py, line 81:

package_classes = [&apos;deb&apos;, &apos;ipk&apos;]

This doesn&apos;t fail for the autobuilder as it adds package_deb to its builds, and I can confirm that if I manually change PACKAGE_CLASSES before running oe-selftest, then the reproducibility test passes without issue.

What should the appropriate behavior be here? It&apos;s easy enough to change that line, but is that what we want? It doesn&apos;t seem like we&apos;d want to change how the default local.conf looks, so I&apos;m assuming that we maybe want a check to see which package types are enabled before the test runs?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86665</commentid>
    <comment_count>1</comment_count>
    <who name="Trevor Gamblin">tvgamblin</who>
    <bug_when>2020-03-05 15:30:25 +0000</bug_when>
    <thetext>Test behaves as expected if I use &quot;oe-selftest -r reproducible -j 1&quot; instead of &quot;oe-selftest -r reproducible&quot;. 

Likely tied to https://git.openembedded.org/openembedded-core/commit/?id=50238b0717b04e0a1fa69d618e8c8aa8445a80b0 as previously discussed.

Would be good if some others could try reproducing the same failures on master.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86668</commentid>
    <comment_count>2</comment_count>
    <who name="Trevor Gamblin">tvgamblin</who>
    <bug_when>2020-03-05 16:51:18 +0000</bug_when>
    <thetext>Note that when encountering this issue, I have the oe-core and bitbake layers, as well as the build directory specified to oe-init-build-env, at the same level.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86669</commentid>
    <comment_count>3</comment_count>
    <who name="Trevor Gamblin">tvgamblin</who>
    <bug_when>2020-03-05 17:42:54 +0000</bug_when>
    <thetext>Reproducibility works as expected for me if using *poky* - it&apos;s only the use of oe-core + bitbake layers independently where I&apos;m seeing the problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87395</commentid>
    <comment_count>4</comment_count>
    <who name="Paul Barker">paul</who>
    <bug_when>2020-06-03 13:09:58 +0000</bug_when>
    <thetext>Could you see if this patch fixes this issue? https://lists.openembedded.org/g/openembedded-core/message/139195</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87402</commentid>
    <comment_count>5</comment_count>
    <who name="Trevor Gamblin">tvgamblin</who>
    <bug_when>2020-06-04 04:37:41 +0000</bug_when>
    <thetext>Ran a build last night. It appears to work with that patch. Nice!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87425</commentid>
    <comment_count>6</comment_count>
    <who name="Trevor Gamblin">tvgamblin</who>
    <bug_when>2020-06-04 12:10:06 +0000</bug_when>
    <thetext>Now that the patch is in master and it&apos;s been tested successfully, this can be closed. Thanks Paul.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>