From 208641ac7fd22f676a55e7305b3e69df574f36f8 Mon Sep 17 00:00:00 2001 From: David Steele Date: Thu, 7 Oct 2021 18:50:56 -0400 Subject: [PATCH] Use constant string for user/group in performance/type test. It is not safe to return strings created with STRDEF() from a function. --- test/src/module/performance/typeTest.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/src/module/performance/typeTest.c b/test/src/module/performance/typeTest.c index 46bdd8518..384a70a99 100644 --- a/test/src/module/performance/typeTest.c +++ b/test/src/module/performance/typeTest.c @@ -61,6 +61,8 @@ typedef struct uint64_t fileTotal; } StorageTestManifestNewBuild; +STRING_STATIC(TEST_MANIFEST_PATH_USER_STR, "test"); + static StorageInfo storageTestManifestNewBuildInfo(THIS_VOID, const String *file, StorageInfoLevel level, StorageInterfaceInfoParam param) { @@ -74,8 +76,8 @@ storageTestManifestNewBuildInfo(THIS_VOID, const String *file, StorageInfoLevel .mode = 0600, .userId = 100, .groupId = 100, - .user = STRDEF("test"), - .group = STRDEF("test"), + .user = TEST_MANIFEST_PATH_USER_STR, + .group = TEST_MANIFEST_PATH_USER_STR, }; if (strEq(file, STRDEF("/pg")))