Menu

#40 fig2-dev-3.2.7a test #33 fails

closed
nobody
None
2019-10-30
2019-03-14
No

On macOS, test#33 fails:

 33: conditionally allocate \XFigu                   FAILED (output.at:175)

I think this is the correct part of fig2dev/tests/testsuite.log that shows the failure:

33. output.at:161: testing conditionally allocate \XFigu ...
TeX 3.14159265 (TeX Live 2014/Fink)
kpathsea version 6.2.0
Copyright 2014 D.E. Knuth.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the TeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the TeX source.
Primary author of TeX: D.E. Knuth.
pdfTeX 3.14159265-2.6-1.40.15 (TeX Live 2014/Fink)
kpathsea version 6.2.0
Copyright 2014 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Compiled with libpng 1.6.30; using libpng 1.6.36
Compiled with zlib 1.2.5; using zlib 1.2.11
Compiled with poppler version 0.26.2
./output.at:175: tex tex.tex | $FGREP dimen | uniq | wc -l

--- -   2019-03-14 05:11:21.000000000 -0500
+++ /sw/build.build/fig2dev-3.2.7a-1/fig2dev-3.2.7a/fig2dev/tests/testsuite.dir/at-groups/33/stdout 2019-03-14 05:11:21.000000000 -0500
@@ -1,2 +1,2 @@
-1
+       1

33. output.at:161: 33. conditionally allocate \XFigu (output.at:161): FAILED (output.at:175)

Discussion

  • Hanspeter Niederstrasser

    Unfortunately still fails after patching with 43bfd18:

    Compiled with zlib 1.2.5; using zlib 1.2.11
    Compiled with poppler version 0.26.2
    ./output.at:175: etex tex.tex | $FGREP dimen | uniq | wc -l
    
    --- -   2019-03-14 06:22:59.000000000 -0500
    +++ /src/mcj-fig2dev/fig2dev/tests/testsuite.dir/at-groups/43/stdout    2019-03-14 06:22:59.000000000 -0500
    @@ -1,2 +1,2 @@
    -1
    +       1
    
    43. output.at:161: 43. conditionally allocate \XFigu (output.at:161): FAILED (output.at:175)
    

    Also failed when using git HEAD (test #27 in HEAD also failed, and I can file a separate report for that).

     
  • Roland Rosenfeld

    Seems that "wc -l" returns a trailing tab before the output on your system. So Thomas may need to add some code to to get rid of this (maybe append
    "| sed 's/^[ \t]*//' (replace \t with a TAB)
    or the like to the test code.

     
  • tkl

    tkl - 2019-03-14

    Yes, as Roland mentioned earlier: Could you check the output of wc -l on Darwin, e.g., try echo "hi" | wc -l? The test relies on the output being a "1", followed by a newline. Otherwise, please try echo -e 'h\t i' | wc -l | tr -d ' \t. Regarding the tr-command, I am not sure whether the use of backslash-escapes is fully portable. Incidentally, tr -d ' \t' is also used in test #27.
    Could you post the log for test #27 here?

     
  • Hanspeter Niederstrasser

    $ echo "hi" | wc -l
           1 (leading spaces)
    

    I need to run, but will post the rest of the diagnostics when I return tonight.

     
  • Hanspeter Niederstrasser

    $ echo -e 'h\t i' | wc -l | tr -d ' \t'
    1
    

    Buf if I try to edit output.at to have the tr command at the end:

    AT_CHECK([etex tex.tex | $FGREP dimen | uniq | wc -l | tr -d ' \t'
    

    the output in testsuite.log still shows the leading spaces. However, the same command sequence run from the shell does remove the leading spaces. So the idea is right, but maybe the syntax is wrong for the language used in output.at ?

     
    • tkl

      tkl - 2019-03-15

      Thank you for testing. Can it be, that the changes in output.at were not carried over into the script file testsuite? The latter is the real test script, and it is produced from all .at-files, but at distribution time. A make check (or make dist, for that matter) rebuilds the file testsuite, but it needs a certain build environment (m4, automake, probably autoconf). Also, the make check certainly works in the development sources, not sure about the distrbuted files.
      In any case, I will update this particular test with the tr -d ' \t' command. To patch the testsuite file, one would have to grep for XFigu (two times), then grep for "wc -l" a couple of lines below (four times) and add | tr -d ' \t'.
      Do you believe this issue is resolved, with respect to test #33?

       
  • Hanspeter Niederstrasser

    Test#27 output:

    27. read.at:231: testing correctly free invalid line object, ticket #26 ...
    ./read.at:233: fig2dev -L box <<EOF
    
    2
     2
      23333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333332
                     2
                      2
                       1
                        3
                         2
                          2
                           2
    
    2
     2
      2
       2
        2
    
    
    2
    EOF
    
    --- -   2019-03-14 20:53:02.000000000 -0500
    +++ /src/mcj-fig2dev/fig2dev/tests/testsuite.dir/at-groups/27/stderr    2019-03-14 20:53:02.000000000 -0500
    @@ -1,2 +1,2 @@
    -incomplete line object
    +Incorrect object code -1
    
    stdout:
    27. read.at:231: 27. correctly free invalid line object, ticket #26 (read.at:231): FAILED (read.at:233)
    
     
  • tkl

    tkl - 2019-03-15

    The test #27 writes a file that contains vertical tabs. I believe, the issue is that these vertical tabs are treated differently on Mac or unix. I will replace the vertical tabs with newlines.

     
  • Hanspeter Niederstrasser

    The output.at changes are being carried over to the testsuite script when I run make check:

    { set +x
    $as_echo "$at_srcdir/output.at:175: etex tex.tex | \$FGREP dimen | uniq | wc -l | tr -d ' \\t'
    "
    at_fn_check_prepare_notrace 'an embedded newline' "output.at:175"
    ( $at_check_trace; etex tex.tex | $FGREP dimen | uniq | wc -l | tr -d ' \t'
    
    ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
    at_status=$? at_failed=false
    $at_check_filter
    
    echo >>"$at_stdout"; $as_echo "1
    " | \
      $at_diff - "$at_stdout" || at_failed=:
    at_fn_check_status 0 $at_status "$at_srcdir/output.at:175"
    $at_failed && at_fn_log_failure
    $at_traceon; }
    
     
  • tkl

    tkl - 2019-03-15

    I am sorry, I prematurely believed this to be solved. Nevertheless, could you check out the latest commit and run make check in the development version?
    The lines below would re-create the necessary files and the test on the command line. Could you vary one of the last two lines a bit, to find out what is necessary for the test to succeed? E.g., instead of "tr -d ' \t'", to try "tr -d '\11\40'", or use sed instead, as proposed by Roland above, or use "od -c" instead of the tr-command to diagnose the output. This would be very helpful. I have access to a mac from time to time, but not very regulary.

    sh
    cat >line.fig <<EOF
    #FIG 3.2
    Landscape
    Center
    Inches
    A9
    100.00
    Single
    -2
    1200 2
    2 1 0 3 0 7 50 -1 -1 0.0 0 0 -1 0 0 3
    50 50 500 50 500 200
    EOF
    cat >tex.tex <<EOF
    \input tikz
    \input line.tikz\immediate\write16{\meaning\XFigu}
    \input line.tikz\immediate\write16{\meaning\XFigu}\bye
    EOF
    cat >latex.tex <<EOF
    \documentclass{minimal}\usepackage{tikz}\begin{document}
    \input line.tikz\immediate\write16{\meaning\XFigu}
    \input line.tikz\immediate\write16{\meaning\XFigu}\end{document}
    EOF
    
    fig2dev -L tikz line.fig line.tikz
    etex tex.tex | fgrep dimen | uniq | wc -l | tr -d ' \t'
    latex latex.tex | fgrep dimen | uniq | wc -l | tr -d ' \t'
    
     
  • Hanspeter Niederstrasser

    Updating to commit 147903 fixed test #33.

    Test #27 still fails:

    #                             -*- compilation -*-
    27. read.at:231: testing correctly free invalid line object, ticket #26 ...
    ./read.at:233: fig2dev -L box <<EOF
    
    2
    2
    23333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333332
    2
    2
    1
    3
    2
    2
    2
    
    2
    2
    2
    2
    2
    
    
    2
    EOF
    
    --- -   2019-03-15 18:28:22.000000000 -0500
    +++ /src/mcj-fig2dev/fig2dev/tests/testsuite.dir/at-groups/27/stderr    2019-03-15 18:28:22.000000000 -0500
    @@ -1,2 +1,2 @@
    -incomplete line object
    +Incorrect object code -1
    
    stdout:
    27. read.at:231: 27. correctly free invalid line object, ticket #26 (read.at:231): FAILED (read.at:233)
    
     
  • tkl

    tkl - 2019-03-18

    Could you apply the following patch to the file mcj-fig2dev/fig2dev/tests/read.at, i.e., on line 255 replacing "[incomplete line object\n]" by "ignore", run make check and report, whether the test succeeded? The patched test still checks whether this particular input does cause a segfault (which it once did), but does not care which exact failure condition fig2dev reports.
    To patch, copy the following lines, e.g., to f.patch, cd to mcj-fig2dev and do
    patch -p1 <f.patch.

    diff --git a/fig2dev/tests/read.at b/fig2dev/tests/read.at
    index 94cc520..2d759a6 100644
    --- a/fig2dev/tests/read.at
    +++ b/fig2dev/tests/read.at
    @@ -252,8 +252,7 @@ AT_CHECK([fig2dev -L box <<EOF
    
     2
     EOF
    -],1,ignore,[incomplete line object
    -])
    +],1,ignore,ignore)
    AT_CLEANUP
    
    AT_SETUP([correctly free invalid spline, ticket #27])
    
     
  • Hanspeter Niederstrasser

    Test #27 now passes with the above patch that sets the ignore parameter.

     
  • tkl

    tkl - 2019-03-22

    Commit 48dc403 applies the patch shown above, viz., ignoring the output on stderr. This commit also reverts the data file for test #27 back to its original state, in which it contained vertical tabs. With commit 48dc403, tests #27 and #33 should pass on Darwin.

     
  • Hanspeter Niederstrasser

    Confirming that as of 48dc403, all tests pass. Thank you.

     
  • tkl

    tkl - 2019-03-23
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB
Gen AI apps are built with MongoDB Atlas
Atlas offers built-in vector search and global availability across 125+ regions. Start building AI apps faster, all in one place.