aports/testing/rnp/cleanup-nopermsdir.patch
2022-01-10 23:49:22 +01:00

20 lines
816 B
Diff

From: Jakub Jirutka <jakub@jirutka.cz>
Date: Mon, 10 Jan 2022 23:22:21 +0100
Subject: [PATCH] Fix problem with undeletable "noperms" directory
Directory "noperms" is created with chmod 000 and the test doesn't remove it
nor change the perms afterwards, so `abuild clean` cannot delete it.
--- a/src/tests/generatekey.cpp
+++ b/src/tests/generatekey.cpp
@@ -507,8 +507,8 @@
/* Try to generate key in the directory and make sure generation fails */
#ifndef _WIN32
assert_false(generate_test_key(RNP_KEYSTORE_GPG, NULL, "SHA256", nopermsdir));
+ (void) chmod(nopermsdir, S_IRWXU | S_IRWXG); // XXX-Patched: change back so we can delete it
#else
- /* There are no permissions for mkdir() under the Windows */
assert_true(generate_test_key(RNP_KEYSTORE_GPG, NULL, "SHA256", nopermsdir));
#endif
}