pgbackrest.git / summary / log / commit / refs
commit 5e5b04be3741b4e903c9a7764dadfbe5bda121ae
Author: David Steele <david@pgmasters.net>
Date: Thu Jul 21 22:19:47 2022 +0000
Fix common/lock test creating "750" path.
This was clearly an attempt to set the mode when creating a directory, but it never worked and instead created a "750" directory in the current working directory.
Detected when running in an environment where the current working directory was read-only.
test/src/module/common/lockTest.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/src/module/common/lockTest.c b/test/src/module/common/lockTest.c
index 0d78a40ad..5001e0cd6 100644
--- a/test/src/module/common/lockTest.c
+++ b/test/src/module/common/lockTest.c
@@ -80,7 +80,7 @@ testRun(void)
// -------------------------------------------------------------------------------------------------------------------------
String *dirLock = strNewZ(TEST_PATH "/dir" LOCK_FILE_EXT);
- HRN_SYSTEM_FMT("mkdir -p 750 %s", strZ(dirLock));
+ HRN_SYSTEM_FMT("mkdir -p %s", strZ(dirLock));
TEST_ERROR_FMT(
lockAcquireFile(dirLock, 0, true), LockAcquireError, "unable to acquire lock on file '%s': Is a directory",
@@ -91,7 +91,7 @@ testRun(void)
String *noPermLock = strNewZ(TEST_PATH "/noperm/noperm");
- HRN_SYSTEM_FMT("mkdir -p 750 %s", strZ(strPath(noPermLock)));
+ HRN_SYSTEM_FMT("mkdir -p %s", strZ(strPath(noPermLock)));
HRN_SYSTEM_FMT("chmod 000 %s", strZ(strPath(noPermLock)));
TEST_ERROR_FMT(
[parent: f9bbafbf3fbd]