libnvme_set_test_base_dir(9) libnvme API manual libnvme_set_test_base_dir(9) NAME libnvme_set_test_base_dir - Reroot libnvme's on-disk files for testing SYNOPSIS int libnvme_set_test_base_dir (struct libnvme_global_ctx *ctx , const char *path ); ARGUMENTS ctx struct libnvme_global_ctx object path Sandbox directory under /tmp, or NULL to restore defaults DESCRIPTION Redirects the files libnvme reads and writes (the exclusion list, the ownership registry, ...) under path instead of their production locations, so a test can run against a throwaway directory. For safety path must be confined to /tmp and contain no ".." component; anything else is rejected. Passing NULL clears a previously set override. RETURN 0 on success, -EINVAL if ctx is NULL or path is not a valid sandbox path, -ENOMEM on allocation failure. September 2026 libnvme_set_test_base_dir libnvme_set_test_base_dir(9)