From: Alexis Lothoré <alexis.loth...@bootlin.com> The recently introduced postactions module can raise, on failing ptests, the following warning:
WARNING: core-image-ptest-glib-2.0-1.0-r0 do_testimage: Can not get host disk usage: [Errno 2] No such file or directory: '/usr/bin/df' The issue is likely not happening because of df absence (to be confirmed amongst the variety of workers) but because of the wrong path. Fix it by letting subprocess search for df, passing only the binary name. To make it work, we also have to reset the environment, otherwise the environment configured before running bitbake will be used, and search will fail. --- Example of such failure can be found on the autobuilder, as detected by Richard: https://autobuilder.yoctoproject.org/typhoon/#/builders/82/builds/6136/steps/13/logs/stdio Signed-off-by: Alexis Lothoré <alexis.loth...@bootlin.com> --- meta/lib/oeqa/utils/postactions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/lib/oeqa/utils/postactions.py b/meta/lib/oeqa/utils/postactions.py index 03cecdc21578..8104400ac258 100644 --- a/meta/lib/oeqa/utils/postactions.py +++ b/meta/lib/oeqa/utils/postactions.py @@ -38,7 +38,7 @@ def get_host_disk_usage(d, tc): output_file = os.path.join(get_json_result_dir(d), "artifacts", "host_disk_usage.txt") try: with open(output_file, 'w') as f: - output = subprocess.run(['/usr/bin/df', '-hl'], check=True, text=True, stdout=f) + output = subprocess.run(['df', '-hl'], check=True, text=True, stdout=f, env={}) except Exception as e: bb.warn(f"Can not get host disk usage: {e}") -- 2.43.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#196397): https://lists.openembedded.org/g/openembedded-core/message/196397 Mute This Topic: https://lists.openembedded.org/mt/104626401/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-