From f5f62250886e8c68e7f0dee9c2842c3075a69654 Mon Sep 17 00:00:00 2001 From: Yang Sheng Date: Tue, 19 Apr 2016 02:43:51 +0800 Subject: [PATCH] LU-6601 tests: test case validate OSP status op Add a test case to verify status change is effective for OSP. Signed-off-by: Yang Sheng Change-Id: I11a6968756f66989ba87063424f6618475814901 Reviewed-on: http://review.whamcloud.com/19637 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Bob Glossman Reviewed-by: Jian Yu Reviewed-by: Oleg Drokin --- lustre/tests/sanity.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 81a3532..07ae4fc 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -14661,6 +14661,32 @@ test_403() { } run_test 403 "i_nlink should not drop to zero due to aliasing" +test_404() { # LU-6601 + local mosps=$(do_facet $SINGLEMDS $LCTL dl | + awk '/osp .*-osc-MDT/ { print $4}') + + local osp + for osp in $mosps; do + echo "Deactivate: " $osp + do_facet $SINGLEMDS $LCTL --device %$osp deactivate + local stat=$(do_facet $SINGLEMDS $LCTL dl | + awk -vp=$osp '$4 == p { print $2 }') + [ $stat = IN ] || { + do_facet $SINGLEMDS $LCTL dl | grep -w $osp + error "deactivate error" + } + echo "Activate: " $osp + do_facet $SINGLEMDS $LCTL --device %$osp activate + local stat=$(do_facet $SINGLEMDS $LCTL dl | + awk -vp=$osp '$4 == p { print $2 }') + [ $stat = UP ] || { + do_facet $SINGLEMDS $LCTL dl | grep -w $osp + error "activate error" + } + done +} +run_test 404 "validate manual {de}activated works properly for OSPs" + # # tests that do cleanup/setup should be run at the end # -- 1.8.3.1