1919#
2020
2121
22- . ` dirname $0 ` /common.sh
23- . ` dirname $0 ` /m0t1fs_common_inc.sh
24- . ` dirname $0 ` /m0t1fs_client_inc.sh
25- . ` dirname $0 ` /m0t1fs_server_inc.sh
26- . ` dirname $0 ` /m0t1fs_sns_common_inc.sh
22+ . $( dirname $0 ) /common.sh
23+ . $( dirname $0 ) /m0t1fs_common_inc.sh
24+ . $( dirname $0 ) /m0t1fs_client_inc.sh
25+ . $( dirname $0 ) /m0t1fs_server_inc.sh
26+ . $( dirname $0 ) /m0t1fs_sns_common_inc.sh
2727
2828. $M0_SRC_DIR /utils/functions # opcode
2929
@@ -146,7 +146,7 @@ rcancel_post()
146146
147147rcancel_change_controller_state ()
148148{
149- local lnet_nid=` sudo lctl list_nids | head -1`
149+ local lnet_nid=$( sudo lctl list_nids | head -1)
150150 local s_endpoint=" $lnet_nid :12345:33:1"
151151 local c_endpoint=" $lnet_nid :$M0HAM_CLI_EP "
152152 local dev_fid=$1
@@ -299,18 +299,18 @@ rcancel_cancel_during_write_test()
299299 # It is to verify that some RPC items were indeed canceled through
300300 # RPC session cancelation. Some items are going to get canceled
301301 # while attempting to be posted after session cancelation.
302- num=` grep -n " dd: " $MOTR_TEST_LOGFILE | grep " writing" | grep " Operation canceled" | grep " $wt_write_file_base " | wc -l | cut -f1 -d' ' `
302+ num=$( grep -n " dd: " $MOTR_TEST_LOGFILE | grep " writing" | grep " Operation canceled" | grep " $wt_write_file_base " | wc -l | cut -f1 -d' ' )
303303 echo " dd write processes canceled : $num "
304304 if [ $num -eq 0 ]; then
305305 echo " Failed: No dd writing operation was canceled"
306306 unmount_and_clean
307307 return 1
308308 fi
309309
310- num=` grep -n " dd: closing" $MOTR_TEST_LOGFILE | grep " Operation canceled" | grep " $wt_write_file_base " | wc -l | cut -f1 -d' ' `
310+ num=$( grep -n " dd: closing" $MOTR_TEST_LOGFILE | grep " Operation canceled" | grep " $wt_write_file_base " | wc -l | cut -f1 -d' ' )
311311 echo " dd closing processes canceled : $num "
312312
313- num=` grep -n " ls: cannot access" $MOTR_TEST_LOGFILE | grep " Operation canceled" | grep " $wt_write_file_base " | wc -l | cut -f1 -d' ' `
313+ num=$( grep -n " ls: cannot access" $MOTR_TEST_LOGFILE | grep " Operation canceled" | grep " $wt_write_file_base " | wc -l | cut -f1 -d' ' )
314314 echo " ls processes canceled : $num "
315315 if [ $num -gt 0 ] && [ $rcancel_md_redundancy > 1 ]; then
316316 echo " Failed: ls was canceled inspite-of having rcancel_md_redundancy ($rcancel_md_redundancy ) > 1"
@@ -471,15 +471,15 @@ rcancel_cancel_during_read_test()
471471 # to verify that RPC session was indeed canceled.
472472 # Many of those read ops fail with the error "Input/output error"
473473 # while a few fail with the error "Operation canceled"
474- num=` grep -n " dd: " $MOTR_TEST_LOGFILE | grep " reading" | egrep ' Operation canceled|Input\/output error' | grep " $rt_file_base " | wc -l | cut -f1 -d' ' `
474+ num=$( grep -n " dd: " $MOTR_TEST_LOGFILE | grep " reading" | egrep ' Operation canceled|Input\/output error' | grep " $rt_file_base " | wc -l | cut -f1 -d' ' )
475475 echo " dd read processes canceled : $num "
476476 if [ $num -eq 0 ]; then
477477 echo " Failed: No dd reading operation was canceled"
478478 unmount_and_clean
479479 return 1
480480 fi
481481
482- num=` grep -n " dd: closing" $MOTR_TEST_LOGFILE | grep " Operation canceled" | grep " $rt_read_file_base " | wc -l | cut -f1 -d' ' `
482+ num=$( grep -n " dd: closing" $MOTR_TEST_LOGFILE | grep " Operation canceled" | grep " $rt_read_file_base " | wc -l | cut -f1 -d' ' )
483483 echo " dd closing processes canceled : $num "
484484
485485 # Test ls with canceled session
@@ -488,7 +488,7 @@ rcancel_cancel_during_read_test()
488488 ls -l " $rt_read_file_base " $i
489489 echo " ls_rc: $? "
490490 done
491- num=` grep -n " ls: cannot access" $MOTR_TEST_LOGFILE | grep " Operation canceled" | grep " $rt_read_file_base " | wc -l | cut -f1 -d' ' `
491+ num=$( grep -n " ls: cannot access" $MOTR_TEST_LOGFILE | grep " Operation canceled" | grep " $rt_read_file_base " | wc -l | cut -f1 -d' ' )
492492 echo " ls processes canceled : $num "
493493 if [ $num -gt 0 ] && [ $rcancel_md_redundancy > 1 ]; then
494494 echo " Failed: ls was canceled inspite-of having rcancel_md_redundancy ($rcancel_md_redundancy ) > 1"
@@ -585,7 +585,7 @@ rcancel_cancel_during_create_test()
585585
586586 # Verify that some create operations were indeed canceled due to
587587 # RPC session cancelation.
588- num=` grep -n " touch: " $MOTR_TEST_LOGFILE | grep " Operation canceled" | grep " $ct_create_file_base " | wc -l | cut -f1 -d' ' `
588+ num=$( grep -n " touch: " $MOTR_TEST_LOGFILE | grep " Operation canceled" | grep " $ct_create_file_base " | wc -l | cut -f1 -d' ' )
589589 echo " create processes canceled : $num "
590590 if [ $num -eq 0 ]; then
591591 echo " Failed: No create operation was canceled"
@@ -679,7 +679,7 @@ rcancel_cancel_during_delete_test()
679679
680680 # Verify that some delete operations were indeed canceled due to
681681 # RPC session cancelation.
682- num=` grep -n " rm: " $MOTR_TEST_LOGFILE | grep " Operation canceled" | grep " $delete_file_base " | wc -l | cut -f1 -d' ' `
682+ num=$( grep -n " rm: " $MOTR_TEST_LOGFILE | grep " Operation canceled" | grep " $delete_file_base " | wc -l | cut -f1 -d' ' )
683683 echo " delete processes canceled : $num "
684684 if [ $num -eq 0 ]; then
685685 echo " Failed: No delete operation was canceled"
@@ -761,7 +761,7 @@ rcancel_cancel_during_setfattr_ops_test()
761761
762762 # Verify that some setfattr operations were indeed canceled due to
763763 # RPC session cancelation.
764- num=` grep -n " setfattr: " $MOTR_TEST_LOGFILE | grep " Operation canceled" | grep " $setfattr_file_base " | wc -l | cut -f1 -d' ' `
764+ num=$( grep -n " setfattr: " $MOTR_TEST_LOGFILE | grep " Operation canceled" | grep " $setfattr_file_base " | wc -l | cut -f1 -d' ' )
765765 echo " setfattr processes canceled : $num "
766766 if [ $num -eq 0 ]; then
767767 echo " Failed: No setfattr operation was canceled"
@@ -841,7 +841,7 @@ rcancel_cancel_during_getfattr_ops_test()
841841
842842 # Verify that some getfattr operations were indeed canceled due to
843843 # RPC session cancelation.
844- num=` grep -n " getfattr: " $MOTR_TEST_LOGFILE | grep " Operation canceled" | grep " $getfattr_file_base " | wc -l | cut -f1 -d' ' `
844+ num=$( grep -n " getfattr: " $MOTR_TEST_LOGFILE | grep " Operation canceled" | grep " $getfattr_file_base " | wc -l | cut -f1 -d' ' )
845845 echo " getfattr processes canceled : $num "
846846 if [ $num -eq 0 ]; then
847847 if [ $rcancel_md_redundancy -eq $RCANCEL_MD_REDUNDANCY_1 ]; then
@@ -934,7 +934,7 @@ rcancel_test_cases()
934934 echo " TC.8.End: Session cancel with concurrent getfattr ops"
935935 echo " ======================================================="
936936
937- num=` grep -n " Connection timed out" $MOTR_TEST_LOGFILE | wc -l | cut -f1 -d' ' `
937+ num=$( grep -n " Connection timed out" $MOTR_TEST_LOGFILE | wc -l | cut -f1 -d' ' )
938938 echo " Connection timed out : $num "
939939 if [ $num -gt 0 ]; then
940940 echo " Failed: Connection timed out error has occurred"
@@ -974,7 +974,7 @@ rcancel_test()
974974
975975main ()
976976{
977- NODE_UUID=` uuidgen`
977+ NODE_UUID=$( uuidgen)
978978 local rc
979979
980980 echo " *********************************************************"
0 commit comments