Re: Test 5561 failed
Am 03.04.2018 um 15:14 schrieb Jeff King: On Tue, Apr 03, 2018 at 01:43:37PM +0200, Jens Krüger wrote: expecting success: GET refs/heads/master "404 Not Found" not ok 2 - direct refs/heads/master not found That GET function is: GET() { curl --include "$HTTPD_URL/$SMART/repo.git/$1" >out 2>/dev/null && tr '\015' Q act && echo "HTTP/1.1 $2" >exp && test_cmp exp act } The tarball you sent shows "out" as empty, and "act" is missing. So "curl" produced no output, and we did not make it as far as the tr/sed pipe. Just a guess, but are you missing the "curl" command-line tool on your system? If so, "apt install curl" should fix the failure. Yes, the missing curl program was the reason, but I didn't find any hint about the missed program in the log output. The output will be suppressed by the '2>/dev/null' in lines: 9 and 22 of the t5561-http-backend.sh script. Nevertheless many thanks for helping. As far as code changes in Git, perhaps (assuming my guess is right): - drop the redirect of stderr here; the test suite already handles hiding stderr from the user (without "-v"), and in "-v" mode you probably would have gotten a useful error like "curl: not found" - it's rare but possible to have libcurl installed (which is needed for the server side, and what we key on for running the httpd tests) but not the curl binary. This test probably should check for the existence of the curl binary as a prerequisite. -Peff
Test 5561 failed
Git version 2.17.0 OS: Debian 9 (9.4) gcc: gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516 build from github clone: autoreconf ./configure make make test *** t5561-http-backend.sh *** ok 1 - setup repository not ok 2 - direct refs/heads/master not found # # GET refs/heads/master "404 Not Found" # not ok 3 - static file is ok # # get_static_files "200 OK" # not ok 4 - no export by default # # get_static_files "404 Not Found" # not ok 5 - export if git-daemon-export-ok # # (cd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" && # touch git-daemon-export-ok # ) && # get_static_files "200 OK" # not ok 6 - static file if http.getanyfile true is ok # # config http.getanyfile true && # get_static_files "200 OK" # not ok 7 - static file if http.getanyfile false fails # # config http.getanyfile false && # get_static_files "403 Forbidden" # not ok 8 - http.uploadpack default enabled # # GET info/refs?service=git-upload-pack "200 OK" && # POST git-upload-pack "200 OK" # not ok 9 - http.uploadpack true # # config http.uploadpack true && # GET info/refs?service=git-upload-pack "200 OK" && # POST git-upload-pack "200 OK" # not ok 10 - http.uploadpack false # # config http.uploadpack false && # GET info/refs?service=git-upload-pack "403 Forbidden" && # POST git-upload-pack "403 Forbidden" # not ok 11 - http.receivepack default disabled # # GET info/refs?service=git-receive-pack "403 Forbidden" && # POST git-receive-pack "403 Forbidden" # not ok 12 - http.receivepack true # # config http.receivepack true && # GET info/refs?service=git-receive-pack "200 OK" && # POST git-receive-pack "200 OK" # not ok 13 - http.receivepack false # # config http.receivepack false && # GET info/refs?service=git-receive-pack "403 Forbidden" && # POST git-receive-pack "403 Forbidden" # not ok 14 - server request log matches test results # # sed -e " # s/^.* \"// # s/\"// # s/ [1-9][0-9]*\$// # s/^GET /GET / # " >act <"$HTTPD_ROOT_PATH"/access.log && # test_cmp exp act # # failed 13 among 14 test(s) 1..14 Initialized empty Git repository in /home/jkrueger/sources/git/t/trash directory.t5561-http-backend/.git/ checking prerequisite: NOT_ROOT mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" && ( cd "$TRASH_DIRECTORY/prereq-test-dir" && uid=$(id -u) && test "$uid" != 0 ) prerequisite NOT_ROOT ok expecting success: echo content >file && git add file && git commit -m one && mkdir "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" && (cd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" && git --bare init && : >objects/info/alternates && : >objects/info/http-alternates ) && git remote add public "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" && git push public master:master && (cd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" && git repack -a -d ) && echo other >file && git add file && git commit -m two && git push public master:master && LOOSE_URL=$(find_file objects/??) && PACK_URL=$(find_file objects/pack/*.pack) && IDX_URL=$(find_file objects/pack/*.idx) [master (root-commit) ca879ad] one Author: A U Thor1 file changed, 1 insertion(+) create mode 100644 file Initialized empty Git repository in /home/jkrueger/sources/git/t/trash directory.t5561-http-backend/httpd/www/repo.git/ To /home/jkrueger/sources/git/t/trash directory.t5561-http-backend/httpd/www/repo.git * [new branch] master -> master [master b23ec89] two Author: A U Thor 1 file changed, 1 insertion(+), 1 deletion(-) To /home/jkrueger/sources/git/t/trash directory.t5561-http-backend/httpd/www/repo.git ca879ad..b23ec89 master -> master ok 1 - setup repository expecting success: GET refs/heads/master "404 Not Found" not ok 2 - direct refs/heads/master not found # # GET refs/heads/master "404 Not Found" # trash directory.t5561-http-backend.tar.gz Description: application/gzip
Re: Test t2028 failes
Am 03.04.2018 um 10:47 schrieb Eric Sunshine: On Tue, Apr 3, 2018 at 4:42 AM, Jens Krüger <jens.krue...@frm2.tum.de> wrote: Maybe, the attached patch may help. On my machine(s) it helped. git worktree list --porcelain >out && grep "^worktree.*/destination" out && - ! grep "^worktree.*/source" out && + ! grep "^worktree.*/source$" out && Our emails crossed. I suggested the same in my response (although I'd add the '$' anchor to both grep's, not just the one). I think so, that both of grep commands needs the '$' anchor. Thanks, for your help.
Re: Test t2028 failes
Am 03.04.2018 um 10:16 schrieb Eric Sunshine: On Tue, Apr 3, 2018 at 4:01 AM, Jens Krüger <jens.krue...@frm2.tum.de> wrote: The actual2 file does not exists, if I call the ./t2028-worktree-move.sh with the '-v -i' options, only without any option or with '-v' option. The content of the various files looks correct, and absence of "actual2" implies that one of the grep's failed, which is very odd considering that "out" has the expected content. Using the "out" file you attached, can you show the output of these commands? grep "^worktree.*/destination" out echo $? grep "^worktree.*/source" out echo $? I'd expect the first $? to report 0 and the second 1 in a working installation. Also, are you using an unusual 'grep'? What does "command -v grep" report? Maybe, the attached patch may help. On my machine(s) it helped. diff --git a/t/t2028-worktree-move.sh b/t/t2028-worktree-move.sh index 5d5b3632ba..65c7311865 100755 --- a/t/t2028-worktree-move.sh +++ b/t/t2028-worktree-move.sh @@ -77,7 +77,7 @@ test_expect_success 'move worktree' ' test_path_is_missing source && git worktree list --porcelain >out && grep "^worktree.*/destination" out && - ! grep "^worktree.*/source" out && + ! grep "^worktree.*/source$" out && git -C destination log --format=%s >actual2 && echo init >expected2 && test_cmp expected2 actual2
Re: Test t2028 failes
Am 03.04.2018 um 10:16 schrieb Eric Sunshine: On Tue, Apr 3, 2018 at 4:01 AM, Jens Krüger <jens.krue...@frm2.tum.de> wrote: The actual2 file does not exists, if I call the ./t2028-worktree-move.sh with the '-v -i' options, only without any option or with '-v' option. The content of the various files looks correct, and absence of "actual2" implies that one of the grep's failed, which is very odd considering that "out" has the expected content. Using the "out" file you attached, can you show the output of these commands? grep "^worktree.*/destination" out echo $? grep "^worktree.*/source" out echo $? I'd expect the first $? to report 0 and the second 1 in a working installation. Both of them return 0, but I guess I found the problem. The second 'grep' call returned the following output: worktree /home/jkrueger/sources/git/t/trash directory.t2028-worktree-move worktree /home/jkrueger/sources/git/t/trash directory.t2028-worktree-move/elsewhere worktree /home/jkrueger/sources/git/t/trash directory.t2028-worktree-move/some-dir/destination If I move my checkout into another directory not containing 'source' in the path it will work. Also, are you using an unusual 'grep'? What does "command -v grep" report? alias grep='grep --color=auto'
Re: Test t2028 failes
The actual2 file does not exists, if I call the ./t2028-worktree-move.sh with the '-v -i' options, only without any option or with '-v' option. Am 03.04.2018 um 08:58 schrieb Eric Sunshine: On Tue, Apr 3, 2018 at 2:33 AM, Jens Krüger <jens.krue...@frm2.tum.de> wrote: *** t2028-worktree-move.sh *** not ok 12 - move worktree # # toplevel="$(pwd)" && # git worktree move source destination && # test_path_is_missing source && # git worktree list --porcelain >out && # grep "^worktree.*/destination" out && # ! grep "^worktree.*/source" out && # git -C destination log --format=%s >actual2 && # echo init >expected2 && # test_cmp expected2 actual2 # Thanks for the report. Can you paste the relevant output (which should/might include an error message) from running the test with: ./t2028-worktree-move.sh -v -i and show an "ls -l" of t/trash directory.t2028-worktree-move directory, as well as paste the content of files "out" and "actual2" in that directory? insgesamt 28 drwxr-xr-x 2 jkrueger jkrueger 4096 Apr 3 09:25 abc -rw-r--r-- 1 jkrueger jkrueger 155 Apr 3 09:25 actual drwxr-xr-x 2 jkrueger jkrueger 4096 Apr 3 09:25 destination drwxr-xr-x 2 jkrueger jkrueger 4096 Apr 3 09:25 elsewhere -rw-r--r-- 1 jkrueger jkrueger7 Apr 3 09:25 expected -rw-r--r-- 1 jkrueger jkrueger5 Apr 3 09:25 init.t -rw-r--r-- 1 jkrueger jkrueger 463 Apr 3 09:25 out Initialized empty Git repository in /home/jkrueger/sources/git/t/trash directory.t2028-worktree-move/.git/ expecting success: test_commit init && git worktree add source && git worktree list --porcelain >out && grep "^worktree" out >actual && cat <<-EOF >expected && worktree $(pwd) worktree $(pwd)/source EOF test_cmp expected actual [master (root-commit) 2519212] init Author: A U Thor <aut...@example.com> 1 file changed, 1 insertion(+) create mode 100644 init.t Preparing source (identifier source) HEAD is now at 2519212 init ok 1 - setup expecting success: test_must_fail git worktree lock . fatal: The main working tree cannot be locked or unlocked ok 2 - lock main worktree expecting success: git worktree lock --reason hahaha source && echo hahaha >expected && test_cmp expected .git/worktrees/source/locked ok 3 - lock linked worktree expecting success: rm .git/worktrees/source/locked && git worktree add elsewhere && git -C elsewhere worktree lock --reason hahaha ../source && echo hahaha >expected && test_cmp expected .git/worktrees/source/locked Preparing elsewhere (identifier elsewhere) HEAD is now at 2519212 init ok 4 - lock linked worktree from another worktree expecting success: test_must_fail git worktree lock source && echo hahaha >expected && test_cmp expected .git/worktrees/source/locked fatal: 'source' is already locked, reason: hahaha ok 5 - lock worktree twice expecting success: test_must_fail git -C source worktree lock . && echo hahaha >expected && test_cmp expected .git/worktrees/source/locked fatal: '.' is already locked, reason: hahaha ok 6 - lock worktree twice (from the locked worktree) expecting success: test_must_fail git worktree unlock . fatal: The main working tree cannot be locked or unlocked ok 7 - unlock main worktree expecting success: git worktree unlock source && test_path_is_missing .git/worktrees/source/locked ok 8 - unlock linked worktree expecting success: test_must_fail git worktree unlock source && test_path_is_missing .git/worktrees/source/locked fatal: 'source' is not locked ok 9 - unlock worktree twice expecting success: mkdir abc && test_must_fail git worktree move abc def fatal: 'abc' is not a working tree ok 10 - move non-worktree expecting success: git worktree lock source && test_when_finished "git worktree unlock source" && test_must_fail git worktree move source destination fatal: cannot move a locked working tree ok 11 - move locked worktree expecting success: toplevel="$(pwd)" && git worktree move source destination && test_path_is_missing source && git worktree list --porcelain >out && grep "^worktree.*/destination" out && ! grep "^worktree.*/source" out && git -C destination log --format=%s >a
Test t2028 failes
Test 2028 failes: Git version: 2.17.0 (checked out from github repository) OS: Debian9(9.4), Debian 8 (8.10) and xubuntu 14.04(14.04.5 LTS) gcc: gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516 gcc (Debian 4.9.2-10+deb8u1) 4.9.2 gcc (Ubuntu 4.8.4-2ubuntu1~14.04.4) 4.8.4 configure generated with: autoreconf build with: ./configure make test running: make test Error: *** t2028-worktree-move.sh *** ok 1 - setup ok 2 - lock main worktree ok 3 - lock linked worktree ok 4 - lock linked worktree from another worktree ok 5 - lock worktree twice ok 6 - lock worktree twice (from the locked worktree) ok 7 - unlock main worktree ok 8 - unlock linked worktree ok 9 - unlock worktree twice ok 10 - move non-worktree ok 11 - move locked worktree not ok 12 - move worktree # # toplevel="$(pwd)" && # git worktree move source destination && # test_path_is_missing source && # git worktree list --porcelain >out && # grep "^worktree.*/destination" out && # ! grep "^worktree.*/source" out && # git -C destination log --format=%s >actual2 && # echo init >expected2 && # test_cmp expected2 actual2 # ok 13 - move main worktree ok 14 - move worktree to another dir ok 15 - remove main worktree ok 16 - remove locked worktree ok 17 - remove worktree with dirty tracked file ok 18 - remove worktree with untracked file ok 19 - force remove worktree with untracked file ok 20 - remove missing worktree ok 21 - NOT remove missing-but-locked worktree # failed 1 among 21 test(s) 1..21