From f676f6efbc2523b9b5a5aab93622533bf1161453 Mon Sep 17 00:00:00 2001 From: James Simmons Date: Thu, 7 Sep 2023 14:11:04 -0600 Subject: [PATCH] LU-17098 tests: fix sanity-pcc failures on Ubuntu A few sanity-pcc test fail due to the system setup. One of those failures was due to uidmap not installed on my Ubuntu system. The rest of the test failures was due to assuming uid / guid were set values (500 and 1000) which is not the case for all systems. Test-Parameters: trivial testlist=sanity-pcc Change-Id: I667f399854d626d4b22efed2b341ad5c330e0cfe Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52310 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Qian Yingjin Reviewed-by: Oleg Drokin --- debian/control | 2 +- debian/control.main | 2 +- lustre/tests/sanity-pcc.sh | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) mode change 100644 => 100755 lustre/tests/sanity-pcc.sh diff --git a/debian/control b/debian/control index 790458d..de05453 100644 --- a/debian/control +++ b/debian/control @@ -88,7 +88,7 @@ Package: lustre-tests Section: utils Architecture: i386 armhf powerpc ppc64el amd64 ia64 arm64 Priority: optional -Depends: lustre-iokit (= ${binary:Version}), lustre-dev (= ${binary:Version}), attr, rsync, quota, perl, lsof, mpi-default-bin, selinux-utils, python3 +Depends: lustre-iokit (= ${binary:Version}), lustre-dev (= ${binary:Version}), attr, rsync, quota, perl, lsof, mpi-default-bin, uidmap, selinux-utils, python3 Description: Test suite for the Lustre filesystem Lustre is a scalable, secure, robust, highly-available cluster file system. This release is maintained by Whamcloud and available from diff --git a/debian/control.main b/debian/control.main index f2208ac..a2fc542 100644 --- a/debian/control.main +++ b/debian/control.main @@ -88,7 +88,7 @@ Package: lustre-tests Section: utils Architecture: i386 armhf powerpc ppc64el amd64 ia64 arm64 Priority: optional -Depends: lustre-iokit (= ${binary:Version}), lustre-dev (= ${binary:Version}), attr, rsync, quota, perl, lsof, mpi-default-bin, selinux-utils, python3 +Depends: lustre-iokit (= ${binary:Version}), lustre-dev (= ${binary:Version}), attr, rsync, quota, perl, lsof, mpi-default-bin, selinux-utils, uidmap, python3 Description: Test suite for the Lustre filesystem Lustre is a scalable, secure, robust, highly-available cluster file system. This release is maintained by Whamcloud and available from diff --git a/lustre/tests/sanity-pcc.sh b/lustre/tests/sanity-pcc.sh old mode 100644 new mode 100755 index 9db48e1..24a875a --- a/lustre/tests/sanity-pcc.sh +++ b/lustre/tests/sanity-pcc.sh @@ -1095,8 +1095,8 @@ test_rule_id() { test_13a() { copytool setup -m "$MOUNT" -a "$HSM_ARCHIVE_NUMBER" - test_rule_id "u" "500" "runas -u 500" - test_rule_id "g" "500" "runas -u 500 -g 500" + test_rule_id "u" "$RUNAS_ID" "runas -u $RUNAS_ID" + test_rule_id "g" "$RUNAS_GID" "runas -u $RUNAS_ID -g $RUNAS_GID" } run_test 13a "Test auto RW-PCC create caching for UID/GID rule" @@ -1160,7 +1160,7 @@ test_13c() { setup_loopdev $SINGLEAGT $loopfile $mntpt 50 copytool setup -m "$MOUNT" -a "$HSM_ARCHIVE_NUMBER" setup_pcc_mapping $SINGLEAGT \ - "projid={100\ 200}\&fname={*.h5},uid={500}\&gid={1000}\ rwid=$HSM_ARCHIVE_NUMBER" + "projid={100\ 200}\&fname={*.h5},uid={$RUNAS_ID}\&gid={$RUNAS_GID}\ rwid=$HSM_ARCHIVE_NUMBER" $LCTL pcc list $MOUNT do_facet $SINGLEAGT mkdir -p $DIR/$tdir chmod 777 $DIR/$tdir || error "chmod 0777 $DIR/$tdir failed" @@ -1201,7 +1201,7 @@ test_13c() { rm $file || error "rm $file failed" file=$DIR/$tdir/ugidcache - myRUNAS="runas -u 500 -g 1000" + myRUNAS="runas -u $RUNAS_ID -g $RUNAS_GID" do_facet $SINGLEAGT $myRUNAS dd if=/dev/zero of=$file bs=1024 count=1 || error "failed to dd write to $file" check_lpcc_state $file "readwrite" -- 1.8.3.1