Commit 23fcc697 authored by Changpeng Liu's avatar Changpeng Liu
Browse files

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: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461774


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: default avatarXiaodong Liu <xiaodong.liu@intel.com>
parent e95e4028
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);