- # The NIDS value is the failover nid strings and "[" and "]". So
- # we need to subtract the space taken by the delimiters. This has
- # changed from earlier version of Lustre but this test is run only
- # locally so this change will not break interop. See LU-3386
- NIDCOUNT=$(($(echo "$NIDS" | wc -w) - 3))
- echo "should have 2 failover nids: $NIDCOUNT"
- [ $NIDCOUNT -eq 2 ] || error "Failover nid not added"
+ local NIDCOUNT=$(echo "$NIDS" | wc -w)
+ echo "should have $((orignidcount + 1)) entries \
+ in failover nids string, have $NIDCOUNT"
+ [ $NIDCOUNT -eq $((orignidcount + 1)) ] ||
+ error "Failover nid not added"
+