Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'deciphering' failing testcase t-pre-push with imho unclear error #5633

Open
bjornstromberg opened this issue Jan 28, 2024 · 1 comment
Open

Comments

@bjornstromberg
Copy link

bjornstromberg commented Jan 28, 2024

Describe the bug
during the packaging process, the APKBUILD script runs the testsuite, and it fails on t-pre-push., not sure why

[...]
./t-post-merge.sh ............................. ok
# -- stdout --
#     set up remote git repository: t-pre-push
#     Reinitialized existing Git repository in /home/btb/evo-ports/alpine-bootstrap/git-lfs/src/git-lfs-3.4.1/t/remote/t-pre-push.git/
#     clone local git repository t-pre-push to repo
#     Cloning into 'repo'...
#     warning: You appear to have cloned an empty repository.
#     Tracking "*.dat"
#     [main (root-commit) a28fb83] add git attributes
#      1 file changed, 1 insertion(+)
#      create mode 100644 .gitattributes
# -- stderr --
#     + set -e
#     ++ basename ./t-pre-push.sh .sh
#     + reponame=t-pre-push
#     + setup_remote_repo t-pre-push
#     + local reponame=t-pre-push
#     + echo 'set up remote git repository: t-pre-push'
#     + repodir=/home/btb/evo-ports/alpine-bootstrap/git-lfs/src/git-lfs-3.4.1/t/remote/t-pre-push.git
#     + mkdir -p /home/btb/evo-ports/alpine-bootstrap/git-lfs/src/git-lfs-3.4.1/t/remote/t-pre-push.git
#     + cd /home/btb/evo-ports/alpine-bootstrap/git-lfs/src/git-lfs-3.4.1/t/remote/t-pre-push.git
#     + git init --bare
#     + git config http.receivepack true
#     + git config receive.denyCurrentBranch ignore
#     + clone_repo t-pre-push repo
#     + cd /tmp/git-lfs_TEMP.04WsoK/t-pre-push.sh-1430378
#     + local reponame=t-pre-push
#     + local dir=repo
#     + echo 'clone local git repository t-pre-push to repo'
#     ++ git clone http://127.0.0.1:42887/t-pre-push repo
#     + out='Cloning into '\''repo'\''...
#     warning: You appear to have cloned an empty repository.'
#     + cd repo
#     + git branch -m main
#     + git config credential.helper lfstest
#     + echo 'Cloning into '\''repo'\''...
#     warning: You appear to have cloned an empty repository.'
#     + echo 'Cloning into '\''repo'\''...
#     warning: You appear to have cloned an empty repository.'
#     + git lfs track '*.dat'
#     + git add .gitattributes
#     + git commit -m 'add git attributes'
#     ++ repo_endpoint http://127.0.0.1:42887 t-pre-push
#     ++ local server=http://127.0.0.1:42887
#     ++ local repo=t-pre-push
#     ++ echo http://127.0.0.1:42887/t-pre-push.git/info/lfs
#     + git config lfs.http://127.0.0.1:42887/t-pre-push.git/info/lfs.locksverify true
#     + echo 'refs/heads/main main refs/heads/main 0000000000000000000000000000000000000000'
#     + git lfs pre-push origin http://127.0.0.1:42887/t-pre-push
#     + tee push.log
#     CREDS RECV: protocol=http
#     CREDS RECV: host=127.0.0.1:42887
#     CREDS RECV: path=t-pre-push
#     CREDS SEND: password=pass
#     CREDS SEND: protocol=http
#     CREDS SEND: host=127.0.0.1:42887
#     CREDS SEND: path=t-pre-push
#     CREDS SEND: username=user
#     CREDS received command: store (ignored)
#     CREDS received command: store (ignored)
#     ++ du -k push.log
#     ++ cut -f 1
#     + '[' 1 == 0 ']'
#     + end_test
#     + test_status=1
# -- git trace --
#    08:37:20.110666 git.c:439               trace: built-in: git init --bare
#    08:37:20.113079 git.c:439               trace: built-in: git config http.receivepack true
#    08:37:20.114564 git.c:439               trace: built-in: git config receive.denyCurrentBranch ignore
#    08:37:20.116440 git.c:439               trace: built-in: git clone http://127.0.0.1:42887/t-pre-push repo
#    08:37:20.118162 run-command.c:655       trace: run_command: git remote-http origin http://127.0.0.1:42887/t-pre-push
#    08:37:20.119101 git.c:725               trace: exec: git-remote-http origin http://127.0.0.1:42887/t-pre-push
#    08:37:20.119118 run-command.c:655       trace: run_command: git-remote-http origin http://127.0.0.1:42887/t-pre-push
#    08:37:20.134358 git.c:439               trace: built-in: git branch -m main
#    08:37:20.136040 git.c:439               trace: built-in: git config credential.helper lfstest
#    08:37:20.137663 git.c:725               trace: exec: git-lfs track '*.dat'
#    08:37:20.137682 run-command.c:655       trace: run_command: git-lfs track '*.dat'
#    08:37:20.141456 trace git-lfs: exec: git 'version'
#    08:37:20.142788 trace git-lfs: exec: git '-c' 'filter.lfs.smudge=' '-c' 'filter.lfs.clean=' '-c' 'filter.lfs.process=' '-c' 'filter.lfs.required=false' 'rev-parse' '--git-dir' '--show-toplevel'
#    08:37:20.144252 trace git-lfs: exec: git 'config' '--includes' '--local' 'lfs.repositoryformatversion'
#    08:37:20.145439 trace git-lfs: exec: git 'config' '--includes' '--replace-all' 'lfs.repositoryformatversion' '0'
#    08:37:20.146984 trace git-lfs: exec: git 'config' '--includes' '-l'
#    08:37:20.148288 trace git-lfs: exec: git 'rev-parse' '--is-bare-repository'
#    08:37:20.149532 trace git-lfs: exec: git 'config' '--includes' '-l' '--blob' ':.lfsconfig'
#    08:37:20.150875 trace git-lfs: exec: git 'config' '--includes' '-l' '--blob' 'HEAD:.lfsconfig'
#    08:37:20.152229 trace git-lfs: Install hook: pre-push, force=false, path=/tmp/git-lfs_TEMP.04WsoK/t-pre-push.sh-1430378/repo/.git/hooks/pre-push
#    08:37:20.152302 trace git-lfs: Install hook: post-checkout, force=false, path=/tmp/git-lfs_TEMP.04WsoK/t-pre-push.sh-1430378/repo/.git/hooks/post-checkout
#    08:37:20.152366 trace git-lfs: Install hook: post-commit, force=false, path=/tmp/git-lfs_TEMP.04WsoK/t-pre-push.sh-1430378/repo/.git/hooks/post-commit
#    08:37:20.152425 trace git-lfs: Install hook: post-merge, force=false, path=/tmp/git-lfs_TEMP.04WsoK/t-pre-push.sh-1430378/repo/.git/hooks/post-merge
#    08:37:20.152547 trace git-lfs: NewLsFiles: running in /tmp/git-lfs_TEMP.04WsoK/t-pre-push.sh-1430378/repo git ls-files -z --cached --sparse --exclude-standard --others
#    08:37:20.152589 trace git-lfs: exec: git '-c' 'filter.lfs.smudge=' '-c' 'filter.lfs.clean=' '-c' 'filter.lfs.process=' '-c' 'filter.lfs.required=false' 'ls-files' '-z' '--cached' '--sparse' '--exclude-standard' '--others'
#    08:37:20.154088 trace git-lfs: exec: git '-c' 'filter.lfs.smudge=' '-c' 'filter.lfs.clean=' '-c' 'filter.lfs.process=' '-c' 'filter.lfs.required=false' '-c' 'core.quotepath=false' 'ls-files' '--ignored' '--cached' '-x' '*.dat'
#    08:37:20.155353 trace git-lfs: exec: git '-c' 'filter.lfs.smudge=' '-c' 'filter.lfs.clean=' '-c' 'filter.lfs.process=' '-c' 'filter.lfs.required=false' 'rev-parse' 'HEAD' '--symbolic-full-name' 'HEAD'
#    08:37:20.156596 trace git-lfs: Error loading current ref: Git can't resolve ref: "HEAD"
#    08:37:20.156710 trace git-lfs: filepathfilter: creating pattern "*.dat" of type gitattributes
#    08:37:20.156785 trace git-lfs: NewLsFiles: running in /tmp/git-lfs_TEMP.04WsoK/t-pre-push.sh-1430378/repo git ls-files -z --cached --sparse --exclude-standard
#    08:37:20.156835 trace git-lfs: exec: git '-c' 'filter.lfs.smudge=' '-c' 'filter.lfs.clean=' '-c' 'filter.lfs.process=' '-c' 'filter.lfs.required=false' 'ls-files' '-z' '--cached' '--sparse' '--exclude-standard'
#    08:37:20.158142 trace git-lfs: filepathfilter: creating pattern ".git" of type gitignore
#    08:37:20.158154 trace git-lfs: filepathfilter: creating pattern "**/.git" of type gitignore
#    08:37:20.158184 trace git-lfs: filepathfilter: accepting "tmp"
#    08:37:20.160106 git.c:439               trace: built-in: git add .gitattributes
#    08:37:20.162023 git.c:439               trace: built-in: git commit -m 'add git attributes'
#    08:37:20.163937 run-command.c:655       trace: run_command: git maintenance run --auto --no-quiet
#    08:37:20.164951 git.c:439               trace: built-in: git maintenance run --auto --no-quiet
#    08:37:20.165387 run-command.c:1523      run_processes_parallel: preparing to run up to 1 tasks
#    08:37:20.165417 run-command.c:655       trace: run_command: GIT_EDITOR=: GIT_INDEX_FILE=.git/index .git/hooks/post-commit
#    08:37:20.166960 git.c:725               trace: exec: git-lfs post-commit
#    08:37:20.166978 run-command.c:655       trace: run_command: git-lfs post-commit
#    08:37:20.170854 trace git-lfs: exec: git 'version'
#    08:37:20.172138 trace git-lfs: exec: git '-c' 'filter.lfs.smudge=' '-c' 'filter.lfs.clean=' '-c' 'filter.lfs.process=' '-c' 'filter.lfs.required=false' 'rev-parse' '--git-dir' '--show-toplevel'
#    08:37:20.173449 trace git-lfs: exec: git 'config' '--includes' '-l'
#    08:37:20.174804 trace git-lfs: exec: git 'rev-parse' '--is-bare-repository'
#    08:37:20.176068 trace git-lfs: exec: git 'config' '--includes' '-l' '--blob' ':.lfsconfig'
#    08:37:20.177401 trace git-lfs: exec: git 'config' '--includes' '-l' '--blob' 'HEAD:.lfsconfig'
#    08:37:20.179048 trace git-lfs: exec: git '-c' 'filter.lfs.smudge=' '-c' 'filter.lfs.clean=' '-c' 'filter.lfs.process=' '-c' 'filter.lfs.required=false' 'rev-parse' 'HEAD' '--symbolic-full-name' 'HEAD'
#    08:37:20.180493 trace git-lfs: NewLsFiles: running in /tmp/git-lfs_TEMP.04WsoK/t-pre-push.sh-1430378/repo git ls-files -z --cached --sparse --exclude-standard --others
#    08:37:20.180541 trace git-lfs: exec: git '-c' 'filter.lfs.smudge=' '-c' 'filter.lfs.clean=' '-c' 'filter.lfs.process=' '-c' 'filter.lfs.required=false' 'ls-files' '-z' '--cached' '--sparse' '--exclude-standard' '--others'
#    08:37:20.181848 trace git-lfs: findAttributeFiles: located .gitattributes
#    08:37:20.182802 run-command.c:1551      run_processes_parallel: done
#    08:37:20.184950 git.c:439               trace: built-in: git config lfs.http://127.0.0.1:42887/t-pre-push.git/info/lfs.locksverify true
#    08:37:20.186738 git.c:725               trace: exec: git-lfs pre-push origin http://127.0.0.1:42887/t-pre-push
#    08:37:20.186757 run-command.c:655       trace: run_command: git-lfs pre-push origin http://127.0.0.1:42887/t-pre-push
#    08:37:20.190400 trace git-lfs: exec: git 'version'
#    08:37:20.191753 trace git-lfs: exec: git '-c' 'filter.lfs.smudge=' '-c' 'filter.lfs.clean=' '-c' 'filter.lfs.process=' '-c' 'filter.lfs.required=false' 'remote' '-v'
#    08:37:20.193166 trace git-lfs: exec: git '-c' 'filter.lfs.smudge=' '-c' 'filter.lfs.clean=' '-c' 'filter.lfs.process=' '-c' 'filter.lfs.required=false' 'remote'
#    08:37:20.194472 trace git-lfs: exec: git '-c' 'filter.lfs.smudge=' '-c' 'filter.lfs.clean=' '-c' 'filter.lfs.process=' '-c' 'filter.lfs.required=false' 'rev-parse' 'HEAD' '--symbolic-full-name' 'HEAD'
#    08:37:20.196250 trace git-lfs: exec: git '-c' 'filter.lfs.smudge=' '-c' 'filter.lfs.clean=' '-c' 'filter.lfs.process=' '-c' 'filter.lfs.required=false' 'rev-parse' '--git-dir' '--show-toplevel'
#    08:37:20.197624 trace git-lfs: exec: git 'config' '--includes' '-l'
#    08:37:20.198948 trace git-lfs: exec: git 'rev-parse' '--is-bare-repository'
#    08:37:20.200199 trace git-lfs: exec: git 'config' '--includes' '-l' '--blob' ':.lfsconfig'
#    08:37:20.201508 trace git-lfs: exec: git 'config' '--includes' '-l' '--blob' 'HEAD:.lfsconfig'
#    08:37:20.203217 trace git-lfs: pre-push: refs/heads/main main refs/heads/main 0000000000000000000000000000000000000000
#    08:37:20.203348 trace git-lfs: exec: git '-c' 'filter.lfs.smudge=' '-c' 'filter.lfs.clean=' '-c' 'filter.lfs.process=' '-c' 'filter.lfs.required=false' 'show-ref'
#    08:37:20.204816 trace git-lfs: exec: git '-c' 'filter.lfs.smudge=' '-c' 'filter.lfs.clean=' '-c' 'filter.lfs.process=' '-c' 'filter.lfs.required=false' 'ls-remote' '--heads' '--tags' '-q' 'origin'
#    08:37:20.219865 trace git-lfs: HTTP: POST http://127.0.0.1:42887/t-pre-push.git/info/lfs/locks/verify
#    08:37:20.220405 trace git-lfs: HTTP: 401
#    08:37:20.220515 trace git-lfs: setting repository access to basic
#    08:37:20.220546 trace git-lfs: exec: git 'config' '--includes' '--replace-all' 'lfs.http://127.0.0.1:42887/t-pre-push.git/info/lfs.access' 'basic'
#    08:37:20.221973 trace git-lfs: api: http response indicates "basic" authentication. Resubmitting...
#    08:37:20.222183 trace git-lfs: creds: git credential fill ("http", "127.0.0.1:42887", "t-pre-push")
#    08:37:20.222216 trace git-lfs: exec: git 'credential' 'fill'
#    08:37:20.226875 trace git-lfs: Filled credentials for http://127.0.0.1:42887/t-pre-push
#    08:37:20.227232 trace git-lfs: HTTP: POST http://127.0.0.1:42887/t-pre-push.git/info/lfs/locks/verify
#    08:37:20.227796 trace git-lfs: HTTP: 200
#    08:37:20.227830 trace git-lfs: creds: git credential approve ("http", "127.0.0.1:42887", "t-pre-push")
#    08:37:20.227877 trace git-lfs: exec: git 'credential' 'approve'
#    08:37:20.235084 trace git-lfs: HTTP: {"ours":null,"theirs":null}
#    
#    08:37:20.235469 trace git-lfs: tq: running as batched queue, batch size of 100
#    08:37:20.235584 trace git-lfs: run_command: git rev-list --objects --ignore-missing --not --remotes=origin --stdin --
#    08:37:20.235601 trace git-lfs: exec: git '-c' 'filter.lfs.smudge=' '-c' 'filter.lfs.clean=' '-c' 'filter.lfs.process=' '-c' 'filter.lfs.required=false' 'rev-list' '--objects' '--ignore-missing' '--not' '--remotes=origin' '--stdin' '--'
#    08:37:20.236050 trace git-lfs: exec: git '-c' 'filter.lfs.smudge=' '-c' 'filter.lfs.clean=' '-c' 'filter.lfs.process=' '-c' 'filter.lfs.required=false' 'cat-file' '--batch-check'
#    08:37:20.236434 trace git-lfs: exec: git '-c' 'filter.lfs.smudge=' '-c' 'filter.lfs.clean=' '-c' 'filter.lfs.process=' '-c' 'filter.lfs.required=false' 'rev-parse' '--git-common-dir'
#    08:37:20.238236 trace git-lfs: filepathfilter: creating pattern ".git" of type gitignore
#    08:37:20.238254 trace git-lfs: filepathfilter: creating pattern "**/.git" of type gitignore
#    08:37:20.238289 trace git-lfs: filepathfilter: accepting "tmp"
./t-pre-push.sh ............................... 
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/40 subtests 
./t-progress-meter.sh ......................... ok
[...]

the question is what is it that failed? from the output that the testcase printed its not clear what actually failed?

#    08:37:20.156596 trace git-lfs: Error loading current ref: Git can't resolve ref: "HEAD"

is the only thing that looks like a error, it is likely the warning that cloning an empty repo in the beginning.

this part is not clear, should it ignore this? its not even clear which testcase it is that failed (i think its "pre-push" from the repo name) and the failing assert is on line 102 of t-pre-push.sh

#     CREDS received command: store (ignored)
#     CREDS received command: store (ignored)

but the output is pretty unclear on what is expected? should it ignore or not?

To Reproduce
Steps to reproduce the behavior:

  1. run repobuild on a custom minimal copy of alpine community to build gitea and its dependencies that live in the community repo.

i can supply a minimal example if needed but since its really a question about what the testsuite complains about it does not seem warranted to go through the downstream process of packaging, the packaging 'sources' are located here https://git.alpinelinux.org/aports/tree/community/git-lfs?h=3.19-stable and yes i know i'm building a part of 3.19-community on top of 3.18-main.

Expected behavior
test suite should tell why it failed, and do it clear enough.

System environment
proxmox 8.1 + alpine 3.18.6 container using alpine supplied main repo and builds its own minimal alpine-bootstrap with stuff from 3.19-community repo due to 3.18-community is EOL.

Output of git lfs env
git: 'lfs' is not a git command. See 'git --help' (this is expected since its during packaging of the git-lfs the testing occurs)

Additional context
proxmox lxc-container lives on openzfs-2.2.2 pool. not that it should matter on the missing error information in the output of the testsuite..

@bk2204
Copy link
Member

bk2204 commented Jan 29, 2024

Hey,

Sorry you're having trouble. The reason this is failing is the error in the stderr block just before end_test. That's going to be the case in pretty much all of our shell tests, and due to the way shell works, it's going to be nearly impossible to annotate everything with nice error messages. Git's testsuite works the same way, but is even worse about this.

So the assertion that's failing is [ "$(du -k push.log | cut -f 1)" == "0" ]. You'd want to figure out why your version of du -k is printing 1 instead of 0 here, which probably involves figuring out what exactly is in push.log. Usually the output is somewhere under t/remote.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants