From 362562c671141bc2a15110f3bcf4de11243cf954 Mon Sep 17 00:00:00 2001 From: Jian Yu Date: Thu, 6 Jun 2024 00:34:00 -0700 Subject: [PATCH] EX-9125 tests: change source dir for sanity-compr/1008 While the source directory contains almost all small files, sanity-compr test_1008 will hit the "failed estimates > 50% of total estimates" failure on SLES15. The patch fixes the issue by changing the source dir to contain large files. Test-Parameters: trivial clientdistro=sles15sp5 \ testlist=sanity-compr env=ONLY="1008",ONLY_REPEAT=3 Test-Parameters: trivial clientdistro=el9.3 \ testlist=sanity-compr env=ONLY="1008",ONLY_REPEAT=3 Test-Parameters: trivial clientdistro=el8.8 \ testlist=sanity-compr env=ONLY="1008",ONLY_REPEAT=3 Change-Id: Iad661750cba7c9d2204f2306e73169deb012ddf4 Signed-off-by: Jian Yu Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/55334 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger --- lustre/tests/sanity-compr.sh | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/lustre/tests/sanity-compr.sh b/lustre/tests/sanity-compr.sh index 1fb6e0b..66399be 100644 --- a/lustre/tests/sanity-compr.sh +++ b/lustre/tests/sanity-compr.sh @@ -1141,9 +1141,27 @@ test_1008() { local failed_margin=50 local td=$DIR/$tdir - local source="/etc/ /bin/" + local source=$TMP/$tdir + local hdf=$LUSTRE/tests/AMSR_E_L3_DailyOcean_V05_20111003.hdf + local tmp_hdf=$source/$tfile.hdf + + mkdir -p $source || error "mkdir -p $source failed" + + if [[ -f $hdf.bz2 ]] && type -p bzcat >/dev/null; then + bzcat $hdf.bz2 > $tmp_hdf + elif [[ -f $hdf.bz2 ]] && type -p bunzip2 >/dev/null; then + cp $hdf.bz2 $tmp_hdf.bz2 || error "cp $tmp_hdf.bz2" + bunzip2 $tmp_hdf.bz2 || error "bunzip2 $tmp_hdf.bz2" + else + skip_env "bunzip2 is not installed" + fi + + cp -a $tmp_hdf{,.bak} || error "copy $tmp_hdf failed" + cp -a /etc $source || error "copy /etc failed" + # Sync to disk and drop cache + sync; echo 3 > /proc/sys/vm/drop_caches - stack_trap "rm -rf $td" + stack_trap "rm -rf $td $TMP/$tdir" compression_enabled || skip "compression is disabled ($(uname -a))" for compr_type in ${compr_types[@]}; do -- 1.8.3.1