ggsn: add m_ggsn_conf modulepar

Prepare to run the GGSN tests in different configurations:
* v4_only: one APN with v4
* v6_only: one APN with v6
* v4v6_only: one APN with v4v6
* all: multiple APNs with all of the above

Related: OS#6096
Related: docker-playground Ia2fe0c3ed4ccf06e72fd258d085e4a79cecd5f26
Change-Id: I6d94a8b18200fbb2119406827b74b83e912e3ecc
diff --git a/ggsn_tests/GGSN_Tests.ttcn b/ggsn_tests/GGSN_Tests.ttcn
index 74c2e8c..13edca5 100644
--- a/ggsn_tests/GGSN_Tests.ttcn
+++ b/ggsn_tests/GGSN_Tests.ttcn
@@ -55,6 +55,13 @@
 		GGSN_IMPL_OPEN5GS
 	};
 
+	type enumerated GGSN_Conf {
+		GGSN_CONF_ALL,
+		GGSN_CONF_V4_ONLY,
+		GGSN_CONF_V6_ONLY,
+		GGSN_CONF_V4V6_ONLY
+	};
+
 	modulepar {
 		/* Default IP addresses. May be overridden by GGSN_Tests configuration files. */
 
@@ -89,6 +96,7 @@
 		integer mp_n3_requests := 3; /* local N3-REQUESTS counter */
 
 		GGSN_Impl m_ggsn_impl := GGSN_IMPL_OSMOCOM;
+		GGSN_Conf m_ggsn_conf := GGSN_CONF_ALL;
 	}
 
 	type set PdpContext {
@@ -2210,51 +2218,65 @@
 	}
 
 	control {
-		execute(TC_pdp4_act_deact());
-		execute(TC_pdp4_act_deact_ipcp());
-		execute(TC_pdp4_act_deact_ipcp_pap_broken());
-		execute(TC_pdp4_act_deact_pcodns());
-		execute(TC_pdp4_act_deact_gtpu_access());
-		execute(TC_pdp4_act_deact_gtpu_access_wrong_saddr());
-		execute(TC_pdp4_act_deact_gtpu_access_ipv6_apn4());
-		execute(TC_pdp4_clients_interact_with_txseq());
-		execute(TC_pdp4_clients_interact_without_txseq());
-		execute(TC_pdp4_act_deact_with_single_dns());
-		execute(TC_pdp4_act_deact_with_separate_dns());
-		execute(TC_pdp4_act_update_teic());
-		execute(TC_pdp4_act_update_teid());
+		if (m_ggsn_conf != GGSN_CONF_V6_ONLY) {
+			execute(TC_pdp4_act_deact());
+			execute(TC_pdp4_act_deact_ipcp());
+			execute(TC_pdp4_act_deact_ipcp_pap_broken());
+			execute(TC_pdp4_act_deact_pcodns());
+			execute(TC_pdp4_act_deact_gtpu_access());
+			execute(TC_pdp4_act_deact_gtpu_access_wrong_saddr());
+			execute(TC_pdp4_act_deact_gtpu_access_ipv6_apn4());
+			execute(TC_pdp4_clients_interact_with_txseq());
+			execute(TC_pdp4_clients_interact_without_txseq());
+			execute(TC_pdp4_act_deact_with_single_dns());
+			execute(TC_pdp4_act_deact_with_separate_dns());
+			execute(TC_pdp4_act_update_teic());
+			execute(TC_pdp4_act_update_teid());
+		}
 
-		execute(TC_pdp6_act_deact());
-		execute(TC_pdp6_act_deact_pcodns());
-		execute(TC_pdp6_act_deact_icmp6());
-		execute(TC_pdp6_act_deact_gtpu_access());
-		execute(TC_pdp6_act_deact_gtpu_access_wrong_ll_saddr());
-		execute(TC_pdp6_act_deact_gtpu_access_wrong_global_saddr());
-		execute(TC_pdp6_act_deact_gtpu_access_ipv4_apn6());
-		execute(TC_pdp6_clients_interact());
+		if (m_ggsn_conf != GGSN_CONF_V4_ONLY) {
+			execute(TC_pdp6_act_deact());
+			execute(TC_pdp6_act_deact_pcodns());
+			execute(TC_pdp6_act_deact_icmp6());
+			execute(TC_pdp6_act_deact_gtpu_access());
+			execute(TC_pdp6_act_deact_gtpu_access_wrong_ll_saddr());
+			execute(TC_pdp6_act_deact_gtpu_access_wrong_global_saddr());
+			execute(TC_pdp6_act_deact_gtpu_access_ipv4_apn6());
+			execute(TC_pdp6_clients_interact());
+		}
 
-		execute(TC_pdp46_act_deact());
-		execute(TC_pdp46_act_deact_ipcp());
-		execute(TC_pdp46_act_deact_icmp6());
-		execute(TC_pdp46_act_deact_pcodns4());
-		execute(TC_pdp46_act_deact_pcodns6());
-		execute(TC_pdp46_act_deact_gtpu_access());
-		execute(TC_pdp46_act_deact_gtpu_access_wrong_saddr_ipv4());
-		execute(TC_pdp46_act_deact_gtpu_access_wrong_ll_saddr_ipv6());
-		execute(TC_pdp46_act_deact_gtpu_access_wrong_global_saddr_ipv6());
-		execute(TC_pdp46_clients_interact());
-		execute(TC_pdp46_act_deact_apn4());
+		if (m_ggsn_conf != GGSN_CONF_V4_ONLY and m_ggsn_conf != GGSN_CONF_V6_ONLY) {
+			execute(TC_pdp46_act_deact());
+			execute(TC_pdp46_act_deact_ipcp());
+			execute(TC_pdp46_act_deact_icmp6());
+			execute(TC_pdp46_act_deact_pcodns4());
+			execute(TC_pdp46_act_deact_pcodns6());
+			execute(TC_pdp46_act_deact_gtpu_access());
+			execute(TC_pdp46_act_deact_gtpu_access_wrong_saddr_ipv4());
+			execute(TC_pdp46_act_deact_gtpu_access_wrong_ll_saddr_ipv6());
+			execute(TC_pdp46_act_deact_gtpu_access_wrong_global_saddr_ipv6());
+			execute(TC_pdp46_clients_interact());
+		}
+
+		if (m_ggsn_conf == GGSN_CONF_ALL) {
+			execute(TC_pdp46_act_deact_apn4());
+		}
 
 		execute(TC_echo_req_resp());
 		execute(TC_echo_req_resp_gtpu());
-		execute(TC_pdp_act2_recovery());
-		execute(TC_act_deact_retrans_duplicate());
 
-		execute(TC_pdp_act_restart_ctr_echo());
+		if (m_ggsn_conf == GGSN_CONF_V4_ONLY or m_ggsn_conf == GGSN_CONF_ALL) {
+			execute(TC_pdp_act2_recovery());
+			execute(TC_act_deact_retrans_duplicate());
+		}
 
-		execute(TC_lots_of_concurrent_pdp_ctx());
-		/* Keep at the end, crashes older osmo-ggsn versions (OS#5469): */
-		execute(TC_addr_pool_exhaustion());
+		if (m_ggsn_conf != GGSN_CONF_V6_ONLY) {
+			execute(TC_pdp_act_restart_ctr_echo());
+
+			execute(TC_lots_of_concurrent_pdp_ctx());
+			/* Keep at the end, crashes older osmo-ggsn versions (OS#5469): */
+			execute(TC_addr_pool_exhaustion());
+		}
 
 		/* open5gs specific tests: */
 		if (m_ggsn_impl == GGSN_IMPL_OPEN5GS) {