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

Unittest offline/worktree::worktree failes in version 1.4.X on Ubuntu #6307

Closed
bebuch opened this issue May 17, 2022 · 1 comment
Closed

Comments

@bebuch
Copy link

bebuch commented May 17, 2022

Reproduction steps

If you want a reproducible clean environment your can use docker on most x86-64 systems:

docker run -it --rm ubuntu:22.04

Inside (dockered) Ubuntu exec:

apt update
apt install -y gcc g++ cmake curl libssl-dev python3
LIBGIT2_VERSION=1.4.3
cd /mnt
curl -L "https://github.com/libgit2/libgit2/archive/refs/tags/v${LIBGIT2_VERSION}.tar.gz" | tar xz
mkdir -p cd /mnt/build && cd $_
cmake /mnt/libgit2-${LIBGIT2_VERSION}
cmake --build . --parallel
ctest -V

Expected behavior

Passing all unit tests.

Actual behavior

Run as normal user:

[…]
1: worktree::worktree...................................
1: 
1:   1) Failure:
1: refs::revparse::date [/home/bebuch/media/tmp/tmp5/libgit2-1.4.3/tests/refs/revparse.c:28]
1:   String mismatch: objstr != expected_oid
1:   'a65fedf39aefe402d3bb6e24df4d4f5fe4547750' != 'be3563ae3f795b2b4353bcce3a527ad0a4f7f644' (at byte 0)
1: 
1/9 Test #1: offline ..........................***Failed  149.58 sec
[…]

Another assert hits in version 1.4.3 only, if you run the tests as root user:

[…]
1: worktree::worktree...................................
1: 
1:   1) Failure:
1: core::path::validate_current_user_ownership [/home/bebuch/media/tmp/tmp5/libgit2-1.4.3/tests/core/path.c:760]
1:   is_cur != 0
1:   1 != 0
1: 
1:   2) Failure:
1: refs::revparse::date [/home/bebuch/media/tmp/tmp5/libgit2-1.4.3/tests/refs/revparse.c:28]
1:   String mismatch: objstr != expected_oid
1:   'a65fedf39aefe402d3bb6e24df4d4f5fe4547750' != 'be3563ae3f795b2b4353bcce3a527ad0a4f7f644' (at byte 0)
1: 
1/9 Test #1: offline ..........................***Failed  149.58 sec
[…]

Version of libgit2 (release number or SHA1)

  • release 1.4.3
  • release 1.4.2
  • release 1.4.1
  • release 1.4.0 (multiple additional unittests fail)
  • Not affected: release 1.3.1 (but with other failing unit test)

Operating system(s) tested

  • Ubuntu 20.04 x86-64 (native)
  • Ubuntu 22.04 x86-64 (via docker)
@bebuch bebuch changed the title Unittest offline/worktree::worktree failes in version 1.4.[1-3] on Ubuntu Unittest offline/worktree::worktree failes in version 1.4.X on Ubuntu May 18, 2022
@ethomson
Copy link
Member

ethomson commented Jul 8, 2022

Thanks for the report - this was fixed in #6299

@ethomson ethomson closed this as completed Jul 8, 2022
freebsd-git pushed a commit to freebsd/freebsd-ports that referenced this issue Jan 13, 2023
There's still one failure that seems to be occurring if you're running as
root [1] and I'm unable to work out where and/or if upstream ever fixed this test.

References:
https://github.com/archlinux/svntogit-packages/blob/packages/libgit2/trunk/PKGBUILD
1: libgit2/libgit2#6307

PR:		268572
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