Bug 16121 - AB-INT: BitbakeSetupTest.test_setup: Directory not empty
Summary: AB-INT: BitbakeSetupTest.test_setup: Directory not empty
Status: RESOLVED FIXED
Alias: None
Product: Functional (self) Testing
Classification: QA/Testing
Component: bitbake-selftest (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 6.0 M2
Assignee: Alexander Kanavin
QA Contact:
URL:
Whiteboard: AB-INT
Depends on:
Blocks:
 
Reported: 2026-01-05 09:42 UTC by Mathieu Dubois-Briand
Modified: 2026-01-15 16:18 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mathieu Dubois-Briand 2026-01-05 09:42:00 UTC
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's still a possibility.

ERROR: test_setup (bb.tests.setup.BitbakeSetupTest.test_setup)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/bitbake/lib/bb/tests/setup.py", line 483, in test_setup
    out = self.runbbsetup("update --update-bb-conf='yes'")
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/bitbake/lib/bb/tests/setup.py", line 90, in runbbsetup
    return bb.process.run("{} --global-settings {} {}".format(bbsetup, os.path.join(self.tempdir, 'global-config'), cmd))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/bitbake/lib/bb/process.py", line 189, in run
    raise ExecutionError(cmd, pipe.returncode, stdout, stderr)
bb.process.ExecutionError: Execution of '/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='yes'' failed with exit code 1:
Traceback (most recent call last):
  File "/srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/bitbake/bin/bitbake-setup", line 1075, in <module>
    main()
  File "/srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/bitbake/bin/bitbake-setup", line 1068, in main
    args.func(top_dir, all_settings, args, d)
  File "/srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/bitbake/bin/bitbake-setup", line 700, in build_update
    build_status(top_dir, settings, args, d, update=True)
  File "/srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/bitbake/bin/bitbake-setup", line 693, in build_status
    update_build(current_upstream_config, confdir, setupdir, layerdir,
  File "/srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/bitbake/bin/bitbake-setup", line 376, in update_build
    setup_bitbake_build(bitbake_config, layerdir, setupdir, thisdir, update_bb_conf)
  File "/srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/bitbake/bin/bitbake-setup", line 276, in setup_bitbake_build
    os.rename(bitbake_confdir, backup_bitbake_confdir)
OSError: [Errno 39] Directory not empty: '/tmp/bitbake-fetch-7z9xt1_o/bitbake-builds/test-config-1-gadget/build/conf' -> '/tmp/bitbake-fetch-7z9xt1_o/bitbake-builds/test-config-1-gadget/build/conf-backup.20260104112101'
Comment 1 Mathieu Dubois-Briand 2026-01-05 09:48:25 UTC
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
Comment 2 Paul Barker 2026-01-07 19:56:27 UTC
Names for conf-backup or conf-upstream directories created by bitbake-setup use a timestamp accuracy of 1 second. That'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.
Comment 3 Mathieu Dubois-Briand 2026-01-09 09:12:26 UTC
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
Comment 4 Alexander Kanavin 2026-01-09 10:09:53 UTC
This is triggered by 'bitbake-setup: correct (and test) several scenarios in layer checkout' in testing, so that should be dropped until I submit a fixed revision.
Comment 5 Mathieu Dubois-Briand 2026-01-09 10:30:26 UTC
Noted, thanks. I will remove it from my branch.
Comment 6 Alexander Kanavin 2026-01-09 13:42:25 UTC
Fixed in https://patchwork.yoctoproject.org/project/bitbake/list/?series=42094