From 30848178ca583e41d0531202113b8fd37f650226 Mon Sep 17 00:00:00 2001 From: Erwan Velu Date: Fri, 25 Oct 2024 14:46:19 +0200 Subject: [PATCH] hwbench: Using absolute paths for out & tuning directories As per issue #38, the dmidecode call to save the SMBIOS table in a binary file for later reading is broken as the file is not present into the hwbench-out directory. It appear that when dmidecode --dump-file is called, that is done with a relative path. The stderr log show the following error : hwbench-out-20241025123459/dmidecode.bin: open: No such file or directory It appear the relative path passed to dmidecode is not existing because dmidecode is not started in the same home dir as we are currently running the tool. This commit is about using an absolute path instead of a relative one to ensure that every command/tool can dump content in the proper directory. With this patch, the dmidecode-bin file is now present in the hwbench-out archive. Signed-off-by: Erwan Velu --- hwbench/hwbench.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hwbench/hwbench.py b/hwbench/hwbench.py index 3f2fb9a..9124743 100755 --- a/hwbench/hwbench.py +++ b/hwbench/hwbench.py @@ -62,7 +62,7 @@ def create_output_directory() -> tuple[pathlib.Path, pathlib.Path]: tuning_out_dir = out_dir / "tuning" tuning_out_dir.mkdir() - return out_dir, tuning_out_dir + return out_dir.absolute(), tuning_out_dir.absolute() def parse_options():