[LTP] [PATCH v1] isofs.sh:Use genisoimage/xorrisofs instead of mkisofs

Subramanya Swamy subramanya.swamy.linux@gmail.com
Mon Jan 15 16:59:36 CET 2024


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(-)

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" \
-- 
2.39.3



More information about the ltp mailing list