Commit 29d990d1 authored by Yann Garcia's avatar Yann Garcia
Browse files

Raise error in case AT+COPS fails

parent e1b4b788
Loading
Loading
Loading
Loading
+21 −5
Changes for ttcn/AtsNGAP/NGAP_Steps.ttcn: 21 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -30,6 +30,8 @@ module NGAP_Steps { // TODO FSCOM f_xxx_UE_SecurityMode to be mmoved into NAG_NG
    import from LibNGAP_Interface all;

    // UpperTester
    import from UpperTesterCommon all;
    import from UpperTesterPtcToMtcDefs all;
    import from UpperTesterFunctions all;

    // Lib_NG_NAS
@@ -593,14 +595,28 @@ module NGAP_Steps { // TODO FSCOM f_xxx_UE_SecurityMode to be mmoved into NAG_NG
                // call: the modem attaches/registers as a side effect of the call setup, which is what
                // f_await_registration_request below is waiting for. The call result itself is not
                // checked (NO_CNF_REQUIRED, the default of f_UT_RequestIMSCall), only the resulting NAS
                // signalling is -- but the modem restart and the PLMN selection ahead of it are waited on
                // (CNF_REQUIRED), so the IMS call is only placed once the modem is actually camped on the
                // intended PLMN.
                // signalling is -- but the modem restart and the PLMN selection ahead of it are both
                // waited on AND their result is checked (f_UT_RestartModem/f_UT_ManualPLMN_Select
                // themselves only wait, they never inspect Result -- see NGAP_UtProbe.ttcn
                // investigation), so a genuine AT+CFUN/AT+COPS failure stops here instead of silently
                // placing the call regardless.
                var UT_COMMON_CNF v_utCnf;

                log("f_NGAP_gnb_UE_Register: Restarting the modem");
                f_UT_RestartModem(utPtcMtcPort);
                v_utCnf := fl_UT_ApplyCommandRetCnf(utPtcMtcPort, cas_UT_Req(MODEM_RESTART, CNF_REQUIRED, {cs_Ut_Parameter_Common("CFUN", "1,1")}));
                if (not v_utCnf.Result) {
                    log("*** " & __SCOPE__ & ": FAIL: modem restart failed: ", v_utCnf.ResultString);
                    setverdict(fail, "*** " & __SCOPE__ & ": FAIL: modem restart failed");
                    return;
                }

                log("f_NGAP_gnb_UE_Register: Selecting PLMN manually: MCC=", PX_UT_PLMN_MCC, ", MNC=", PX_UT_PLMN_MNC);
                f_UT_ManualPLMN_Select(utPtcMtcPort, fl_NasNN_MCC2PlmnId(PX_UT_PLMN_MCC, PX_UT_PLMN_MNC), tsc_ManualPLMN_None, CNF_REQUIRED);
                v_utCnf := fl_UT_ApplyCommandRetCnf(utPtcMtcPort, cas_UT_Req(PLMN_MANUAL, CNF_REQUIRED, cs_ManualPlmn("\"" & f_ConvertPLMNtoString(fl_NasNN_MCC2PlmnId(PX_UT_PLMN_MCC, PX_UT_PLMN_MNC)) & "\"")));
                if (not v_utCnf.Result) {
                    log("*** " & __SCOPE__ & ": FAIL: manual PLMN selection failed: ", v_utCnf.ResultString);
                    setverdict(fail, "*** " & __SCOPE__ & ": FAIL: manual PLMN selection failed");
                    return;
                }

                log("f_NGAP_gnb_UE_Register: Requesting an IMS call to ", PX_UT_IMS_CALLEE_URI, " to trigger UE registration");
                f_UT_RequestIMSCall(utPtcMtcPort, PX_UT_IMS_CALLEE_URI);
+3 −1
Changes for ttcn/AtsNGAP/NGAP_UtProbe.ttcn: 3 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -117,7 +117,9 @@ module NGAP_UtProbe {
    function f_UT_ProbeRegisterSequence() runs on gNBNGAPComponent {
        var UT_COMMON_CNF v_cnf;

        f_UT_RestartModem(utPtcMtcPort);
        v_cnf := fl_UT_ApplyCommandRetCnf(utPtcMtcPort, cas_UT_Req(MODEM_RESTART, CNF_REQUIRED, {cs_Ut_Parameter_Common("CFUN", "1,1")}));
        log("MODEM_RESTART: ", v_cnf);
        if (not v_cnf.Result) { setverdict(fail); stop; }

        v_cnf := fl_UT_ApplyCommandRetCnf(utPtcMtcPort, cas_UT_Req(PLMN_MANUAL, CNF_REQUIRED, cs_ManualPlmn("\"" & f_ConvertPLMNtoString(fl_NasNN_MCC2PlmnId(PX_UT_PLMN_MCC, PX_UT_PLMN_MNC)) & "\"")));
        log("PLMN_MANUAL (MCC=", PX_UT_PLMN_MCC, ", MNC=", PX_UT_PLMN_MNC, "): ", v_cnf);