<?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>16121</bug_id>
          
          <creation_ts>2026-01-05 09:42:00 +0000</creation_ts>
          <short_desc>AB-INT: BitbakeSetupTest.test_setup: Directory not empty</short_desc>
          <delta_ts>2026-01-15 16:18:42 +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>bitbake-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>AB-INT</status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>6.0 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mathieu Dubois-Briand">mathieu.dubois-briand</reporter>
          <assigned_to name="Alexander Kanavin">alex.kanavin</assigned_to>
          <cc>ccasciato</cc>
    
    <cc>paul</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</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>103681</commentid>
    <comment_count>0</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2026-01-05 09:42:00 +0000</bug_when>
    <thetext>Another new AB-INT, only happened on my branch so far. I did not find any obvious reason in the patches in there, but there is a lot of them, so it&apos;s still a possibility.

ERROR: test_setup (bb.tests.setup.BitbakeSetupTest.test_setup)
----------------------------------------------------------------------
Traceback (most recent call last):
  File &quot;/srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/bitbake/lib/bb/tests/setup.py&quot;, line 483, in test_setup
    out = self.runbbsetup(&quot;update --update-bb-conf=&apos;yes&apos;&quot;)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File &quot;/srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/bitbake/lib/bb/tests/setup.py&quot;, line 90, in runbbsetup
    return bb.process.run(&quot;{} --global-settings {} {}&quot;.format(bbsetup, os.path.join(self.tempdir, &apos;global-config&apos;), cmd))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File &quot;/srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/bitbake/lib/bb/process.py&quot;, line 189, in run
    raise ExecutionError(cmd, pipe.returncode, stdout, stderr)
bb.process.ExecutionError: Execution of &apos;/srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/bitbake/bin/bitbake-setup --global-settings /tmp/bitbake-fetch-7z9xt1_o/global-config update --update-bb-conf=&apos;yes&apos;&apos; failed with exit code 1:
Traceback (most recent call last):
  File &quot;/srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/bitbake/bin/bitbake-setup&quot;, line 1075, in &lt;module&gt;
    main()
  File &quot;/srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/bitbake/bin/bitbake-setup&quot;, line 1068, in main
    args.func(top_dir, all_settings, args, d)
  File &quot;/srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/bitbake/bin/bitbake-setup&quot;, line 700, in build_update
    build_status(top_dir, settings, args, d, update=True)
  File &quot;/srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/bitbake/bin/bitbake-setup&quot;, line 693, in build_status
    update_build(current_upstream_config, confdir, setupdir, layerdir,
  File &quot;/srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/bitbake/bin/bitbake-setup&quot;, line 376, in update_build
    setup_bitbake_build(bitbake_config, layerdir, setupdir, thisdir, update_bb_conf)
  File &quot;/srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/bitbake/bin/bitbake-setup&quot;, line 276, in setup_bitbake_build
    os.rename(bitbake_confdir, backup_bitbake_confdir)
OSError: [Errno 39] Directory not empty: &apos;/tmp/bitbake-fetch-7z9xt1_o/bitbake-builds/test-config-1-gadget/build/conf&apos; -&gt; &apos;/tmp/bitbake-fetch-7z9xt1_o/bitbake-builds/test-config-1-gadget/build/conf-backup.20260104112101&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103685</commentid>
    <comment_count>1</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2026-01-05 09:48:25 +0000</bug_when>
    <thetext>oe-selftest-debian debian12-vk-7 mathieu/master-next completed at 2026-01-04 12:48:01+00:00
https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/2955/steps/12/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103746</commentid>
    <comment_count>2</comment_count>
    <who name="Paul Barker">paul</who>
    <bug_when>2026-01-07 19:56:27 +0000</bug_when>
    <thetext>Names for conf-backup or conf-upstream directories created by bitbake-setup use a timestamp accuracy of 1 second. That&apos;s probably ok 99% of the time, but when running tests we might run bitbake-setup multiple times in one second.

We should modify bitbake-setup to handle the case where the conf-backup or conf-upstream directory already exists, or add some randomness to the names.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103782</commentid>
    <comment_count>3</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2026-01-09 09:12:26 +0000</bug_when>
    <thetext>oe-selftest-debian debian12-vk-7 mathieu/master-next completed at 2026-01-08 16:45:35+00:00
https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/2987/steps/12/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103786</commentid>
    <comment_count>4</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2026-01-09 10:09:53 +0000</bug_when>
    <thetext>This is triggered by &apos;bitbake-setup: correct (and test) several scenarios in layer checkout&apos; in testing, so that should be dropped until I submit a fixed revision.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103788</commentid>
    <comment_count>5</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2026-01-09 10:30:26 +0000</bug_when>
    <thetext>Noted, thanks. I will remove it from my branch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103792</commentid>
    <comment_count>6</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2026-01-09 13:42:25 +0000</bug_when>
    <thetext>Fixed in https://patchwork.yoctoproject.org/project/bitbake/list/?series=42094</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103932</commentid>
    <comment_count>7</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2026-01-15 16:18:42 +0000</bug_when>
    <thetext>https://git.openembedded.org/bitbake/commit/?id=e96b97e176b2fcc0bfdcf0151dff6df3ecaefcb3</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>