In test-frameowrk.sh, h2nettype(), h2o2ib() and h2tcp()
uses if [[ -v NETTYPE ]] where -v option is recognized
only in bash version 4.2 and above.
This patch replaces if [[ -v NETTYPE ]] with
if [[ -n "$NETTYPE" ]].
Test-Parameters: trivial testlist=conf-sanity, sanity, sanity-sec
Change-Id: Ife584f27c7a4caf6f405b701e85d389804ed33ca
Signed-off-by: Sonia Sharma <sonia.sharma@intel.com>
Reviewed-on: https://review.whamcloud.com/27438
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
}
h2nettype() {
- if [[ -v NETTYPE ]]; then
+ if [[ -n "$NETTYPE" ]]; then
h2name_or_ip "$1" "$NETTYPE"
else
h2name_or_ip "$1" "$2"
# Wrapper function to print the deprecation warning
h2tcp() {
echo "h2tcp: deprecated, use h2nettype instead" 1>&2
- if [[ -v NETTYPE ]]; then
+ if [[ -n "$NETTYPE" ]]; then
h2nettype "$@"
else
h2nettype "$1" "tcp"
# Wrapper function to print the deprecation warning
h2o2ib() {
echo "h2o2ib: deprecated, use h2nettype instead" 1>&2
- if [[ -v NETTYPE ]]; then
+ if [[ -n "$NETTYPE" ]]; then
h2nettype "$@"
else
h2nettype "$1" "o2ib"