Message ID | 20240115155936.3235-1-subramanya.swamy.linux@gmail.com |
---|---|
State | Superseded |
Headers | show |
Series | [v1] isofs.sh:Use genisoimage/xorrisofs instead of mkisofs | expand |
Hi Subramanya, > Debain uses genisoimage/xorrisofs and Centos uses xorrisofs > both genisoimage & xorrisofs have symlinks to mkisofs > xorrisofs doesn't support -hfs option & supports only -hfsplus option > genisoimage supports both -hfs & -hfsplus options Well, there are 3 tools (although not all in all distros): * Debian for i in mkisofs genisoimage xorriso; do echo "=== $i ==="; $i; echo; done === mkisofs === genisoimage: Missing pathspec. Usage: genisoimage [options] -o file directory ... Use genisoimage -help to get a list of valid options. Report problems to debburn-devel@lists.alioth.debian.org. === genisoimage === genisoimage: Missing pathspec. Usage: genisoimage [options] -o file directory ... Use genisoimage -help to get a list of valid options. Report problems to debburn-devel@lists.alioth.debian.org. === xorriso === xorriso 1.5.2 : RockRidge filesystem manipulator, libburnia project. usage : xorriso [commands] More is told by command -help => Debian has genisoimage and xorriso * openSUSE Tumbleweed $ for i in mkisofs genisoimage xorriso; do echo "=== $i ==="; $i; echo; done === mkisofs === mkisofs: Missing pathspec. Usage: mkisofs [options] [-find] file... [find expression] Use mkisofs -help to get a list all of valid options. Use mkisofs -find -help to get a list of all valid -find options. Most important Options: -posix-H Follow sylinks encountered on command line -posix-L Follow all symlinks -posix-P Do not follow symlinks (default) -o FILE, -output FILE Set output file name -R, -rock Generate Rock Ridge directory information -r, -rational-rock Generate rationalized Rock Ridge directory info -J, -joliet Generate Joliet directory information -print-size Print estimated filesystem size and exit -UDF Generate UDF file system -dvd-audio Generate DVD-Audio compliant UDF file system -dvd-video Generate DVD-Video compliant UDF file system -dvd-hybrid Generate a hybrid (DVD-Audio/DVD-Video) compliant UDF file system -iso-level LEVEL Set ISO9660 level (1..3) or 4 for ISO9660 v 2 -V ID, -volid ID Set Volume ID -graft-points Allow to use graft points for filenames -M FILE, -prev-session FILE Set path to previous session to merge === genisoimage === genisoimage: command not found === xorriso === xorriso 1.5.6 : RockRidge filesystem manipulator, libburnia project. usage : xorriso [commands] More is told by command -help => openSUSE Tumbleweed has mkisofs and xorriso (genisoimage is not officially supported) How about to run test 3x - for mkisofs, genisoimage and xorriso. There would be TCONF when file does not exist. And also detection if the binary is the expected one? Something like this: TST_TESTFUNC=do_test TST_CNT=3 do_test() { case $1 in 1) MKISOFS_CMD="mkisofs";; 2) MKISOFS_CMD="genisoimage" HFSOPT="-hfsplus -D -hfs -D";; 3) MKISOFS_CMD="xorriso" HFSOPT="-hfsplus -D";; esac if ! tst_cmd_available $MKISOFS_CMD; then tst_res TCONF "Missing '$MKISOFS_CMD'" return fi if ! $CMD 2>&1 | grep -q "$MKISOFS_CMD"; then tst_res TCONF "'$MKISOFS_CMD' is a symlink to another tool" return fi ... (rest of original do_test + $HFSOPT use) } Does it make sense to you? Kind regards, Petr
Hi Petr, Thank you for reviewing the patch. On 16/01/24 21:58, Petr Vorel wrote: > Hi Subramanya, > >> Debain uses genisoimage/xorrisofs and Centos uses xorrisofs >> both genisoimage & xorrisofs have symlinks to mkisofs >> xorrisofs doesn't support -hfs option & supports only -hfsplus option >> genisoimage supports both -hfs & -hfsplus options > Well, there are 3 tools (although not all in all distros): > > * Debian > for i in mkisofs genisoimage xorriso; do echo "=== $i ==="; $i; echo; done > === mkisofs === > genisoimage: Missing pathspec. > Usage: genisoimage [options] -o file directory ... > > Use genisoimage -help > to get a list of valid options. > > Report problems todebburn-devel@lists.alioth.debian.org. > > === genisoimage === > genisoimage: Missing pathspec. > Usage: genisoimage [options] -o file directory ... > > Use genisoimage -help > to get a list of valid options. > > Report problems todebburn-devel@lists.alioth.debian.org. > > === xorriso === > xorriso 1.5.2 : RockRidge filesystem manipulator, libburnia project. > > usage : xorriso [commands] > More is told by command -help > => Debian has genisoimage and xorriso > > * openSUSE Tumbleweed > > $ for i in mkisofs genisoimage xorriso; do echo "=== $i ==="; $i; echo; done > === mkisofs === > mkisofs: Missing pathspec. > Usage: mkisofs [options] [-find] file... [find expression] > > Use mkisofs -help > to get a list all of valid options. > > Use mkisofs -find -help > to get a list of all valid -find options. > > Most important Options: > -posix-H Follow sylinks encountered on command line > -posix-L Follow all symlinks > -posix-P Do not follow symlinks (default) > -o FILE, -output FILE Set output file name > -R, -rock Generate Rock Ridge directory information > -r, -rational-rock Generate rationalized Rock Ridge directory info > -J, -joliet Generate Joliet directory information > -print-size Print estimated filesystem size and exit > -UDF Generate UDF file system > -dvd-audio Generate DVD-Audio compliant UDF file system > -dvd-video Generate DVD-Video compliant UDF file system > -dvd-hybrid Generate a hybrid (DVD-Audio/DVD-Video) compliant UDF file system > -iso-level LEVEL Set ISO9660 level (1..3) or 4 for ISO9660 v 2 > -V ID, -volid ID Set Volume ID > -graft-points Allow to use graft points for filenames > -M FILE, -prev-session FILE Set path to previous session to merge > > === genisoimage === > genisoimage: command not found > > === xorriso === > xorriso 1.5.6 : RockRidge filesystem manipulator, libburnia project. > > usage : xorriso [commands] > More is told by command -help > > => openSUSE Tumbleweed has mkisofs and xorriso (genisoimage is not officially > supported) > > How about to run test 3x - for mkisofs, genisoimage and xorriso. There would be > TCONF when file does not exist. And also detection if the binary is the expected > one? Something like this: > > TST_TESTFUNC=do_test > TST_CNT=3 > > do_test() > { > case $1 in > 1) MKISOFS_CMD="mkisofs";; > 2) MKISOFS_CMD="genisoimage" > HFSOPT="-hfsplus -D -hfs -D";; > 3) MKISOFS_CMD="xorriso" > HFSOPT="-hfsplus -D";; > esac > > if ! tst_cmd_available $MKISOFS_CMD; then > tst_res TCONF "Missing '$MKISOFS_CMD'" > return > fi > > if ! $CMD 2>&1 | grep -q "$MKISOFS_CMD"; then > tst_res TCONF "'$MKISOFS_CMD' is a symlink to another tool" > return > fi > > > > > > > > ... (rest of original do_test + $HFSOPT use) > } > > Does it make sense to you? Yes you're right this covers distro's which supports all 3 tools & skips on symlinks for mkisofs in case of xorriso & genisoimage , will create v2 with changes Just a thought , is it good to have theses lines in contribution guideline ? pkgs required by tests should be tested on openSUSE,debian,centos etc. Since i believe LTP is supported on all widely used distros > Kind regards, > Petr
> Hi Petr, > Thank you for reviewing the patch. > On 16/01/24 21:58, Petr Vorel wrote: > > Hi Subramanya, > > > Debain uses genisoimage/xorrisofs and Centos uses xorrisofs > > > both genisoimage & xorrisofs have symlinks to mkisofs > > > xorrisofs doesn't support -hfs option & supports only -hfsplus option > > > genisoimage supports both -hfs & -hfsplus options > > Well, there are 3 tools (although not all in all distros): > > * Debian > > for i in mkisofs genisoimage xorriso; do echo "=== $i ==="; $i; echo; done > > === mkisofs === > > genisoimage: Missing pathspec. > > Usage: genisoimage [options] -o file directory ... > > Use genisoimage -help > > to get a list of valid options. > > Report problems todebburn-devel@lists.alioth.debian.org. > > === genisoimage === > > genisoimage: Missing pathspec. > > Usage: genisoimage [options] -o file directory ... > > Use genisoimage -help > > to get a list of valid options. > > Report problems todebburn-devel@lists.alioth.debian.org. > > === xorriso === > > xorriso 1.5.2 : RockRidge filesystem manipulator, libburnia project. > > usage : xorriso [commands] > > More is told by command -help > > => Debian has genisoimage and xorriso > > * openSUSE Tumbleweed > > $ for i in mkisofs genisoimage xorriso; do echo "=== $i ==="; $i; echo; done > > === mkisofs === > > mkisofs: Missing pathspec. > > Usage: mkisofs [options] [-find] file... [find expression] > > Use mkisofs -help > > to get a list all of valid options. > > Use mkisofs -find -help > > to get a list of all valid -find options. > > Most important Options: > > -posix-H Follow sylinks encountered on command line > > -posix-L Follow all symlinks > > -posix-P Do not follow symlinks (default) > > -o FILE, -output FILE Set output file name > > -R, -rock Generate Rock Ridge directory information > > -r, -rational-rock Generate rationalized Rock Ridge directory info > > -J, -joliet Generate Joliet directory information > > -print-size Print estimated filesystem size and exit > > -UDF Generate UDF file system > > -dvd-audio Generate DVD-Audio compliant UDF file system > > -dvd-video Generate DVD-Video compliant UDF file system > > -dvd-hybrid Generate a hybrid (DVD-Audio/DVD-Video) compliant UDF file system > > -iso-level LEVEL Set ISO9660 level (1..3) or 4 for ISO9660 v 2 > > -V ID, -volid ID Set Volume ID > > -graft-points Allow to use graft points for filenames > > -M FILE, -prev-session FILE Set path to previous session to merge > > === genisoimage === > > genisoimage: command not found > > === xorriso === > > xorriso 1.5.6 : RockRidge filesystem manipulator, libburnia project. > > usage : xorriso [commands] > > More is told by command -help > > => openSUSE Tumbleweed has mkisofs and xorriso (genisoimage is not officially > > supported) > > How about to run test 3x - for mkisofs, genisoimage and xorriso. There would be > > TCONF when file does not exist. And also detection if the binary is the expected > > one? Something like this: > > TST_TESTFUNC=do_test > > TST_CNT=3 > > do_test() > > { > > case $1 in > > 1) MKISOFS_CMD="mkisofs";; > > 2) MKISOFS_CMD="genisoimage" > > HFSOPT="-hfsplus -D -hfs -D";; > > 3) MKISOFS_CMD="xorriso" > > HFSOPT="-hfsplus -D";; > > esac > > if ! tst_cmd_available $MKISOFS_CMD; then > > tst_res TCONF "Missing '$MKISOFS_CMD'" > > return > > fi > > if ! $CMD 2>&1 | grep -q "$MKISOFS_CMD"; then > > tst_res TCONF "'$MKISOFS_CMD' is a symlink to another tool" > > return > > fi > > ... (rest of original do_test + $HFSOPT use) > > } > > Does it make sense to you? > Yes you're right this covers distro's which supports all 3 tools & skips on > symlinks for mkisofs in case of xorriso & genisoimage , will create v2 with > changes If you're quick enough - e.g. tomorrow (there is already a git freeze [1]) we might include that in this release (release is next week). If not, it will be merged after the release. [1] ps://lore.kernel.org/ltp/Zak5QdHCUyUmJ5x4@yuki/ > Just a thought , is it good to have theses lines in contribution guideline ? > pkgs required by tests should be tested on openSUSE,debian,centos etc. Well, we cannot expect patch authors to send on more distros. But maybe some suggestion "testing patch on more kernel versions or on more linux distributions is recommended." We also appreciate, if users do testing during git freeze (to find problems before upcoming release). Kind regards, Petr > Since i believe LTP is supported on all widely used distros > > Kind regards, > > Petr
diff --git a/testcases/kernel/fs/iso9660/isofs.sh b/testcases/kernel/fs/iso9660/isofs.sh index dfa4ac73d..392e1a764 100755 --- a/testcases/kernel/fs/iso9660/isofs.sh +++ b/testcases/kernel/fs/iso9660/isofs.sh @@ -19,12 +19,14 @@ MAX_DIRS=4 setup() { - if tst_cmd_available mkisofs; then - MKISOFS_CMD="mkisofs" + if tst_cmd_available xorrisofs; then + MKISOFS_CMD="xorrisofs" + HFSOPT="-hfsplus -D" elif tst_cmd_available genisoimage; then MKISOFS_CMD="genisoimage" + HFSOPT="-hfsplus -D -hfs -D" else - tst_brk TCONF "please install mkisofs or genisoimage" + tst_brk TCONF "please install xorrisofs or genisoimage" fi } @@ -62,7 +64,7 @@ do_test() for mkisofs_opt in \ " " \ "-J" \ - "-hfs -D" \ + $HFSOPT \ " -R " \ "-R -J" \ "-f -l -D -J -allow-leading-dots -R" \
Debain uses genisoimage/xorrisofs and Centos uses xorrisofs both genisoimage & xorrisofs have symlinks to mkisofs xorrisofs doesn't support -hfs option & supports only -hfsplus option genisoimage supports both -hfs & -hfsplus options Signed-off-by: Subramanya Swamy <subramanya.swamy.linux@gmail.com> --- testcases/kernel/fs/iso9660/isofs.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)