Add comments for some tag exclusions
[csit.git] / resources / libraries / bash / function / common.sh
index 399b449..810500e 100644 (file)
@@ -659,10 +659,6 @@ function select_tags () {
 
     # Blacklisting certain tags per topology.
     case "${TEST_CODE}" in
 
     # Blacklisting certain tags per topology.
     case "${TEST_CODE}" in
-        *"3n-hsw"*)
-            test_tag_array+=("!drv_avf")
-            test_tag_array+=("!ipsechwNOTnic_intel-xl710")
-            ;;
         *"2n-skx"*)
             test_tag_array+=("!ipsechw")
             ;;
         *"2n-skx"*)
             test_tag_array+=("!ipsechw")
             ;;
@@ -678,9 +674,21 @@ function select_tags () {
             test_tag_array+=("!vhost")
             test_tag_array+=("!vts")
             ;;
             test_tag_array+=("!vhost")
             test_tag_array+=("!vts")
             ;;
+        *"3n-hsw"*)
+            # TODO: Introduce NOIOMMU version of AVF tests.
+            # TODO: Make (both) AVF tests work on Haswell,
+            # or document why (some of) it is not possible.
+            # https://github.com/FDio/vpp/blob/master/src/plugins/avf/README.md
+            test_tag_array+=("!drv_avf")
+            # All cards have access to QAT. But only one card (xl710)
+            # resides in same NUMA as QAT. Other cards must go over QPI
+            # which we do not want to even run.
+            test_tag_array+=("!ipsechwNOTnic_intel-xl710")
+            ;;
         *)
             # Default to 3n-hsw due to compatibility.
             test_tag_array+=("!drv_avf")
         *)
             # Default to 3n-hsw due to compatibility.
             test_tag_array+=("!drv_avf")
+            test_tag_array+=("!ipsechwNOTnic_intel-xl710")
             ;;
     esac
 
             ;;
     esac
 
@@ -765,27 +773,29 @@ function select_os () {
 
     set -exuo pipefail
 
 
     set -exuo pipefail
 
-    # Variables read:
-    # - OS - os or distro for selecting container image.
     # Variables set:
     # - VPP_VER_FILE - Name of File in CSIT dir containing vpp stable version.
     # - IMAGE_VER_FILE - Name of File in CSIT dir containing the image name.
     # - PKG_SUFFIX - Suffix of OS package file name, "rpm" or "deb."
 
     # Variables set:
     # - VPP_VER_FILE - Name of File in CSIT dir containing vpp stable version.
     # - IMAGE_VER_FILE - Name of File in CSIT dir containing the image name.
     # - PKG_SUFFIX - Suffix of OS package file name, "rpm" or "deb."
 
-    case "${OS}" in
-    "ubuntu"*)
-        IMAGE_VER_FILE="VPP_DEVICE_IMAGE_UBUNTU"
-        VPP_VER_FILE="VPP_STABLE_VER_UBUNTU_BIONIC"
-        PKG_SUFFIX="deb"
-        ;;
-    "centos"*)
-        IMAGE_VER_FILE="VPP_DEVICE_IMAGE_CENTOS"
-        VPP_VER_FILE="VPP_STABLE_VER_CENTOS"
-        PKG_SUFFIX="rpm"
-        ;;
-    *)
-        die "Unable to identify distro or os from ${OS}"
-        ;;
+    os_id=$(grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g') || {
+        die "Get OS release failed."
+    }
+
+    case "${os_id}" in
+        "ubuntu"*)
+            IMAGE_VER_FILE="VPP_DEVICE_IMAGE_UBUNTU"
+            VPP_VER_FILE="VPP_STABLE_VER_UBUNTU_BIONIC"
+            PKG_SUFFIX="deb"
+            ;;
+        "centos"*)
+            IMAGE_VER_FILE="VPP_DEVICE_IMAGE_CENTOS"
+            VPP_VER_FILE="VPP_STABLE_VER_CENTOS"
+            PKG_SUFFIX="rpm"
+            ;;
+        *)
+            die "Unable to identify distro or os from ${OS}"
+            ;;
     esac
 }
 
     esac
 }
 
@@ -807,6 +817,7 @@ function select_topology () {
 
     case_text="${NODENESS}_${FLAVOR}"
     case "${case_text}" in
 
     case_text="${NODENESS}_${FLAVOR}"
     case "${case_text}" in
+        # TODO: Move tags to "# Blacklisting certain tags per topology" section.
         "1n_vbox")
             TOPOLOGIES=( "${TOPOLOGIES_DIR}"/*vpp_device*.template )
             TOPOLOGIES_TAGS="2_node_single_link_topo"
         "1n_vbox")
             TOPOLOGIES=( "${TOPOLOGIES_DIR}"/*vpp_device*.template )
             TOPOLOGIES_TAGS="2_node_single_link_topo"