--- test/Makefile.am | 10 +++---- test/check_eltorito.sh | 57 ++++++++++++++++++++++++++++++++++++++++ test/data/eltorito.iso | Bin 0 -> 55296 bytes test/data/eltorito_file | Bin 0 -> 512 bytes test/eltorito.right | 12 +++++++++ test/no_eltorito.right | 8 ++++++ 6 files changed, 82 insertions(+), 5 deletions(-) create mode 100755 test/check_eltorito.sh create mode 100644 test/data/eltorito.iso create mode 100644 test/data/eltorito_file create mode 100644 test/eltorito.right create mode 100644 test/no_eltorito.right
diff --git a/test/Makefile.am b/test/Makefile.am index d1385ad8..d90ade93 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -50,9 +50,9 @@ test_lib_driver_util_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) testpregap_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) check_SCRIPTS = check_nrg.sh check_cue.sh check_cd_read.sh check_udf.sh \ - check_iso.sh check_bad_iso.sh check_multiextent.sh \ - check_fuzzyiso.sh check_opts.sh check_deep_directory.sh \ - check_iso_read.sh check_cdtext.sh + check_iso.sh check_bad_iso.sh check_eltorito.sh \ + check_multiextent.sh check_fuzzyiso.sh check_opts.sh \ + check_deep_directory.sh check_iso_read.sh check_cdtext.sh check_udf.sh: @abs_top_builddir@/example/extract$(EXEEXT) @@ -62,12 +62,12 @@ check_udf.sh: @abs_top_builddir@/example/extract$(EXEEXT) check_PROGRAMS = $(hack) check_DATA = vcd_demo.right vcd_demo_vcdinfo.right \ - videocd.right multiextent.right \ + videocd.right eltorito.right no_eltorito.right \ cdda.right cdda_4_5.right deep_directory.right \ isofs-m1.right isofs-m1-no-rr.right isofs-m1-test2.right \ check_opts0.right check_opts1.right check_opts2.right \ check_opts3.right check_opts4.right check_opts5.right \ - check_opts6.right check_opts7.right \ + check_opts6.right check_opts7.right multiextent.right \ isofs-m1-read.right cdda-read.right \ copying.right copying-rr.right \ joliet.right joliet-nojoliet.right \ diff --git a/test/check_eltorito.sh b/test/check_eltorito.sh new file mode 100755 index 00000000..9fe8dafc --- /dev/null +++ b/test/check_eltorito.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# Copyright (C) 2024 Pete Batard <p...@akeo.ie> +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +# Tests El Torito (via iso-info and iso-read). + +if test -z "$srcdir" ; then + srcdir=`pwd` +fi + +if test "X$top_builddir" = "X" ; then + top_builddir=`pwd`/.. +fi + +. ${top_builddir}/test/check_common_fn + +if test ! -x ../src/iso-info ; then + exit 77 +fi + +if test ! -x ../src/iso-read ; then + exit 77 +fi + +BASE=`basename $0 .sh` + +# File listing with and without El Torito enabled +iso_image="${srcdir}/data/eltorito.iso" +opts="--no-header --quiet -l ${iso_image}" +test_iso_info "$opts" eltorito.dump ${srcdir}/eltorito.right +RC=$? +check_result $RC "$aspect"' eltorito listing test' "$ISO_INFO $opts" + +opts="--no-header --no-el-torito --quiet -l ${iso_image}" +test_iso_info "$opts" eltorito.dump ${srcdir}/no_eltorito.right +RC=$? +check_result $RC "$aspect"' eltorito listing test' "$ISO_INFO $opts" + +# File dump and comparison +opts="--ignore --image ${iso_image} --extract [BOOT]/0-Boot-NoEmul.img" +test_iso_read "$opts" eltorito ${srcdir}/data/eltorito_file +RC=$? +check_result $RC "$aspect"' eltorito read test' "$ISO_READ $opts" + +exit $RC diff --git a/test/data/eltorito.iso b/test/data/eltorito.iso new file mode 100644 index 0000000000000000000000000000000000000000..eefef7214945fb889761ee933a01cf91f0fffc5d GIT binary patch literal 55296 zcmeI)(Q4CB7y#fCVOR^^4Q=O5@M?k^Cz-pDU1^+97-qQk0X7{t7!I^If)C)c^d)E0 zqzEgxf$LJocc3|^r+;$(eisdC`ZolP009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs z0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZ zfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&U zAV7cs0RjXF5J-x5F=k0f|FO*_pVfn=o6j!xNeD^x2%S#o)-QM0|AalMhR;K<p6P{7 zHRyz&$<xREN8v%WW3_*(wJLD<qxgJ&c9L!uFVZ|_yIXn8V_JOqcJ@6zI6goA`ss8$ zK5aF{+gyD5?q0<#-^q6J-S|4jurLv?w8e-d+-63O_5TUfpJ}!PRzaXX|L-59!}8-` zSf)pZ`^Dh>pm;MJlpk)KVE@LE0tpZxK!5;&)&(w`>;KjhkpKY#1PBlyK!5-N0t5&U zAh0xnWOk2zdN*AoK!5-N0t5&UAV7cs0RjZ>t-$QczgPX7UL!z&009C72oNAZfB*pk z1n#TA^)>d_MkJeIqvqLItNXR4PJjBWs?&e?wk(I+d)dp-lnM5))blrS-C5kU@^CM! zk7G-K009C72rNb5Z(saRMx)8E*{aF>48N2d9Fzb70t5&UxLbjfi;Hpd|9f}4u+>&T SU^H2QB&0xq009Cm2>b@8_{2s4 literal 0 HcmV?d00001 diff --git a/test/data/eltorito_file b/test/data/eltorito_file new file mode 100644 index 0000000000000000000000000000000000000000..aed54b1d6cd26a2dca540a8341ddd3f9bab0d4c9 GIT binary patch literal 512 UcmYew&oAL(7zHCU1VUE<0DQ0lz5oCK literal 0 HcmV?d00001 diff --git a/test/eltorito.right b/test/eltorito.right new file mode 100644 index 00000000..bd1f3e0d --- /dev/null +++ b/test/eltorito.right @@ -0,0 +1,12 @@ +__________________________________ +ISO-9660 Information +/: + d [LSN 17] 0 Jan 23 2024 13:25:09 [boot] + d [LSN 24] 2048 Jan 23 2024 13:25:09 . + d [LSN 24] 2048 Jan 23 2024 13:25:09 .. + - [LSN 26] 5 Jan 23 2024 13:25:09 boot + - [LSN 25] 2048 Jan 23 2024 13:25:09 boot.cat + +/[boot]/: + - [LSN 26] 512 Jan 23 2024 13:25:09 0-boot-noemul.img + diff --git a/test/no_eltorito.right b/test/no_eltorito.right new file mode 100644 index 00000000..cacf5404 --- /dev/null +++ b/test/no_eltorito.right @@ -0,0 +1,8 @@ +__________________________________ +ISO-9660 Information +/: + d [LSN 24] 2048 Jan 23 2024 13:25:09 . + d [LSN 24] 2048 Jan 23 2024 13:25:09 .. + - [LSN 26] 5 Jan 23 2024 13:25:09 boot + - [LSN 25] 2048 Jan 23 2024 13:25:09 boot.cat + -- 2.43.0.windows.1