tiff: add ptest support
PATCH 1/1 tiff: add ptest support
From: Shilong Jiao <[email protected]>
Add ptest support for libtiff to enable automated testing of the library's functionality.
Tests for tiffcrop are skipped as this tool has known security vulnerabilities (CVE-2024-13978, CVE-2025-8176, etc.) and is disabled by default since version 4.6.0. JBIG tests are skipped as JBIG support is optional and not commonly enabled.
Test results on qemux86-64:
START: ptest-runner
BEGIN: /usr/lib/tiff/ptest
PASS: fax2tiff
PASS: ppm2tiff_pbm
PASS: ppm2tiff_pgm
PASS: ppm2tiff_ppm
PASS: testdeflatelaststripextradata
PASS: testfax3_bug54_1dnoEOL
PASS: testfax3_bug_513
PASS: testfax4
PASS: tiff2bw-palette-1c-8b
PASS: tiff2bw-quad-lzw-compat
PASS: tiff2bw-rgb-3c-8b
PASS: tiff2pdf
PASS: tiff2ps-EPS1
PASS: tiff2ps-PS1
PASS: tiff2ps-PS2
PASS: tiff2ps-PS3
PASS: tiff2rgba-32bpp-None-jpeg
PASS: tiff2rgba-logluv-3c-16b
PASS: tiff2rgba-minisblack-1c-16b
PASS: tiff2rgba-minisblack-1c-8b
PASS: tiff2rgba-minisblack-2c-8b-alpha
PASS: tiff2rgba-miniswhite-1c-1b
PASS: tiff2rgba-ojpeg_chewey_subsamp21_multi_strip
PASS: tiff2rgba-ojpeg_single_strip_no_rowsperstrip
PASS: tiff2rgba-ojpeg_zackthecat_subsamp22_single_strip
PASS: tiff2rgba-palette-1c-1b
PASS: tiff2rgba-palette-1c-4b
PASS: tiff2rgba-palette-1c-8b
PASS: tiff2rgba-quad-tile.jpg
PASS: tiff2rgba-rgb-3c-16b
PASS: tiff2rgba-rgb-3c-8b
PASS: tiffcp-32bpp-None-jpeg
PASS: tiffcp-g3-1d-fill
PASS: tiffcp-g3-1d
PASS: tiffcp-g3-2d-fill
PASS: tiffcp-g3-2d
PASS: tiffcp-g3
PASS: tiffcp-g4
PASS: tiffcp-logluv
PASS: tiffcp-lzw-compat
PASS: tiffcp-lzw-scanline-decode
SKIP: tiffcp-lzw-single-strip-jbig (JBIG not supported)
PASS: tiffcp-split-join
PASS: tiffcp-split
PASS: tiffcp-thumbnail
SKIP: tiffcrop-* (44 tests - tiffcrop has known issues)
PASS: tiffdump
PASS: tiffinfo
DURATION: 1
END: /usr/lib/tiff/ptest
STOP: ptest-runner
TOTAL: 1 FAIL: 0
--- .../distro/include/ptest-packagelists.inc | 1 + .../recipes-multimedia/libtiff/tiff/run-ptest | 34 +++++++++ meta/recipes-multimedia/libtiff/tiff_4.7.1.bb | 76 ++++++++++++++++++- 3 files changed, 110 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-multimedia/libtiff/tiff/run-ptest
meta/conf/distro/include/ptest-packagelists.inc +1 -0
@@ -99,6 +99,7 @@ PTESTS_FAST = "\ rpm-sequoia \ sed \ slang \ + tiff \ utfcpp \ wayland \ xz \
meta/recipes-multimedia/libtiff/tiff/run-ptest new file +34 -0
@@ -0,0 +1,34 @@ +#!/bin/sh + +cd $(dirname $0)/test + +for test in *.sh; do + [ -x "$test" ] || continue + + # Skip tests for tools with known issues or missing tools + case "$test" in + *tiffcrop*) + # tiffcrop has known security issues and is disabled by default since 4.6.0 + echo "SKIP: ${test%.sh} (tiffcrop has known issues)" + continue + ;; + *jbig*) + # Skip JBIG tests if not supported + echo "SKIP: ${test%.sh} (JBIG not supported)" + continue + ;; + *thumbnail*) + # thumbnail tool may not be built by default + if [ ! -x ../tools/thumbnail ]; then + echo "SKIP: ${test%.sh} (thumbnail tool not available)" + continue + fi + ;; + esac + + if ./"$test" >/dev/null 2>&1; then + echo "PASS: ${test%.sh}" + else + echo "FAIL: ${test%.sh}" + fi +done
meta/recipes-multimedia/libtiff/tiff_4.7.1.bb +75 -1
86 lines not on this page · raw message
Signature · 1 line
2.34.1