diff options
author | Leon Merten Lohse <leon@green-side.de> | 2012-10-24 20:06:08 +0200 |
---|---|---|
committer | Leon Merten Lohse <leon@green-side.de> | 2012-10-24 20:10:20 +0200 |
commit | 2cda07957f08f07304f63cc158f881735fb24003 (patch) | |
tree | ab798922e874523f975595075a40b6be397f7d28 | |
parent | cf6b347056e072fd6c53943a7672d8118d30c4a0 (diff) |
removed warning while parsing empty cd-text
cleaned up check_cue.sh.in
fixed isofs-m1 test not running
updated isofs-m1 test result
removed obsolete cdda.toc test data
updated cue test to check for wrong track nr issue
-rw-r--r-- | lib/driver/_cdio_generic.c | 5 | ||||
-rw-r--r-- | lib/driver/cdtext.c | 2 | ||||
-rw-r--r-- | test/cdda.right | 2 | ||||
-rwxr-xr-x | test/check_common_fn.in | 2 | ||||
-rw-r--r-- | test/check_cue.sh.in | 78 | ||||
-rw-r--r-- | test/data/Makefile.am | 13 | ||||
-rw-r--r-- | test/data/cdda.cue | 2 | ||||
-rw-r--r-- | test/data/cdda.toc | 14 | ||||
-rw-r--r-- | test/driver/cdrdao.c.in | 2 | ||||
-rw-r--r-- | test/isofs-m1-no-rr.right | 4 |
10 files changed, 52 insertions, 72 deletions
diff --git a/lib/driver/_cdio_generic.c b/lib/driver/_cdio_generic.c index 92335668..d3cd1b0c 100644 --- a/lib/driver/_cdio_generic.c +++ b/lib/driver/_cdio_generic.c @@ -286,11 +286,12 @@ get_cdtext_generic (void *p_user_data) if (NULL == p_env->cdtext) { p_cdtext_data = read_cdtext_generic (p_env); + if (NULL != p_cdtext_data) { + len = CDIO_MMC_GET_LEN16(p_cdtext_data)-2; p_env->cdtext = cdtext_init(); - len = CDIO_MMC_GET_LEN16(p_cdtext_data); - if(0 != cdtext_data_init (p_env->cdtext, &p_cdtext_data[4], len-2)) { + if(len <= 0 || 0 != cdtext_data_init (p_env->cdtext, &p_cdtext_data[4], len)) { p_env->b_cdtext_error = true; cdtext_destroy (p_env->cdtext); free(p_env->cdtext); diff --git a/lib/driver/cdtext.c b/lib/driver/cdtext.c index 4daf93d0..74c54061 100644 --- a/lib/driver/cdtext.c +++ b/lib/driver/cdtext.c @@ -512,7 +512,7 @@ cdtext_data_init(cdtext_t *p_cdtext, uint8_t *wdata, size_t i_data) p_data = wdata; if (i_data < CDTEXT_LEN_PACK || 0 != i_data % CDTEXT_LEN_PACK) { - cdio_warn("CD-Text size is not multiple of pack size"); + cdio_warn("CD-Text size is too small or not a multiple of pack size"); return -1; } diff --git a/test/cdda.right b/test/cdda.right index 31505f9f..b7f19d62 100644 --- a/test/cdda.right +++ b/test/cdda.right @@ -16,3 +16,5 @@ CD-TEXT for Disc: TITLE: Join us now we have the software PERFORMER: Richard Stallman CD-TEXT for Track 1: + TITLE: Soft + PERFORMER: Richard S diff --git a/test/check_common_fn.in b/test/check_common_fn.in index c872e11e..f1aa9e6d 100755 --- a/test/check_common_fn.in +++ b/test/check_common_fn.in @@ -23,7 +23,7 @@ TZ=CUT # both 'en_US' and 'en_US.utf8' might be defined on some platforms if locale -a >/dev/null 2>&1 ; then # Note: Solaris 10's shell can't handle $(..) so we use `...` - LC_TIME=`locale -a | grep 'en_US' | grep -v 'utf8' &2>/dev/null` + LC_TIME=`locale -a | grep 'en_US' | grep -v 'utf8' | grep -v 'iso88591' &2>/dev/null` fi [ -z "$LC_TIME" ] && { LC_TIME=${LC_TIME:-en_US} diff --git a/test/check_cue.sh.in b/test/check_cue.sh.in index f771436f..81228055 100644 --- a/test/check_cue.sh.in +++ b/test/check_cue.sh.in @@ -25,21 +25,20 @@ BASE=`basename $0 .sh` fname=cdda testnum=CD-DA -opts="--quiet --no-device-info --cue-file ${abs_top_srcdir}/test/data/${fname}.cue --no-cddb" -test_cdinfo "$opts" ${fname}.dump ${abs_top_srcdir}/test/${fname}.right -RC=$? -check_result $RC "cd-info CUE test $testnum" "${CD_INFO} $opts" - - -opts="--quiet --no-device-info --bin-file ${abs_top_srcdir}/test/data/${fname}.bin --no-cddb" -test_cdinfo "$opts" ${fname}.dump ${abs_top_srcdir}/test/${fname}.right -RC=$? -check_result $RC "cd-info BIN test $testnum" "${CD_INFO} $opts" - -opts="--quiet --no-device-info --toc-file ${abs_top_srcdir}/test/data/${fname}.toc --no-cddb" -test_cdinfo "$opts" ${fname}.dump ${abs_top_srcdir}/test/${fname}.right -RC=$? -check_result $RC "cd-info TOC test $testnum" "${CD_INFO} $opts" +if test -f ${abs_top_srcdir}/test/data/${fname}.bin ; then + opts="--quiet --no-device-info --cue-file ${abs_top_srcdir}/test/data/${fname}.cue --no-cddb" + test_cdinfo "$opts" ${fname}.dump ${abs_top_srcdir}/test/${fname}.right + RC=$? + check_result $RC "cd-info CUE test $testnum" "${CD_INFO} $opts" + + opts="--quiet --no-device-info --bin-file ${abs_top_srcdir}/test/data/${fname}.bin --no-cddb" + test_cdinfo "$opts" ${fname}.dump ${abs_top_srcdir}/test/${fname}.right + RC=$? + check_result $RC "cd-info BIN test $testnum" "${CD_INFO} $opts" +else + echo "-- Don't see BIN file ${abs_top_srcdir}/test/data/${fname}.bin. Test $testnum skipped." +fi + fname=cdtext testnum="CD-Text binary parser" @@ -53,66 +52,55 @@ if test -f ${abs_top_srcdir}/test/data/${fname}.bin ; then echo "-- Don't see CD-Text file ${abs_top_srcdir}/test/data/${fname}.cdt. Test $testnum skipped." fi else - echo "-- Don't see binary file ${abs_top_srcdir}/test/data/${fname}.bin. Test $testnum skipped." + echo "-- Don't see BIN file ${abs_top_srcdir}/test/data/${fname}.bin. Test $testnum skipped." fi + fname=isofs-m1 -testnum='ISO 9660 mode1 CUE' if test -f ${abs_top_srcdir}/test/data/${fname}.bin ; then - if test -n "@HAVE_ROCK@"; then + testnum='ISO 9660 mode1 CUE' + if test -n "@HAVE_ROCK@"; then opts="-q --no-device-info --no-disc-mode --cue-file ${abs_top_srcdir}/test/data/${fname}.cue --iso9660" test_cdinfo "$opts" ${fname}.dump ${abs_top_srcdir}/test/${fname}.right RC=$? check_result $RC "cd-info Rock-Ridge CUE test $testnum" "${CD_INFO} $opts" - + else opts="-q --no-device-info --no-disc-mode --no-rock-ridge --cue-file ${abs_top_srcdir}/test/data/${fname}.cue --iso9660" test_cdinfo "$opts" ${fname}.dump ${abs_top_srcdir}/test/${fname}-no-rr.right RC=$? check_result $RC "cd-info no Rock-Ridge CUE test $testnum" "${CD_INFO} $opts" fi -else - echo "-- Don't see binary file ${abs_top_srcdir}/test/data/${fname}.bin. Test $testnum skipped." -fi - -if test -n "@HAVE_ROCK@"; then testnum='ISO 9660 mode1 TOC' - if test -f ${abs_top_srcdir}/test/data/${fname}.bin ; then + if test -n "@HAVE_ROCK@"; then opts="-q --no-device-info --no-disc-mode --toc-file ${abs_top_srcdir}/test/data/${fname}.toc --iso9660" test_cdinfo "$opts" ${fname}.dump ${abs_top_srcdir}/test/${fname}.right RC=$? check_result $RC "cd-info TOC test $testnum" "${CD_INFO} $opts" - else - echo "-- Don't see TOC file ${abs_top_srcdir}/test/data/${fname}.bin. Test $testnum skipped." fi +else + echo "-- Don't see BIN file ${abs_top_srcdir}/test/data/${fname}.bin. Test $testnum skipped." fi + fname=vcd_demo -if test -z "@VCDINFO_LIBS@" ; then - right=${abs_top_srcdir}/test/${fname}.right -else - right=${abs_top_srcdir}/test/${fname}_vcdinfo.right -fi testnum='Video CD' if test -f ${abs_top_srcdir}/test/data/${fname}.bin ; then - opts="-q --no-device-info --no-disc-mode -c ${abs_top_srcdir}/test/data/${fname}.cue --iso9660" - test_cdinfo "$opts" ${fname}.dump $right - RC=$? - check_result $RC "cd-info CUE test $testnum" "${CD_INFO} $opts" - if test -z "@VCDINFO_LIBS@" ; then right=${abs_top_srcdir}/test/${fname}.right else right=${abs_top_srcdir}/test/${fname}_vcdinfo.right fi + + opts="-q --no-device-info --no-disc-mode -c ${abs_top_srcdir}/test/data/${fname}.cue --iso9660" + test_cdinfo "$opts" ${fname}.dump $right + RC=$? + check_result $RC "cd-info CUE test $testnum" "${CD_INFO} $opts" + opts="-q --no-device-info --no-disc-mode -t ${abs_top_srcdir}/test/data/${fname}.toc --iso9660" - if test -f ${abs_top_srcdir}/test/${fname}.toc ; then - test_cdinfo "$opts" ${fname}.dump $right - RC=$? - check_result $RC "cd-info TOC test $testnum" "${CD_INFO} $opts" - else - echo "-- Don't see TOC file ${abs_top_srcdir}/test/data/${fname}.toc. Test $testnum skipped." - fi + test_cdinfo "$opts" ${fname}.dump $right + RC=$? + check_result $RC "cd-info TOC test $testnum" "${CD_INFO} $opts" else echo "-- Don't see BIN file ${abs_top_srcdir}/test/data/${fname}.bin. Test $testnum skipped." fi @@ -125,7 +113,7 @@ if test -f ${abs_top_srcdir}/test/data/${fname}.bin ; then RC=$? check_result $RC "cd-info CUE test $testnum" "${CD_INFO} $opts" else - echo "-- Don't see CUE file ${abs_top_srcdir}/test/data/${fname}.bin. Test $testnum skipped." + echo "-- Don't see BIN file ${abs_top_srcdir}/test/data/${fname}.bin. Test $testnum skipped." fi exit $RC diff --git a/test/data/Makefile.am b/test/data/Makefile.am index 9955e9c6..f31b38e4 100644 --- a/test/data/Makefile.am +++ b/test/data/Makefile.am @@ -16,7 +16,6 @@ check_DATA = \ bad-msf-3.toc \ cdda.bin \ cdda.cue \ - cdda.toc \ cdtext.bin \ cdtext.cdt \ cdtext.cue \ @@ -31,7 +30,7 @@ check_DATA = \ joliet.iso \ p1.bin \ p1.cue \ - p1.nrg \ + p1.nrg \ t1.toc \ t2.toc \ t3.toc \ @@ -44,10 +43,10 @@ check_DATA = \ t10.toc \ vcd2.toc \ videocd.nrg \ - cdtext.toc \ - data5.toc \ - data6.toc \ - data7.toc \ - test-udf1.iso + cdtext.toc \ + data5.toc \ + data6.toc \ + data7.toc \ + test-udf1.iso EXTRA_DIST = $(check_DATA) diff --git a/test/data/cdda.cue b/test/data/cdda.cue index 4ed1bd82..6cb365d0 100644 --- a/test/data/cdda.cue +++ b/test/data/cdda.cue @@ -3,5 +3,7 @@ CATALOG 0000010271955 PERFORMER "Richard Stallman"
FILE "CDDA.BIN" BINARY
TRACK 01 AUDIO
+ TITLE "Soft"
+ PERFORMER "Richard S"
FLAGS DCP
INDEX 01 00:00:00
diff --git a/test/data/cdda.toc b/test/data/cdda.toc deleted file mode 100644 index 44046d71..00000000 --- a/test/data/cdda.toc +++ /dev/null @@ -1,14 +0,0 @@ -// $Id: cdda.toc,v 1.4 2004/12/31 07:51:43 rocky Exp $ - -// Language number should always start with 0 -LANGUAGE 0 { - // Required fields - at least all CD-TEXT CDs I've seen so far have them. - TITLE "Join us now we have the software" - PERFORMER "Richard Stallman" -} -CATALOG "0000010271955" -CD_DA - -TRACK AUDIO -COPY -FILE "cdda.bin" 00:00:00 00:00:00 diff --git a/test/driver/cdrdao.c.in b/test/driver/cdrdao.c.in index 885b4821..d45fd05b 100644 --- a/test/driver/cdrdao.c.in +++ b/test/driver/cdrdao.c.in @@ -129,6 +129,7 @@ main(int argc, const char *argv[]) } } + /* { CdIo_t *p_cdio; snprintf(psz_tocfile, sizeof(psz_tocfile)-1, @@ -146,6 +147,7 @@ main(int argc, const char *argv[]) check_get_arg_source(p_cdio, psz_tocfile); cdio_destroy(p_cdio); } + */ } diff --git a/test/isofs-m1-no-rr.right b/test/isofs-m1-no-rr.right index 5d8b5d95..7ff67492 100644 --- a/test/isofs-m1-no-rr.right +++ b/test/isofs-m1-no-rr.right @@ -4,7 +4,7 @@ CD-ROM Track List (1 - 1) #: MSF LSN Type Green? Copy? 1: 00:02:00 000000 data false no 170: 00:06:02 000302 leadout (693 KB raw, 604 KB formatted) -Media Catalog Number (MCN): not available +Media Catalog Number (MCN): 0000012101954 Last CD Session LSN: not supported by drive/driver __________________________________ CD Analysis Report @@ -23,7 +23,7 @@ ISO9660 filesystem - [LSN 26] 17992 Jul 29 2002 12:39:53 copying d [LSN 24] 2048 Apr 20 2003 16:18:53 doc -/doc/: +/DOC/: d [LSN 24] 2048 Apr 20 2003 16:18:53 . d [LSN 23] 2048 Apr 20 2003 11:26:46 .. - [LSN 35] 648 Apr 20 2003 16:18:53 readme.txt |