The ISO filesystem image iso9660_early_ce.iso exposes the unusual situation that the Rock Ridge name entry of its only file is located after a CE entry which points to the next continuation area.
The correct behavior is to read the Rock Ridge name and to only then load the next continuation area. If GRUB performs this correctly, then the name "RockRidgeName:x" will be read and reported by grub-fstest. If GRUB wrongly performs the CE hop immediatly when encountering the CE entry, then the dull ISO 9660 name "rockridg" will not be overridden and be put out by grub-fstest. Signed-off-by: Thomas Schmitt <scdbac...@gmx.net> --- tests/iso9660_early_ce.iso.gz | Bin 0 -> 709 bytes tests/iso9660_test.in | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 tests/iso9660_early_ce.iso.gz diff --git a/tests/iso9660_early_ce.iso.gz b/tests/iso9660_early_ce.iso.gz new file mode 100644 index 0000000000000000000000000000000000000000..df4ef5fb276944c41a8e355b96423ce7e935d585 GIT binary patch literal 709 zcmb2|=3wyXVNPLSetW~$U)WLNz(+~1E!S8$9vm%@xUx8Jo9<Ir|I<dTowx6veKYNV zXRkmqPt`@1!<|QtynitB{KMxDo%YO@xbwD**<%a)1gW3@FQvtOpE)z{^31gY45R^v zU)t-Ur#tZ`Ogd4rC-m>`Z$|g_8lRLub~f&3bja#OVIfzS`OkVU;;7brX~~Lbo}q6- z-PF_Gbx-{C%W?C+`?)UH(#oF&-p#bsy;>mcdpy^o*LC^5BJn#v+qDc%NB%Cl-sU=g z)3Uj9wC0=eSKI#I@rSu=_PdzceH(A&>|AFN{_x+UnpTm+ajb2xjq0{FdKccg|DTcJ zz}JtN4~)x%?oWx|-&ygv(dN@9y?cTGcNDz4GGW{MQyc$%O&5+oe`4jL%ON*^yU(<d zH({^bcyNEm%|)l*cueejb29qsD<AuwJ-N#NSDI?CJ~z3_?$W`!dz<P5`br{BPCk`5 zQ%qS@ag*Y)yPOyG=f<V&+_N!G!cwek+0qT~<MwS_zdbIuUB7Ib{CmEA_6!VvcyGy_ zjQSNBmHjCF>(ZsWrmxGKn%|*yUvR5Y;;Oa#pS4EXZ3~q888{*R+Sx9@kW0OfPb^y{ z8!77Ec{3naIAdy#+RAq;T*~(tnAQog-}2t_X|ciAKOt*p90@Nhw=_68Yun!L$q~Po z<<{t%2CkU2BD?nO3Y{jqtA^4>+}F)2&CaMLTFtu~@;dOs+l;Bc$IpvRbaOpWq$8ZR z)K7oSV^-mtX)%(uzvFt+mUkuVTb$#wFxQHfFDtX_dY`xV;+*WW`Z{{C{d2^7ybFV5 xzJ&`i6tt$izd8FqFqn7vRayU6VJ9ZN=p}78dn3uf(6IWO@akK61q=d=3;-EpKr#RT literal 0 HcmV?d00001 diff --git a/tests/iso9660_test.in b/tests/iso9660_test.in index 44bc08c6d..d7022e061 100644 --- a/tests/iso9660_test.in +++ b/tests/iso9660_test.in @@ -28,3 +28,27 @@ for fs in iso9660_ce_loop iso9660_ce_loop2; do fi done echo "PASS" + +echo "Testing for proper handling of early CE ... " +fs=iso9660_early_ce +tempdir=`mktemp -d "${TMPDIR:-/tmp}/${0##*/}.$(date '+%Y%m%d%H%M%S%N').${fs}.XXX"` || + { echo "Failed to make temporary directory"; exit 99; } +gunzip <"$srcdir"/tests/${fs}.iso.gz >"${tempdir}/${fs}.iso" || exit 99 +ret=0 +output=$(LC_ALL=C timeout -s KILL "60" \ + "@builddir@/grub-fstest" "${tempdir}/${fs}.iso" ls / ) || ret=$? +rm -rf "$tempdir" +if [ "${ret:-0}" -ne 0 ]; then + echo "... grub-fstest returns $ret" + echo "FAIL ($fs)" + exit 1 +fi +# Before comparing: remove trailing blank added by grub-fstest +output=$(echo -n $output) +if [ x"$output" != x"RockRidgeName:x" ]; then + echo "... found: '$output' , expected: 'RockRidgeName:x'" + echo "FAIL ($fs)" + exit 1 +fi +echo "PASS" + -- 2.30.2 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel