Skip to content

Log the origin of manifest search paths#1878

Draft
GloriousTacoo wants to merge 4 commits intoKhronosGroup:mainfrom
GloriousTacoo:loader-search-path
Draft

Log the origin of manifest search paths#1878
GloriousTacoo wants to merge 4 commits intoKhronosGroup:mainfrom
GloriousTacoo:loader-search-path

Conversation

@GloriousTacoo
Copy link

An attempt to fix Issue #1401.

I have a solid idea on how to log manifest path origins using a custom dynamic list, but I will need to setup infrastructure for this new list. Then I can replace the core function copy_data_file_info() with my own implementation.

[ ] Create an API for for this new dynamic list (init, destroy, append, etc.).
[ ] Write tests to valid expected dynamic list behavior.
[ ] Replace copy_data_file_info().
[ ] Write tests to validate expected function behavior.

@ci-tester-lunarg
Copy link

Author GloriousTacoo not on autobuild list. Waiting for curator authorization before starting CI build.

1 similar comment
@ci-tester-lunarg
Copy link

Author GloriousTacoo not on autobuild list. Waiting for curator authorization before starting CI build.

@CLAassistant
Copy link

CLAassistant commented Mar 13, 2026

CLA assistant check
All committers have signed the CLA.

Adds `loader_search_path_origin`, `loader_search_path`, and
`loader_search_path_list`.

These will be used to track the origin of a manifest path. For example,
manifest files loaded from "etc/" will originate from
`LOADER_SEARCH_PATH_ORIGIN_SYSCONFIG`.

Signed-off-by: Ronald Caesar <github43132@proton.me>
@ci-tester-lunarg
Copy link

Author GloriousTacoo not on autobuild list. Waiting for curator authorization before starting CI build.

5 similar comments
@ci-tester-lunarg
Copy link

Author GloriousTacoo not on autobuild list. Waiting for curator authorization before starting CI build.

@ci-tester-lunarg
Copy link

Author GloriousTacoo not on autobuild list. Waiting for curator authorization before starting CI build.

@ci-tester-lunarg
Copy link

Author GloriousTacoo not on autobuild list. Waiting for curator authorization before starting CI build.

@ci-tester-lunarg
Copy link

Author GloriousTacoo not on autobuild list. Waiting for curator authorization before starting CI build.

@ci-tester-lunarg
Copy link

Author GloriousTacoo not on autobuild list. Waiting for curator authorization before starting CI build.

The code structure is similar to create_string_list() and
loader_init_generic_list()

Signed-off-by: Ronald Caesar <github43132@proton.me>
This is your typical function for freeing memory

Signed-off-by: Ronald Caesar <github43132@proton.me>
Signed-off-by: Ronald Caesar <github43132@proton.me>
@ci-tester-lunarg
Copy link

Author GloriousTacoo not on autobuild list. Waiting for curator authorization before starting CI build.

1 similar comment
@ci-tester-lunarg
Copy link

Author GloriousTacoo not on autobuild list. Waiting for curator authorization before starting CI build.

@GloriousTacoo
Copy link
Author

I'm trying to add a new test file to the test_regression executable to test the functions in loader.h but got the following error:

[2/3] Building CXX object tests/CMakeFiles/test_regression.dir/loader_search_path_list_tests.cpp.o
FAILED: [code=1] tests/CMakeFiles/test_regression.dir/loader_search_path_list_tests.cpp.o 
/usr/lib/ccache/bin/c++ -DDEBUG -DEXTRASYSCONFDIR=\"/etc\" -DFALLBACK_CONFIG_DIRS=\"/etc/xdg\" -DFALLBACK_DATA_DIRS=\"/usr/local/share:/usr/share\" -DFRAMEWORK_CONFIG_HEADER=\"/home/apollo/dev/Vulkan-Loader/build/tests/framework/framework_config_Debug.h\" -DGIT_BRANCH_NAME=\"loader-search-path\" -DGIT_TAG_INFO=\"v1.4.345-6-g19fbea66d\" -DHAVE_REALPATH -DHAVE_SECURE_GETENV -DSYSCONFDIR=\"/usr/local/etc\" -DVK_ENABLE_BETA_EXTENSIONS -DVK_NO_PROTOTYPES -DVK_USE_PLATFORM_WAYLAND_KHR -DVK_USE_PLATFORM_XCB_KHR -DVK_USE_PLATFORM_XLIB_KHR -DVK_USE_PLATFORM_XLIB_XRANDR_EXT -I/home/apollo/dev/Vulkan-Loader/build/tests/framework -I/home/apollo/dev/Vulkan-Loader/tests/framework/util -I/home/apollo/dev/Vulkan-Loader/tests/framework/util/.. -I/home/apollo/dev/Vulkan-Loader/build/tests/framework/util -I/home/apollo/dev/Vulkan-Loader -I/home/apollo/dev/Vulkan-Loader/build/tests/framework/shim -I/home/apollo/dev/Vulkan-Loader/tests/framework/shim -isystem /home/apollo/dev/Vulkan-Loader/external/Debug/64/googletest/googletest/include -isystem /home/apollo/dev/Vulkan-Loader/external/Debug/64/googletest/googletest -isystem /home/apollo/dev/Vulkan-Headers/build/install/include -g -std=c++17 -fvisibility=hidden -fdiagnostics-color=always -fPIC -MD -MT tests/CMakeFiles/test_regression.dir/loader_search_path_list_tests.cpp.o -MF tests/CMakeFiles/test_regression.dir/loader_search_path_list_tests.cpp.o.d -o tests/CMakeFiles/test_regression.dir/loader_search_path_list_tests.cpp.o -c /home/apollo/dev/Vulkan-Loader/tests/loader_search_path_list_tests.cpp
In file included from /home/apollo/dev/Vulkan-Loader/loader/loader.h:32,
                 from /home/apollo/dev/Vulkan-Loader/tests/loader_search_path_list_tests.cpp:2:
/home/apollo/dev/Vulkan-Loader/loader/loader_common.h:39:10: fatal error: vk_layer_dispatch_table.h: No such file or directory
   39 | #include "vk_layer_dispatch_table.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.

Steps to reproduce:

  1. Create a new test file in tests/.
  2. Add the following to the file.
#include "test_environment.h"
#include "loader/loader.h"

TEST(Test, Test) {}
  1. Add it to test_regression executable in tests/CMakeLists.txt
  2. Compile tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants