[tlbuild] Broken tests for mendexk on arm

Johannes Hielscher jhielscher at posteo.de
Mon May 10 03:02:59 CEST 2021


Am Sun, 9 May 2021 15:28:16 -0600
schrieb Karl Berry <karl at freefriends.org>:

>     > These changes broke mendexk tests or arm (Raspberry PI;
>     > armhf-linux & aarch64-linux):  
> 
> The code assumed that char values were signed (comparisons with < 0),
> but apparently on aarch64 char is unsigned by default.
> 
> When I changed the type to int, the tests worked. Committed in r59151:
> 
>     --- mendex.h	(revision 59144)
>     +++ mendex.h	(working copy)
>      struct page {
>             char *page;
>             char *enc;
>     -	char attr[3];
>     +	int attr[3];
>      };
> 
> I hope that fixes it (did for me). Let me know if problems persist.

I have bad news. Here on a freshly pulled -59153 (I double-checked that
the above diff has indeed been applied), the new "rangetwo" test works
fine, but the "pprecA" test still fails, with the output wrong in the
same way as before:

# test for page_precedence           
./upmendex -s $srcdir/tests/pprec0.ist $srcdir/tests/pprecA.idx -o
pprecA-0.ind1 -t pprecA-0.ilg \ && diff $srcdir/tests/pprecA-0.ind
pprecA-0.ind1 || exit 1
+ ./upmendex
-s ../../../texk/upmendex/tests/pprec0.ist ../../../texk/upmendex/tests/pprecA.idx
-o pprecA-0.ind1 -t pprecA-0.ilg This is upmendex version 0.55 (TeX
Live 2022/dev). Scanning input
file ../../../texk/upmendex/tests/pprecA.idx....done (9 entries
accepted, 0 rejected). 9 entries accepted, 0 rejected. Sorting
index....done(0 comparisons). Sorting pages....done(27 comparisons).
Making index file....done. 0 warnings, written in
pprecA-0.ilg. Output written in pprecA-0.ind1.           
+ diff ../../../texk/upmendex/tests/pprecA-0.ind pprecA-0.ind1
3c3             
<   \item entryA[[delim0]]i[[sfx 3p]], 1[[sfx 3p]], I[[sfx 3p]]
---                                 
>   \item entryA[[delim0]]i, ii, iii, 1, 2, 3, I, II, III
+ exit 1                           
FAIL tests/upmendex.test (exit status: 1)
                               
============================================================================
Testsuite summary for upmendex (TeX Live) 0.55
============================================================================
# TOTAL:
1 # PASS:
0 # SKIP:
0 # XFAIL:
0 # FAIL:
1 # XPASS:
0 # ERROR:
0
============================================================================
See ./test-suite.log
============================================================================


> 
> Also:
> - added one more test, even simpler, to which I had reduced the
> problem.
> - "preventively" changed another char declaration to unsigned char,
> the index.words member. (Otherwise I suspect that if its value was
> >128, there would be undefined behavior.)
> - factored out a couple common (and complex) expressions in fwrite.c.
> 
> Takuji ... hope all that is ok.
> 
> Special thanks to Nelson for giving me access to an aarch64 system
> from his apparently infinite farm of systems :). --thanks, karl.

First, a big thumbs up to you and Nelson, that you did the debugging,
and located some really hidden bug. But I'm sorry this apparently wasn't
the whole story, hrm.

I'm at a loss right now what now could still be the culprit. Can you
test if my upmendex binary like distributed in Master/bin/aarch64-linux
in your environment does or doesn't work? And/or can you send me the
upmendex that you built, so that I can test it here?

Stupid question: before the patches, did you run the pprecA test and it
failed in the same way as for me/Simon/Mojca?

Best,
Johannes


More information about the tlbuild mailing list.