From fa005ecb950e0dfe49447a0813d8f6fc803d2174 Mon Sep 17 00:00:00 2001 From: Emoly Liu Date: Sun, 31 Aug 2014 05:12:48 +0800 Subject: [PATCH] LU-4167 tests: correct version check to enable ff_convert In conf-sanity.sh test_32d, filter fid convertion can be made only when both of the following conditions are satisfied: - ost device img version < 2.3.64 (struct filter_fid_old has been introduced since 2.3.64) - ost server version >= 2.5 Also, this patch fix the ofd_iocontrol() message to print the ioctl() CMD argument as hex instead of a signed integer. Test-Parameters: testlist=conf-sanity envdefinitions=SLOW=yes,ONLY=32 ossjob=lustre-b2_4 mdsjob=lustre-b2_4 ossbuildno=73 mdsbuildno=73 ossdistro=el6 mdsdistro=el6 Signed-off-by: Emoly Liu Change-Id: I4045fe6b7504a3ed30436da5a1319c09331fc261 Reviewed-on: http://review.whamcloud.com/11556 Reviewed-by: Andreas Dilger Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Fan Yong Reviewed-by: Jian Yu --- lustre/ofd/ofd_obd.c | 2 +- lustre/tests/conf-sanity.sh | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lustre/ofd/ofd_obd.c b/lustre/ofd/ofd_obd.c index 231c177..561509e 100644 --- a/lustre/ofd/ofd_obd.c +++ b/lustre/ofd/ofd_obd.c @@ -1375,7 +1375,7 @@ int ofd_iocontrol(unsigned int cmd, struct obd_export *exp, int len, rc = ofd_ioc_get_obj_version(&env, ofd, karg); break; default: - CERROR("%s: not supported cmd = %d\n", obd->obd_name, cmd); + CERROR("%s: not supported cmd = %#x\n", obd->obd_name, cmd); rc = -ENOTTY; } diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index e0e8337..c154d94 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -1605,9 +1605,15 @@ t32_test() { echo " Commit: $img_commit" echo " Kernel: $img_kernel" echo " Arch: $img_arch" - - local version=$(version_code $img_commit) - [[ $version -ge $(version_code 2.5.0) ]] && ff_convert="no" + echo "OST version: $(get_lustre_version ost1)" + + # The convertion can be made only when both of the following + # conditions are satisfied: + # - ost device img version < 2.3.64 + # - ost server version >= 2.5 + [ $(version_code $img_commit) -ge $(version_code 2.3.64) -o \ + $(lustre_version_code ost1) -lt $(version_code 2.5.0) ] && + ff_convert="no" if [ $fstype == "zfs" ]; then # import pool first -- 1.8.3.1