Git development
 help / color / mirror / Atom feed
* [PATCH] use "git init-db" in tests
@ 2005-12-08 20:25 Alex Riesen
  2005-12-08 20:47 ` Junio C Hamano
  2005-12-08 20:59 ` Alex Riesen
  0 siblings, 2 replies; 11+ messages in thread
From: Alex Riesen @ 2005-12-08 20:25 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

Unless there was a special reason to use git-init-db from $PATH, could
the patch below be accepted? It makes the test suite use git-init-db
from the "the binaries we have just built".

The reason, why we need the patch even if the $PATH is set, will be
better explained by glibc's sources: the lookup does not stop if the
file exists but has no execute permission.

See file posix/execvp.c, the loop iterating over elements in $PATH:

          switch (errno)
            {
            case EACCES:
              /* Record the we got a `Permission denied' error.  If we end
                 up finding no executable we can use, we want to diagnose
                 that we did find one but were denied access.  */
              got_eacces = true;
                 ...
              break;
            ...
            }
      ...
      /* We tried every element and none of them worked.  */
      if (got_eacces)
        /* At least one failure was due to permissions, so report that
           error.  */
        __set_errno (EACCES);

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>

---

 By the same reason, the whole testsuite should be reviewed to use 
 "git <command>" notation.

 t/test-lib.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

4417503d10870c913cff4f635acf274b7da75864
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 0539dac..3704e5f 100755
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -190,8 +190,8 @@ test=trash
 rm -fr "$test"
 mkdir "$test"
 cd "$test"
-git-init-db --template=../../templates/blt/ 2>/dev/null ||
-error "cannot run git-init-db"
+git init-db --template=../../templates/blt/ 2>/dev/null ||
+error "cannot run git init-db"
 
 mv .git/hooks .git/hooks-disabled
 
-- 
0.99.9.GIT

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-12-09 20:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-08 20:25 [PATCH] use "git init-db" in tests Alex Riesen
2005-12-08 20:47 ` Junio C Hamano
2005-12-08 21:02   ` Alex Riesen
2005-12-08 21:24     ` Junio C Hamano
2005-12-09  7:36       ` Alex Riesen
2005-12-09  8:06         ` Junio C Hamano
2005-12-09  8:52           ` Junio C Hamano
2005-12-09  9:30             ` Petr Baudis
2005-12-09 10:59           ` Alex Riesen
2005-12-09 20:46             ` Junio C Hamano
2005-12-08 20:59 ` Alex Riesen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox