Whamcloud - gitweb
LU-17098 tests: fix sanity-pcc failures on Ubuntu 10/52310/2
authorJames Simmons <jsimmons@infradead.org>
Thu, 7 Sep 2023 20:11:04 +0000 (14:11 -0600)
committerOleg Drokin <green@whamcloud.com>
Sat, 23 Sep 2023 06:03:29 +0000 (06:03 +0000)
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 <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52310
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
debian/control
debian/control.main
lustre/tests/sanity-pcc.sh [changed mode: 0644->0755]

index 790458d..de05453 100644 (file)
@@ -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
index f2208ac..a2fc542 100644 (file)
@@ -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
old mode 100644 (file)
new mode 100755 (executable)
index 9db48e1..24a875a
@@ -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"