Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 70805cff authored by sqian's avatar sqian Committed by Shuo Qian
Browse files

Add NONE for LceService

"Allow startLceService to succeed even in the
SIM_ABSENT case. The original RIL documentation
states that SUCCESS is valid for all LCE
operations, and there is no logical reason why
one of these operations must fail in a no-SIM
case (though a vendor may choose not to support
that configuration). Thus, a call to
startLceService should permit NONE when requested
in the no-SIM case for 1.0 VTS.

In addition, a successful call to startLceService
should also permit a successful call to
pullLceData, so also allow RadioError::NONE for
the pull operation. Ideally the tests would only
allow NONE for pull if startLceService also
returns NONE, but that's out of scope for now."

Bug: 110181475
Bug: 72075328
Test: confirmed in the discussion; compilation
parent ab2b8bf9
Loading
Loading
Loading
Loading
+6 −8
Original line number Diff line number Diff line
@@ -687,11 +687,11 @@ TEST_F(RadioHidlTest, startLceService) {

    if (cardStatus.cardState == CardState::ABSENT) {
        std::cout << static_cast<int>(radioRsp->rspInfo.error) << std::endl;
        ASSERT_TRUE(radioRsp->rspInfo.error ==
                        RadioError::RADIO_NOT_AVAILABLE ||
        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::RADIO_NOT_AVAILABLE ||
                    radioRsp->rspInfo.error == RadioError::LCE_NOT_SUPPORTED ||
                    radioRsp->rspInfo.error == RadioError::INTERNAL_ERR ||
                    radioRsp->rspInfo.error == RadioError::SIM_ABSENT);
                    radioRsp->rspInfo.error == RadioError::SIM_ABSENT ||
                    radioRsp->rspInfo.error == RadioError::NONE);
    }
}

@@ -709,8 +709,7 @@ TEST_F(RadioHidlTest, stopLceService) {
    if (cardStatus.cardState == CardState::ABSENT) {
        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
                    radioRsp->rspInfo.error == RadioError::LCE_NOT_SUPPORTED ||
                    radioRsp->rspInfo.error ==
                        RadioError::REQUEST_NOT_SUPPORTED ||
                    radioRsp->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED ||
                    radioRsp->rspInfo.error == RadioError::SIM_ABSENT);
    }
}
@@ -727,10 +726,9 @@ TEST_F(RadioHidlTest, pullLceData) {
    EXPECT_EQ(serial, radioRsp->rspInfo.serial);

    if (cardStatus.cardState == CardState::ABSENT) {
        ASSERT_TRUE(radioRsp->rspInfo.error ==
                        RadioError::RADIO_NOT_AVAILABLE ||
                    CheckOEMError() ||
        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::RADIO_NOT_AVAILABLE || CheckOEMError() ||
                    radioRsp->rspInfo.error == RadioError::INTERNAL_ERR ||
                    radioRsp->rspInfo.error == RadioError::NONE ||
                    radioRsp->rspInfo.error == RadioError::SIM_ABSENT);
    }
}