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

[PATCH] Skip unwritable tests for root

From
Fernando J. Pereda <ferdy@ferdyx.org>
Date
Jun 30, 2008, 07:05 UTC
Message-ID
<1214809551-14603-1-git-send-email-ferdy@ferdyx.org>
Signed-off-by: Fernando J. Pereda <ferdy@ferdyx.org>
---
 t/t0004-unwritable.sh |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/t/t0004-unwritable.sh b/t/t0004-unwritable.sh
index 9255c63..728ec22 100755
--- a/t/t0004-unwritable.sh
+++ b/t/t0004-unwritable.sh
@@ -4,6 +4,13 @@ test_description='detect unwritable repository and fail correctly'
 
 . ./test-lib.sh
 
+if test "$(id -u)" -eq 0
+then
+	test_expect_success 'root writes to unwritable places, skipping test' :
+	test_done
+	exit
+fi
+
 test_expect_success setup '
 
 	>file &&
-- 
1.5.6.1
Next: Jakub Narebski
Message 1 of 5 in “Skip unwritable tests for root”
  1. Skip unwritable tests for rootFernando J. Pereda, Jun 30, 2008
  2. Jakub NarebskiJun 30, 2008
  3. Junio C HamanoJun 30, 2008
  4. Fernando J. PeredaJun 30, 2008
  5. Lea WiemannJul 7, 2008

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.