libcdio / libcdio-paranoia

CD paranoia on top of libcdio
GNU General Public License v3.0
50 stars 38 forks source link

Create test for multiple matches bug #9

Closed ghost closed 7 years ago

ghost commented 7 years ago

The test data is pretty large, but since the bug only happens in the places where paranoia tries to merge blocks we need to have at least two blocks and these are around 2.5MB.

rocky commented 7 years ago

Sorry I've not been able to get to this. What we've been doing in (in related project vcdimager) when we have large test files is to put them somewhere else and then have the tests run optionally depending on whether these are around. See http://cvs.savannah.gnu.org/viewvc/vcdimager/vcdimager/vcd_examples/README?view=markup

I'll set this up as a separate project, maybe a git subproject and have a way to allow developers to test with this.

So in sum, although it's going to take a while to get to it, rest assured I will get to it and appreciate your creating the test.

and run the test option

ghost commented 7 years ago

Any updates on this? Anything I can do to help?

rocky commented 7 years ago

Sorry for the delay.

The only thing that I'd request is to remove cdda2.bin and make sure a test for it runs only if it happens to be where it currently is located.

Then if you put someplace I can get to, I'll arrange to add it to the existing set of optional test cases for those libcdio developers and others who have disk space and want to try the full set of tests.

(Putting a large in the repo forcing everyone to download it, is probably not user friendly)

As soon as this is done, I promise I'll merge.

ghost commented 7 years ago

I updated the commit to remove the file and only run the test when data file is present. The data file can be found here: https://mega.nz/#!alBBhS7Q!C3O48z4GcNtcqEpVZe01S6MjyGt-0kGfHyjpdecosFU

rocky commented 7 years ago

Thanks. I tried building from you the multiple matches branch of your repo and get this error when running make test:

... 
make  cdda.bin cdda.cue cdda2.bin cdda2.cue
make[3]: Entering directory '/tmp/libcdio-paranoia/test/data'
make[3]: Nothing to be done for 'cdda.bin'.
make[3]: Nothing to be done for 'cdda.cue'.
make[3]: *** No rule to make target 'cdda2.bin'.  Stop.
make[3]: Leaving directory '/tmp/libcdio-paranoia/test/data'
Makefile:355: recipe for target 'check-am' failed

There shouldn't be a rule I believe for cdda2.bin since that is optional, right?

The link you sent seems to be a cue sheet, not a huge file. And I am guessing you meant to have two files, both the cue and the data right? Or are you reusing a cue sheet?

ghost commented 7 years ago

Yeah, sorry you're right, I forgot to update the Makefile.am file, updated the commit. The link is a 5.3MB binary file for me, not sure what is going on there.

I left the cue sheet for the data file in the repository, since it's only 176 bytes.

rocky commented 7 years ago

Have the binary file now. Didn't realize I had to click on the link in a browser and then download from there. (Used wget). Checking now...

rocky commented 7 years ago

Sigh. Now the new test is failing. The error messages say something about missing drive capabilities but that shouldn't happen on a cue/bin disc image.

$ ./check_paranoia.sh
cdparanoia III release 10.2 libcdio 0.93git x86_64-unknown-linux-gnu
(C) 2001 Monty <monty@xiph.org> and Xiphophorus
(C) 2004, 2005, 2008 Rocky Bernstein <rocky@gnu.org>
(C) 2014 Robert Kausch <robert.kausch@freac.org>

Report bugs to bug-libcdio@gnu.org

Using cdda library version: 10.2+0.93+2git x86_64-pc-linux-gnu
Using paranoia library version: 10.2+0.93+2git x86_64-pc-linux-gnu
Checking /tmp/libcdio-paranoia/test/data/cdda.cue for cdrom...
Verifying drive can read CDDA...
    Expected command set reads OK.

Attempting to determine drive endianness from data....
    Data appears to be coming back Little Endian.
    certainty: 100%

Attempting to set cdrom to full speed...
405: Option not supported by drive
    CDROM speed set FAILED. Continuing anyway...

Table of contents (audio tracks only):
track        length               begin        copy pre ch
===========================================================
  1.      302 [00:04.02]        0 [00:00.00]    OK   no  2
TOTAL     302 [00:04.02]    (audio only)

Ripping from sector       0 (track  1 [0:00.00])
      to sector     301 (track  1 [0:04.01])

outputting to cdda.raw

 (== PROGRESS == [>                             | ...... 00 ] == :^D . ==)      INFO: Trying to access past end of disk lsn: 1200, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1200, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1200, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1200, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1200, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1200, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1200, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1200, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1200, end lsn: 302
405: Option not supported by drive
010: Unable to access sector 1200: skipping...

 (== PROGRESS == [                              | 000301 00 ] == :^D * ==)

Done.

44394+0 records in
44394+0 records out
710304 bytes (710 kB, 694 KiB) copied, 0.0579926 s, 12.2 MB/s
44394+0 records in
44394+0 records out
710304 bytes (710 kB, 694 KiB) copied, 0.0356669 s, 19.9 MB/s
** Raw cdda.bin extraction okay
cdparanoia III release 10.2 libcdio 0.93git x86_64-unknown-linux-gnu
(C) 2001 Monty <monty@xiph.org> and Xiphophorus
(C) 2004, 2005, 2008 Rocky Bernstein <rocky@gnu.org>
(C) 2014 Robert Kausch <robert.kausch@freac.org>

Report bugs to bug-libcdio@gnu.org

Using cdda library version: 10.2+0.93+2git x86_64-pc-linux-gnu
Using paranoia library version: 10.2+0.93+2git x86_64-pc-linux-gnu
Checking /tmp/libcdio-paranoia/test/data/cdda.cue for cdrom...
Verifying drive can read CDDA...
    Expected command set reads OK.

Attempting to determine drive endianness from data....
    Data appears to be coming back Little Endian.
    certainty: 100%

Attempting to set cdrom to full speed...
405: Option not supported by drive
    CDROM speed set FAILED. Continuing anyway...

Table of contents (audio tracks only):
track        length               begin        copy pre ch
===========================================================
  1.      302 [00:04.02]        0 [00:00.00]    OK   no  2
TOTAL     302 [00:04.02]    (audio only)

Ripping from sector       0 (track  1 [0:00.00])
      to sector     301 (track  1 [0:04.01])

outputting to cdda.raw

 (== PROGRESS == [>e                            | ...... 00 ] == :-0 . ==)      INFO: Trying to access past end of disk lsn: 1200, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1200, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1200, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1200, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1200, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1200, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1200, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1200, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1200, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1214, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1214, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1214, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1214, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1214, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1214, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1214, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1214, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1214, end lsn: 302
405: Option not supported by drive
007: Unknown, unrecoverable error reading data
007: Unknown, unrecoverable error reading data

   INFO: Trying to access past end of disk lsn: 1487, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1487, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1487, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1487, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1487, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1487, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1487, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1487, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1487, end lsn: 302
007: Unknown, unrecoverable error reading data

 (== PROGRESS == [ e ee e ee e ee e ee e ee e e>| 000281 00 ] == :-0 o ==)      INFO: Trying to access past end of disk lsn: 1489, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1489, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1489, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1489, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1489, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1489, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1489, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1489, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1489, end lsn: 302
007: Unknown, unrecoverable error reading data

 (== PROGRESS == [ e ee e ee e ee e ee e ee e e>| 000295 00 ] == :-0 o ==)      INFO: Trying to access past end of disk lsn: 1500, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1500, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1500, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1500, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1500, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1500, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1500, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1500, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1500, end lsn: 302
007: Unknown, unrecoverable error reading data

 (== PROGRESS == [ e ee e ee e ee e ee e ee e ee| 000301 00 ] == :^D * ==)

Done.

cdparanoia III release 10.2 libcdio 0.93git x86_64-unknown-linux-gnu
(C) 2001 Monty <monty@xiph.org> and Xiphophorus
(C) 2004, 2005, 2008 Rocky Bernstein <rocky@gnu.org>
(C) 2014 Robert Kausch <robert.kausch@freac.org>

Report bugs to bug-libcdio@gnu.org

405: Option not supported by drive
Ripping from sector       0 (track  1 [0:00.00])
      to sector     301 (track  1 [0:04.01])

outputting to cdda.raw

405: Option not supported by drive

 (== PROGRESS == [                              | 000301 00 ] == :^D * ==)

Done.

** Under-run correction okay
cdparanoia III release 10.2 libcdio 0.93git x86_64-unknown-linux-gnu
(C) 2001 Monty <monty@xiph.org> and Xiphophorus
(C) 2004, 2005, 2008 Rocky Bernstein <rocky@gnu.org>
(C) 2014 Robert Kausch <robert.kausch@freac.org>

Report bugs to bug-libcdio@gnu.org

Using cdda library version: 10.2+0.93+2git x86_64-pc-linux-gnu
Using paranoia library version: 10.2+0.93+2git x86_64-pc-linux-gnu
Checking /tmp/libcdio-paranoia/test/data/cdda.cue for cdrom...
Verifying drive can read CDDA...
    Expected command set reads OK.

Attempting to determine drive endianness from data....
    Data appears to be coming back Little Endian.
    certainty: 100%

Attempting to set cdrom to full speed...
405: Option not supported by drive
    CDROM speed set FAILED. Continuing anyway...

Table of contents (audio tracks only):
track        length               begin        copy pre ch
===========================================================
  1.      302 [00:04.02]        0 [00:00.00]    OK   no  2
TOTAL     302 [00:04.02]    (audio only)

Ripping from sector       0 (track  1 [0:00.00])
      to sector     301 (track  1 [0:04.01])

outputting to cdda.raw

 (== PROGRESS == [>                             | ...... 00 ] == :^D . ==)      INFO: Trying to access past end of disk lsn: 1200, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1200, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1200, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1200, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1200, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1200, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1200, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1200, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1200, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1199, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1199, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1199, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1199, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1199, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1199, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1199, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1199, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1199, end lsn: 302
405: Option not supported by drive
010: Unable to access sector 1200: skipping...
010: Unable to access sector 1199: skipping...

 (== PROGRESS == [-- --                         | 000301 00 ] == :^D * ==)

Done.

** Small jitter correction okay
** --log option okay
cdparanoia III release 10.2 libcdio 0.93git x86_64-unknown-linux-gnu
(C) 2001 Monty <monty@xiph.org> and Xiphophorus
(C) 2004, 2005, 2008 Rocky Bernstein <rocky@gnu.org>
(C) 2014 Robert Kausch <robert.kausch@freac.org>

Report bugs to bug-libcdio@gnu.org

Using cdda library version: 10.2+0.93+2git x86_64-pc-linux-gnu
Using paranoia library version: 10.2+0.93+2git x86_64-pc-linux-gnu
Checking /tmp/libcdio-paranoia/test/data/cdda.cue for cdrom...
Verifying drive can read CDDA...
    Expected command set reads OK.

Attempting to determine drive endianness from data....
    Data appears to be coming back Little Endian.
    certainty: 100%

Attempting to set cdrom to full speed...
405: Option not supported by drive
    CDROM speed set FAILED. Continuing anyway...

Table of contents (audio tracks only):
track        length               begin        copy pre ch
===========================================================
  1.      302 [00:04.02]        0 [00:00.00]    OK   no  2
TOTAL     302 [00:04.02]    (audio only)

Ripping from sector       0 (track  1 [0:00.00])
      to sector     301 (track  1 [0:04.01])

outputting to cdda.raw

 (== PROGRESS == [>e                            | ...... 00 ] == :-0 . ==)      INFO: Trying to access past end of disk lsn: 1200, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1200, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1200, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1200, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1200, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1200, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1200, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1200, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1200, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1213, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1213, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1213, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1213, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1213, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1213, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1213, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1213, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1213, end lsn: 302
405: Option not supported by drive
010: Unable to access sector 1200: skipping...
010: Unable to access sector 1213: skipping...

   INFO: Trying to access past end of disk lsn: 1486, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1486, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1486, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1486, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1486, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1486, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1486, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1486, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1486, end lsn: 302
010: Unable to access sector 1486: skipping...

 (== PROGRESS == [ e-eeeeeeeeeeeeeeeeeeeeeeeeee>| 000280 00 ] == :-0 o ==)      INFO: Trying to access past end of disk lsn: 1488, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1488, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1488, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1488, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1488, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1488, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1488, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1488, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1488, end lsn: 302
010: Unable to access sector 1488: skipping...

 (== PROGRESS == [ e-eeeeeeeeeeeeeeeeeeeeeeeeee>| 000294 00 ] == :-0 o ==)      INFO: Trying to access past end of disk lsn: 1501, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1501, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1501, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1501, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1501, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1501, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1501, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1501, end lsn: 302
   INFO: Trying to access past end of disk lsn: 1501, end lsn: 302
010: Unable to access sector 1501: skipping...

 (== PROGRESS == [ e-eeeeeeeeeeeeeeeeeeeeeeeeeee| 000301 00 ] == :^D * ==)

Done.

** under-run + jitter correction okay
cdparanoia III release 10.2 libcdio 0.93git x86_64-unknown-linux-gnu
(C) 2001 Monty <monty@xiph.org> and Xiphophorus
(C) 2004, 2005, 2008 Rocky Bernstein <rocky@gnu.org>
(C) 2014 Robert Kausch <robert.kausch@freac.org>

Report bugs to bug-libcdio@gnu.org

Using cdda library version: 10.2+0.93+2git x86_64-pc-linux-gnu
Using paranoia library version: 10.2+0.93+2git x86_64-pc-linux-gnu
Checking /tmp/libcdio-paranoia/test/data/cdda2.cue for cdrom...
Verifying drive can read CDDA...
    Expected command set reads OK.

Attempting to determine drive endianness from data....
    Data appears to be coming back Little Endian.
    certainty: 100%

Attempting to set cdrom to full speed...
405: Option not supported by drive
    CDROM speed set FAILED. Continuing anyway...

Table of contents (audio tracks only):
track        length               begin        copy pre ch
===========================================================
  1.     2378 [00:31.53]        0 [00:00.00]    OK   no  2
TOTAL    2378 [00:31.53]    (audio only)

Ripping from sector       0 (track  1 [0:00.00])
      to sector    2377 (track  1 [0:31.52])

outputting to cdda.raw

405: Option not supported by drive

 (== PROGRESS == [              !              !| 002377 00 ] == :^D * ==)

Done.

cdda-matches.raw /tmp/libcdio-paranoia/test/data/cdda2.bin differ: byte 5487217, line 102789
** multiple matches problem
$ echo $?
3
ghost commented 7 years ago

The test is supposed to fail, this is based on the master branch. If you merge this to one of the fix branches (and recompile of course), the tests will pass. I did it on the master branch to make sure that the test actually fails with the old code.

As far as I can tell, the "option not supported by drive" output doesn't really matter, it also happens with the other tests in check_paranoia.sh.

rocky commented 7 years ago

Ok. I'll try with merging the other MR a little bit later and test and then merge this.

Thanks.

rocky commented 7 years ago

Thanks for all of the good work, and your patience. I'm sorry we couldn't and didn't get to this sooner.