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

Bug when doing make test using root user

From
JLJean-Yves LENHOF <jean-yves@lenhof.eu.org>
Date
Jun 12, 2015, 09:43 UTC
Message-ID
<28c940a4a806c8da130403068cf4c0ef@lenhof.eu.org>
Hi,

I tried to compile git 2.4.3 using root on a server. It failed on test 41 of t0302-credential-store.sh In fact even if we remove read access on a directory, root still can acces this directory. Using a not privilegied user make the test work. Perhaps the test should be adapted to this corner case. Trace below.

Have fun,
JYL
*** t0302-credential-store.sh ***
ok 1 - helper (store) has no existing data
ok 2 - helper (store) stores password
ok 3 - helper (store) can retrieve password
ok 4 - helper (store) requires matching protocol
ok 5 - helper (store) requires matching host
ok 6 - helper (store) requires matching username
ok 7 - helper (store) requires matching path
ok 8 - helper (store) can forget host
ok 9 - helper (store) can store multiple users
ok 10 - helper (store) can forget user
ok 11 - helper (store) remembers other user
ok 12 - when xdg file does not exist, xdg file not created
ok 13 - setup xdg file
ok 14 - helper (store) has no existing data
ok 15 - helper (store) stores password
ok 16 - helper (store) can retrieve password
ok 17 - helper (store) requires matching protocol
ok 18 - helper (store) requires matching host
ok 19 - helper (store) requires matching username
ok 20 - helper (store) requires matching path
ok 21 - helper (store) can forget host
ok 22 - helper (store) can store multiple users
ok 23 - helper (store) can forget user
ok 24 - helper (store) remembers other user
ok 25 - when xdg file exists, home file not created
ok 26 - setup custom xdg file
ok 27 - helper (store) has no existing data
ok 28 - helper (store) stores password
ok 29 - helper (store) can retrieve password
ok 30 - helper (store) requires matching protocol
ok 31 - helper (store) requires matching host
ok 32 - helper (store) requires matching username
ok 33 - helper (store) requires matching path
ok 34 - helper (store) can forget host
ok 35 - helper (store) can store multiple users
ok 36 - helper (store) can forget user
ok 37 - helper (store) remembers other user
ok 38 - if custom xdg file exists, home and xdg files not created
ok 39 - get: use home file if both home and xdg files have matches
ok 40 - get: use xdg file if home file has no matches
not ok 41 - 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" &&
#               echo "https://xdg-user:xdg-pass@example.com" 
 >"$HOME/.config/git/credentials" &&
#               check fill store <<-\EOF
#               protocol=https
#               host=example.com
#               --
#               protocol=https
#               host=example.com
#               username=xdg-user
#               password=xdg-pass
#               --
#               EOF
#
ok 42 - store: if both xdg and home files exist, only store in home file
ok 43 - erase: erase matching credentials from both xdg and home files
# failed 1 among 43 test(s)
1..43
make[2]: *** [t0302-credential-store.sh] Error 1
make[2]: Leaving directory `/root/git-2.4.3/t'
make[1]: *** [test] Error 2
make[1]: Leaving directory `/root/git-2.4.3/t'
make: *** [test] Error 2
Next: Paul Tan
Message 1 of 2 in “Bug when doing make test using root user”
  1. Jean-Yves LENHOFJun 12, 2015
  2. Paul TanJun 12, 2015

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.