mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2024-12-12 10:04:14 +02:00
Use constant string for user/group in performance/type test.
It is not safe to return strings created with STRDEF() from a function.
This commit is contained in:
parent
74d3131830
commit
208641ac7f
@ -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")))
|
||||
|
Loading…
Reference in New Issue
Block a user