On Tue, 12 Sep 2017 21:24:04 +0200 Sebastian Andrzej Siewior <sebast...@breakpoint.cc> wrote: > On 2016-11-18 22:51:29 [+0100], ViaThinkSoft wrote: > > Version: 5.1.1alpha+20120614-2+b3 > > I noticed that xzcmp returns status code 2 (error) for a few file pairs, > > especially if they differ in size. > > can you please check if current 5.2.2 is affected and if so provide a > testcase? >
Hello, Out of curiosity, I tried to reproduce the issue with xz-utils 5.2.2, and it seems it's still there. Here is a reproducer, using the change log of xz-utils, but any big text file, like system logs, seems to fit well that purpose: #! /bin/sh # Reproducer for bug #844770 xzcmp --version # Building test suite gunzip /usr/share/doc/xz-utils/changelog.gz -c > reproducer1 head -n50 reproducer1 > reproducer2 xz reproducer1 reproducer2 # Testing xzcmp reproducer1.xz reproducer2.xz faulty_exitcode="$?" printf 'here xzcmp sent exit code %s\n' "$faulty_exitcode" Execution of this script produces the following output: xzcmp (XZ Utils) 5.2.2 cmp: EOF on - after byte 1918, line 50 here xzcmp sent exit code 2 Also, a quick test appending the `trap '' PIPE` on top of the script /usr/bin/xzcmp did seem to do the job, per initial bug description message. xzcmp (XZ Utils) 5.2.2 cmp: EOF on - after byte 1918, line 50 here xzcmp sent exit code 1 I will keep the modification in my /usr/bin/xzcmp for some time, in case it inadvertently breaks things. Please tell me if I should attach the current changelog.gz, should the problem fail to reappear on your side. Cheers -- Étienne Mollier <etienne.moll...@mailoo.org>