Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
filesystems
lustre_2_15
0010-LU-14992-tests-sanity-replay-vbr-mkdir-on-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0010-LU-14992-tests-sanity-replay-vbr-mkdir-on-MDT0.patch of Package lustre_2_15
From 61fcd09b30dcf124899bed0be1cba41934ed58b1 Mon Sep 17 00:00:00 2001 From: James Nunez <jnunez@whamcloud.com> Date: Mon, 13 Sep 2021 10:35:30 -0600 Subject: [PATCH 10/30] LU-14992 tests: sanity/replay-vbr mkdir on MDT0 Replace mkdir with mkdir_on_mdt0() for sanity test 133a and relay-vbr test 7a. These tests expect the newly created directory is on MDT0. Test-Parameters: trivial mdscount=2 mdtcount=4 testlist=sanity Test-Parameters: env=SLOW=yes mdscount=2 mdtcount=4 testlist=replay-vbr Signed-off-by: James Nunez <jnunez@whamcloud.com> Change-Id: Icea2923a8d8d3a3aa0ddf0401f0a025480b2f6f0 Reviewed-on: https://review.whamcloud.com/44902 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Kevin Zhao <kevin.zhao@linaro.org> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: Oleg Drokin <green@whamcloud.com> --- lustre/tests/replay-vbr.sh | 26 +++++++++++------------ lustre/tests/sanity.sh | 42 +++++++++++++++++++++++++------------- 2 files changed, 41 insertions(+), 27 deletions(-) diff --git a/lustre/tests/replay-vbr.sh b/lustre/tests/replay-vbr.sh index 7955f4c0d360..81012fc162ca 100755 --- a/lustre/tests/replay-vbr.sh +++ b/lustre/tests/replay-vbr.sh @@ -716,21 +716,21 @@ test_7_cycle() { } test_7a() { - first="createmany -o $DIR/$tdir/$tfile- 1" - lost="rm $MOUNT2/$tdir/$tfile-0" - last="createmany -o $DIR/$tdir/$tfile- 1" - test_7_cycle "$first" "$lost" "$last" || error "Test 7a.1 failed" + first="createmany -o $DIR/$tdir/$tfile- 1" + lost="rm $MOUNT2/$tdir/$tfile-0" + last="createmany -o $DIR/$tdir/$tfile- 1" + test_7_cycle "$first" "$lost" "$last" || error "Test 7a.1 failed" - first="createmany -o $DIR/$tdir/$tfile- 1" - lost="rm $MOUNT2/$tdir/$tfile-0" - last="mkdir $DIR/$tdir/$tfile-0" - test_7_cycle "$first" "$lost" "$last" || error "Test 7a.2 failed" + first="createmany -o $DIR/$tdir/$tfile- 1" + lost="rm $MOUNT2/$tdir/$tfile-0" + last="$LFS mkdir -i 0 -c 1 $DIR/$tdir/$tfile-0" + test_7_cycle "$first" "$lost" "$last" || error "Test 7a.2 failed" - first="mkdir $DIR/$tdir/$tfile-0" - lost="mv $MOUNT2/$tdir/$tfile-0 $MOUNT2/$tdir/$tfile-1" - last="createmany -o $DIR/$tdir/$tfile- 1" - test_7_cycle "$first" "$lost" "$last" || error "Test 7a.3 failed" - return 0 + first="mkdir $DIR/$tdir/$tfile-0" + lost="mv $MOUNT2/$tdir/$tfile-0 $MOUNT2/$tdir/$tfile-1" + last="createmany -o $DIR/$tdir/$tfile- 1" + test_7_cycle "$first" "$lost" "$last" || error "Test 7a.3 failed" + return 0 } run_test 7a "create, {lost}, create" diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index da352f9c3112..de15929821b9 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -14001,21 +14001,31 @@ check_stats() { local want=${3:-0} local res + # open 11 samples [usecs] 468 4793 13658 35791898 case $facet in - mds*) res=$(do_facet $facet \ - $LCTL get_param mdt.$FSNAME-MDT0000.md_stats | grep "$op") + mds*) res=($(do_facet $facet \ + $LCTL get_param mdt.$FSNAME-MDT0000.md_stats | grep "$op")) ;; - ost*) res=$(do_facet $facet \ - $LCTL get_param obdfilter.$FSNAME-OST0000.stats | grep "$op") + ost*) res=($(do_facet $facet \ + $LCTL get_param obdfilter.$FSNAME-OST0000.stats | grep "$op")) ;; *) error "Wrong facet '$facet'" ;; esac - [ "$res" ] || error "The counter for $op on $facet was not incremented" - # if the argument $3 is zero, it means any stat increment is ok. - if [[ $want -gt 0 ]]; then - local count=$(echo $res | awk '{ print $2 }') - [[ $count -ne $want ]] && + [[ -n "$res" ]] || error "counter for $op on $facet not incremented" + # if $want is zero, it means any stat increment is ok. + if (( $want > 0 )); then + local count=${res[1]} + + if (( $count != $want )); then + if [[ $facet =~ "mds" ]]; then + do_nodes $(comma_list $(mdts_nodes)) \ + $LCTL get_param mdt.*.md_stats + else + do_nodes $(comma_list $(osts-nodes)) \ + $LCTL get_param obdfilter.*.stats + fi error "The $op counter on $facet is $count, not $want" + fi fi } @@ -14035,8 +14045,11 @@ test_133a() { do_facet ost1 $LCTL set_param obdfilter.*.stats=clear # verify mdt stats first. - mkdir ${testdir} || error "mkdir failed" + mkdir_on_mdt0 ${testdir} || error "mkdir_on_mdt0 failed" check_stats $SINGLEMDS "mkdir" 1 + + # clear "open" from "lfs mkdir" above + do_facet $SINGLEMDS $LCTL set_param mdt.*.md_stats=clear touch ${testdir}/${tfile} || error "touch failed" check_stats $SINGLEMDS "open" 1 check_stats $SINGLEMDS "close" 1 @@ -14076,7 +14089,8 @@ test_133b() { local testdir=$DIR/${tdir}/stats_testdir - mkdir -p ${testdir} || error "mkdir failed" + mkdir -p $DIR/$tdir || error "mkdir $tdir failed" + mkdir_on_mdt0 ${testdir} || error "mkdir_on_mdt0 failed" touch ${testdir}/${tfile} || error "touch failed" cancel_lru_locks mdc @@ -14231,12 +14245,12 @@ test_133d() { local testdir1=$DIR/${tdir}/stats_testdir1 local testdir2=$DIR/${tdir}/stats_testdir2 - mkdir -p $DIR/${tdir} + mkdir -p $DIR/${tdir} || error "mkdir $tdir failed" do_facet $SINGLEMDS $LCTL set_param mdt.*.rename_stats=clear - lfs mkdir -i 0 -c 1 ${testdir1} || error "mkdir failed" - lfs mkdir -i 0 -c 1 ${testdir2} || error "mkdir failed" + mkdir_on_mdt0 ${testdir1} || error "mkdir $testdir1 failed" + mkdir_on_mdt0 ${testdir2} || error "mkdir $testdir2 failed" createmany -o $testdir1/test 512 || error "createmany failed" -- 2.38.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor