UT/nvmf: use /tmp directory as the reservation persist file
Existing code using /var/log directory can't work with non-root users, so change to /tmp directory instead. Fix issue #859. Change-Id: I270a41d29ad5bafa522540e8bbbcfe83536823ae Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461774 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
This commit is contained in:
parent
e95e4028c1
commit
23fcc697e5
@ -784,7 +784,7 @@ test_reservation_register_with_ptpl(void)
|
||||
SPDK_CU_ASSERT_FATAL(reg == NULL);
|
||||
|
||||
/* TEST CASE: Enable PTPL */
|
||||
g_ns.ptpl_file = "/var/log/Ns1PR.cfg";
|
||||
g_ns.ptpl_file = "/tmp/Ns1PR.cfg";
|
||||
ut_reservation_build_register_request(req, SPDK_NVME_RESERVE_REGISTER_KEY, 0,
|
||||
SPDK_NVME_RESERVE_PTPL_PERSIST_POWER_LOSS, 0, 0xa1);
|
||||
update_sgroup = nvmf_ns_reservation_register(&g_ns, &g_ctrlr1_A, req);
|
||||
@ -905,7 +905,7 @@ test_reservation_acquire_release_with_ptpl(void)
|
||||
SPDK_CU_ASSERT_FATAL(req != NULL);
|
||||
|
||||
/* TEST CASE: Enable PTPL */
|
||||
g_ns.ptpl_file = "/var/log/Ns1PR.cfg";
|
||||
g_ns.ptpl_file = "/tmp/Ns1PR.cfg";
|
||||
ut_reservation_build_register_request(req, SPDK_NVME_RESERVE_REGISTER_KEY, 0,
|
||||
SPDK_NVME_RESERVE_PTPL_PERSIST_POWER_LOSS, 0, 0xa1);
|
||||
update_sgroup = nvmf_ns_reservation_register(&g_ns, &g_ctrlr1_A, req);
|
||||
|
Loading…
Reference in New Issue
Block a user