Whamcloud - gitweb
LU-5680 tests: Remove use of /etc/motd from sanity-hsm 95/30795/9
authorJames Nunez <james.a.nunez@intel.com>
Tue, 5 Dec 2017 17:49:26 +0000 (10:49 -0700)
committerJohn L. Hammond <john.hammond@intel.com>
Thu, 12 Apr 2018 15:26:21 +0000 (15:26 +0000)
In sanity-hsm tests, /etc/motd is copied to the file system
and archived. /etc/motd may not exist in some Linux distributions
and, if exists, may be of size 0 and may defeat the use of
bandwidth control for timing. Uses of /etc/motd are replaced
with temp file

Test-Parameters: trivial testlist=sanity-hsm

Lustre-change: https://review.whamcloud.com/14021
Lustre-commit: 715c7e9166a34c1f2b781f3314d8b7c02e10950c

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I2f287db6d422ce20bca037ca69e24179c7e48144
Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30795
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
lustre/tests/sanity-hsm.sh

index 7941b8f..f330e35 100755 (executable)
@@ -2574,7 +2574,8 @@ test_26d() {
 
        mkdir -p $DIR/$tdir
        local f=$DIR/$tdir/$tfile
-       local fid=$(copy_file /etc/motd $f 1)
+       touch $f
+       local fid=$(path2fid $f)
 
        $LFS hsm_archive $f || error "could not archive file"
        wait_request_state $fid ARCHIVE SUCCEED
@@ -3300,7 +3301,8 @@ test_52() {
 
        mkdir -p $DIR/$tdir
        local f=$DIR/$tdir/$tfile
-       local fid=$(copy_file /etc/motd $f 1)
+       touch $f
+       local fid=$(path2fid $f)
 
        $LFS hsm_archive $f || error "could not archive file"
        wait_request_state $fid ARCHIVE SUCCEED
@@ -3327,7 +3329,8 @@ test_53() {
 
        mkdir -p $DIR/$tdir
        local f=$DIR/$tdir/$tfile
-       local fid=$(copy_file /etc/motd $f 1)
+       touch $f
+       local fid=$(path2fid $f)
 
        $LFS hsm_archive --archive $HSM_ARCHIVE_NUMBER $f ||
                error "could not archive file"