# [PATCH] t0302: "unreadable" test needs SANITY prereq

2 messages from 2015-06-12 to 2015-06-12. Participants: Paul Tan, Jeff King.
Thread: https://gitlist.dev/t/39613

## Paul Tan, 2015-06-12 13:29

Subject: [PATCH] t0302: "unreadable" test needs SANITY prereq
Message-ID: <1434115798-8250-1-git-send-email-pyokagan@gmail.com>
URL: https://gitlist.dev/e/1434115798-8250-1-git-send-email-pyokagan%40gmail.com

```
The test expects that "chmod -r ~/.git-credentials" would make it
unreadable to the user, and thus needs the SANITY prerequisite.

Reported-by: Jean-Yves LENHOF <jean-yves@lenhof.eu.org>
Signed-off-by: Paul Tan <pyokagan@gmail.com>
---
 t/t0302-credential-store.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t0302-credential-store.sh b/t/t0302-credential-store.sh
index 0979df9..1d8d1f2 100755
--- a/t/t0302-credential-store.sh
+++ b/t/t0302-credential-store.sh
@@ -75,7 +75,7 @@ test_expect_success 'get: use xdg file if home file has no matches' '
 	EOF
 '
 
-test_expect_success POSIXPERM 'get: use xdg file if home file is unreadable' '
+test_expect_success POSIXPERM,SANITY 'get: use xdg file if home file is unreadable' '
 	echo "https://home-user:home-pass@example.com" >"$HOME/.git-credentials" &&
 	chmod -r "$HOME/.git-credentials" &&
 	mkdir -p "$HOME/.config/git" &&
-- 
2.1.4

```

## Jeff King, 2015-06-12 13:36

Subject: Re: [PATCH] t0302: "unreadable" test needs SANITY prereq
Message-ID: <20150612133652.GA2446@peff.net>
URL: https://gitlist.dev/e/20150612133652.GA2446%40peff.net
In-Reply-To: <1434115798-8250-1-git-send-email-pyokagan@gmail.com>

```
On Fri, Jun 12, 2015 at 09:29:58PM +0800, Paul Tan wrote:

> The test expects that "chmod -r ~/.git-credentials" would make it
> unreadable to the user, and thus needs the SANITY prerequisite.

Yup, looks obviously correct to me. Thanks for a quick turnaround.

-Peff

```
