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

i586: SUMMARY Failed 3 of 557 assertions in 145 tests (2 skipped) #1362

Closed
vt-alt opened this issue Feb 4, 2025 · 2 comments
Closed

i586: SUMMARY Failed 3 of 557 assertions in 145 tests (2 skipped) #1362

vt-alt opened this issue Feb 4, 2025 · 2 comments

Comments

@vt-alt
Copy link

vt-alt commented Feb 4, 2025

Some tests fail on i586 (which is 32-bit x86):

00:37:25 + script -e -c 'make test' /dev/null
00:37:25 Script started, output log file is '/dev/null'.
00:37:25 make: Entering directory '/usr/src/RPM/BUILD/tig-2.5.11'
00:37:25         CC  test/tools/test-graph.o
00:37:25       LINK  test/tools/test-graph
00:37:25       TEST  test/blame/default-test
00:37:25       TEST  test/blame/initial-diff-test
00:37:26             | Failed 1 out of 2 test(s)
00:37:26             |   [OK] initial-diff.screen assertion
00:37:26             | [FAIL] blame-deleted-line.screen != expected/blame-deleted-line.screen
00:37:26             | diff --git a/expected/blame-deleted-line.screen b/blame-deleted-line.screen
00:37:26             | index 08fd721..8020afd 100644
00:37:26             | --- a/expected/blame-deleted-line.screen
00:37:26             | +++ b/blame-deleted-line.screen
00:37:26             | @@ -1,22 +1,22 @@
00:37:26             | -0400   1x /*                     __
00:37:26             | -0400   2x **     ________ ___   / /  ___      __ ____  Scala.js Benchmarks
00:37:26             | -0400   3x **    / __/ __// _ | / /  / _ | __ / // __/  (c) 2003-2013, LAMP/EPFL
00:37:26             | -0400   4x **  __\ \/ /__/ __ |/ /__/ __ |/_// /_\ \    (c) 2013, Jonas Fonseca
00:37:26             | -0400   5x ** /____/\___/_/ |_/____/_/ | |__/ /____/
00:37:26             | -0400   6x **                          |/____/
00:37:26             | -0400   7x \*
00:37:26             | -0400   8x
00:37:26             | -0400   9x package benchmarks
00:37:26             | -0400  10x
00:37:26             | -0400  11x import scala.compat.Platform
00:37:26             | -0500  12x import scala.scalajs.js
00:37:26             | -0500  13x
00:37:26             | -0500  14x object Benchmark {
00:37:26             | -0500  15x   val benchmarks = js.Array[js.Function0[Unit]]()
00:37:26             | -0500  16x
00:37:26             | -0500  17x   val global = js.Dynamic.global.asInstanceOf[js.Dictionary]
00:37:26             | -0500  18x   global("ScalaJSBenchmarks") = benchmarks
00:37:26             | -0500  19x
00:37:26             | -0500  20x   def add(benchmark: Benchmark) {
00:37:26             | -0500  21x     benchmarks.push {
00:37:26             | -[blame] 34d6868cfae60a7cc2494d282eaee27efa900059 changed common/Benchmark.sc 21%
00:37:26             | +
00:37:26             | +
00:37:26             | +
00:37:26             | +
00:37:26             | +
00:37:26             | +
00:37:26             | +
00:37:26             | +
00:37:26             | +
00:37:26             | +
00:37:26             | +
00:37:26             | +
00:37:26             | +
00:37:26             | +
00:37:26             | +
00:37:26             | +
00:37:26             | +
00:37:26             | +
00:37:26             | +
00:37:26             | +
00:37:26             | +
00:37:26             | +[blame] common/Benchmark.scala                                                0%
00:37:26       TEST  test/blame/revargs-test
00:37:26       TEST  test/blame/start-on-line-test
00:37:26       TEST  test/blame/stash-test
00:37:26             | Failed 2 out of 3 test(s)
00:37:26             |   [OK] diff.screen assertion
00:37:26             | [FAIL] blame1.screen != expected/blame1.screen
00:37:26             | diff --git a/expected/blame1.screen b/blame1.screen
00:37:26             | index 0e4b25d..324cafe 100644
00:37:26             | --- a/expected/blame1.screen
00:37:26             | +++ b/blame1.screen
00:37:26             | @@ -1,2 +1,2 @@
00:37:26             | -original line
00:37:26             | -[blame] 973a46fa50e2704ee2d550a931ad8edb1c50731c changed file - line 1 of 1 100%
00:37:26             | +
00:37:26             | +[blame] file                                                                  0%
00:37:26             | [FAIL] blame2.screen != expected/blame2.screen
00:37:26             | diff --git a/expected/blame2.screen b/blame2.screen
00:37:26             | index 0e4b25d..324cafe 100644
00:37:26             | --- a/expected/blame2.screen
00:37:26             | +++ b/blame2.screen
00:37:26             | @@ -1,2 +1,2 @@
00:37:26             | -original line
00:37:26             | -[blame] 973a46fa50e2704ee2d550a931ad8edb1c50731c changed file - line 1 of 1 100%
00:37:26             | +
00:37:26             | +[blame] file                                                                  0%
00:37:26       TEST  test/blob/wrap-lines-test
...

They don't fail on x86_64, aarch64, and ppc64le.
Temporary build log available there https://git.altlinux.org/tasks/373194/build/100/i586/log

@koutcher
Copy link
Collaborator

koutcher commented Feb 5, 2025

Thanks for reporting the issue. I have a fix but my last 32-bit x86 available platform cannot run the test suite, could you confirm the following patch works for you ?

diff --git a/src/diff.c b/src/diff.c
index 778f48be..9f070f53 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -698,7 +698,7 @@ diff_trace_origin(struct view *view, enum request request, struct line *line)
        }

        string_ncopy(view->env->file, commit.filename, strlen(commit.filename));
-       string_copy(request == REQ_VIEW_BLAME ? view->env->ref : view->env->commit, header.id);
+       string_copy_rev(request == REQ_VIEW_BLAME ? view->env->ref : view->env->commit, header.id);
        view->env->goto_lineno = header.orig_lineno - 1;

@vt-alt
Copy link
Author

vt-alt commented Feb 5, 2025

Thanks for the fix. With the patch all tests passed.

Btw, you can use docker to test 32-bit builds, and GitHub CI supports docker, there is example I did for another project https://github.com/lkrg-org/lkrg/blob/main/.github/workflows/cross.yml#L31 it runs on i386/ubuntu:bionic image.

mckellygit pushed a commit to mckellygit/tig that referenced this issue Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants