"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Ed Maste <emaste@freebsd.org>
Subject:
got tests on FreeBSD
To:
gameoftrees@openbsd.org
Date:
Fri, 27 Nov 2020 17:30:58 -0500

Download raw body.

Thread
I'm working on getting the got test suite running on FreeBSD (via
Cirrus-CI); naddy I'm wondering if you've tried running them and if so
what your results look like.

I had to make a few changes to get them running via util/got-build-regress.sh:

- miscellaneous OpenBSD vs FreeBSD changes like kern.ncpuonline vs kern.ncpu
- stubbed use of lockfile(1)
- explicitly add SUBDIR_TARGETS+=regress for make regress
- invoke the cmdline tests as ${.CURDIR]/foo.sh
- source common.sh via `dirname $`/common.sh

The last two are needed because make's operating in the objdir by
default after `make obj`; I'm surprised this differs between OpenBSD
and FreeBSD, but I think the changes are suitable for upstream in any
case and I'll post them in a bit.

I'm mainly curious if there's any existing experience with them on
FreeBSD, but if you're interested results can be found at
https://cirrus-ci.com/task/5584869487017984. I see 15 failed tests via
failures.log - 3 from checkout.sh and 12 from update.sh, and 6 of the
12 are due to segfaults in diff_atomize_text_by_line().

As an example here's the first failure:

/tmp/cirrus-ci-build/regress/cmdline/checkout.sh -q -r "/tmp"
--- /tmp/got-test-checkout_commit_from_wrong_branch-VTF3HXpm/stderr.expected
2020-11-27 22:05:46.326023000 +0000
+++ /tmp/got-test-checkout_commit_from_wrong_branch-VTF3HXpm/stderr
2020-11-27 22:05:46.324846000 +0000
@@ -1 +1 @@
-got: target commit is not contained in branch 'master'; the branch to
use must be specified with -b; if necessary a new branch can be
created for this commit with 'got branch -c
16b4f9ef5265e6b9bfc4738e625cc23e7b9794fc BRANCH_NAME'
+got: could not parse reference data
test failed; leaving test data in
/tmp/got-test-checkout_commit_from_wrong_branch-VTF3HXpm

Here's the backtrace of the first segfault:

(lldb) target create "/usr/local/bin/got" --core
"./got-test-update_merges_file_edits-OhFzdCP3/wt/got.core"
Core file '/tmp/got-test-update_merges_file_edits-OhFzdCP3/wt/got.core'
(x86_64) was loaded.
(lldb) bt
* thread #1, name = 'got', stop reason = signal SIGSEGV
* frame #0: 0x000000000025abeb got`diff_atomize_text_by_line at
diff_atomize_text.c:167:11
frame #1: 0x000000000025aa08 got`diff_atomize_text_by_line [inlined]
diff_data_atomize_text_lines(d=0x00000008007cb038) at
diff_atomize_text.c:192
frame #2: 0x000000000025a992
got`diff_atomize_text_by_line(func_data=<unavailable>,
d=0x00000008007cb038) at diff_atomize_text.c:198
frame #3: 0x000000000022a2d8
got`got_diff_prepare_file(f=0x00000008006f0520, p=0x00007fffffff95d8,
size=0x00007fffffff95c8, diff_data=0x00000008007cb038,
cfg=0x000000080072f320, ignore_whitespace=<unavailable>,
force_text_diff=1) at diffreg.c:169:7
frame #4: 0x000000000022a57a
got`got_diffreg(diffreg_result=0x00007fffffff9620, f1=<unavailable>,
f2=0x00000008006f0658, algorithm=<unavailable>, ignore_whitespace=0,
force_text_diff=1) at diffreg.c:230:8
frame #5: 0x00000000002541e3 got`diffreg(d=0x00007fffffff9700,
path1="/tmp/got-diff1.kwj9vRAj", path2=<unavailable>) at diff3.c:227:8
frame #6: 0x0000000000252f14
got`got_merge_diff3(overlapcnt=0x00007fffffff9c04, outfd=9,
p1="/tmp/got-test-update_merges_file_edits-OhFzdCP3/wt/got-merge-blob-deriv-s1A8ER",
p2="/tmp/got-test-update_merges_file_edits-OhFzdCP3/wt/got-merge-blob-orig-7bsCSb",
p3="/tmp/got-test-update_merges_file_edits-OhFzdCP3/wt/alpha",
label1="merged change: commit
70f9fc3257cbf1bb32edddaaf2ad3fa07d729291", label2="3-way merge base:
commit c38f00efc951c579b96c4e19cba7f59cc0a9502c",
label3=0x0000000000000000) at diff3.c:322:8
frame #7: 0x000000000024e773
got`merge_file(local_changes_subsumed=0x00007fffffffde68,
worktree=<unavailable>, blob_orig=<unavailable>,
ondisk_path="/tmp/got-test-update_merges_file_edits-OhFzdCP3/wt/alpha",
path="alpha", st_mode=33188,
deriv_path="/tmp/got-test-update_merges_file_edits-OhFzdCP3/wt/got-merge-blob-deriv-s1A8ER",
label_orig="3-way merge base: commit
c38f00efc951c579b96c4e19cba7f59cc0a9502c", label_deriv="merged change:
commit 70f9fc3257cbf1bb32edddaaf2ad3fa07d729291", repo=<unavailable>,
progress_cb=(got`update_progress at got.c:2826),
progress_arg=0x00007fffffffe310) at worktree.c:865:8
frame #8: 0x000000000024d9d9
got`merge_blob(local_changes_subsumed=<unavailable>,
worktree=<unavailable>, blob_orig=<unavailable>,
ondisk_path=<unavailable>, path=<unavailable>, st_mode=33188,
label_orig="3-way merge base: commit
c38f00efc951c579b96c4e19cba7f59cc0a9502c",
blob_deriv=0x00000008006fe240,
deriv_base_commit_id=0x000000080072f040, repo=<unavailable>,
progress_cb=(got`update_progress at got.c:2826),
progress_arg=0x00007fffffffe310) at worktree.c:1162:8
frame #9: 0x000000000024cb25 got`update_blob(worktree=<unavailable>,
fileindex=0x0000000800707070, ie=0x0000000800755000,
te=0x0000000800785000, path=<unavailable>, repo=0x0000000800721000,
progress_cb=(got`update_progress at got.c:2826),
progress_arg=0x00007fffffffe310) at worktree.c:1979:10
frame #10: 0x000000000024c0d3 got`diff_old_new(arg=0x00007fffffffe130,
ie=0x0000000800755000, te=0x0000000800785000,
parent_path=<unavailable>) at worktree.c:2168:9
frame #11: 0x000000000022ca10
got`diff_fileindex_tree(fileindex=<unavailable>,
ie=0x00007fffffffe0c8, tree=0x000000080072f0e0, path=<unavailable>,
entry_name=<unavailable>, repo=0x0000000800721000,
cb=0x00007fffffffe168, cb_arg=0x00007fffffffe130) at
fileindex.c:842:12
frame #12: 0x000000000022c753
got`got_fileindex_diff_tree(fileindex=<unavailable>,
tree=0x000000080072f0e0, path="", entry_name=0x0000000000000000,
repo=<unavailable>, cb=<unavailable>, cb_arg=0x00007fffffffe130) at
fileindex.c:912:9
frame #13: 0x0000000000242619
got`checkout_files(worktree=0x00000008006ff000,
fileindex=0x0000000800707070, relpath="", tree_id=0x000000080072f180,
entry_name=0x0000000000000000, repo=0x0000000800721000,
progress_cb=(got`update_progress at got.c:2826),
progress_arg=0x00007fffffffe310, cancel_cb=(got`check_cancelled at
got.c:2461), cancel_arg=0x0000000000000000) at worktree.c:2620:8
frame #14: 0x00000000002421a0
got`got_worktree_checkout_files(worktree=<unavailable>,
paths=<unavailable>, repo=0x0000000800721000,
progress_cb=(got`update_progress at got.c:2826),
progress_arg=0x00007fffffffe310, cancel_cb=(got`check_cancelled at
got.c:2461), cancel_arg=0x0000000000000000) at worktree.c:2699:9
frame #15: 0x0000000000217a71 got`cmd_update(argc=0,
argv=<unavailable>) at got.c:3106:10
frame #16: 0x0000000000214195 got`main(argc=1,
argv=0x00007fffffffe440) at got.c:244:11
frame #17: 0x0000000000213df0 got`_start(ap=<unavailable>,
cleanup=<unavailable>) at crt1.c:76:7
(lldb) quit