---
name: "libnvme_set_test_sysfs_dir-libnvme3"
section: "2"
platform: "linux"
package: "nvme-cli"
version: "3.2-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libnvme_set_test_sysfs_dir-libnvme3"
---

# libnvme\_set\_test\_sysfs\_dir-libnvme3(2)

Set libnvme's lookup sysfs path for testing

## NAME

libnvme\_set\_test\_sysfs\_dir - Set libnvme's lookup sysfs path for testing

## SYNOPSIS

**int libnvme\_set\_test\_sysfs\_dir** **(struct libnvme\_global\_ctx \*ctx** *,* **const char \*path** *);*

## ARGUMENTS

- ctx

  *struct libnvme\_global\_ctx* object

- path

  Directory with sysfs or NULL to restore defaults

## RETURN

0 on success, -EINVAL if *ctx* is NULL, -ENOMEM on allocation failure.
