git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] test-lib.sh: try to re-chmod & retry on failed trash removal

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 12, 2021, 23:03 UTC
Message-ID
<xmqq5yu13kxz.fsf@gitster.g>
In-Reply-To
<patch-v2-1.1-9cfc0621067-20211011T014059Z-avarab@gmail.com>

Mostly looking good, but I applied the following on top to be squashed in.

Thanks.

-- >8 -- Style fix plus adding more paranoia to cope with the lost 'r' bit.

diff --git a/t/test-lib.sh b/t/test-lib.sh
index 138a26c19b..d820910154 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -1386,11 +1386,11 @@ export HOME GNUPGHOME
 
 # "rm -rf" existing trash directory, even if a previous run left it
 # with bad permissions.
-remove_trash_directory() {
+remove_trash_directory () {
 	dir="$1"
 	if ! rm -rf "$dir" 2>/dev/null
 	then
-		chmod -R u+wx "$dir"
+		chmod -R u+rwx "$dir"
 		rm -rf "$dir"
 	fi
 	! test -d "$dir"
Previous: Ævar Arnfjörð Bjarmason
Message 6 of 6 in “test-lib.sh: try to re-chmod & retry on failed trash removal”
  1. test-lib.sh: try to re-chmod & retry on failed trash removalÆvar Arnfjörð Bjarmason, Oct 9, 2021
  2. SZEDER GáborOct 10, 2021
  3. Junio C HamanoOct 10, 2021
  4. Junio C HamanoOct 11, 2021
  5. test-lib.sh: try to re-chmod & retry on failed trash removalÆvar Arnfjörð Bjarmason, Oct 11, 2021
  6. Junio C HamanoOct 12, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.