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

Commit 1acc63f9 authored by Etan Cohen's avatar Etan Cohen
Browse files

[VTS][NAN] Fix VTS tests: didn't abort early enough for non-NAN devices

The NAN-specific VTS tests check whether the device supports NAN.
However, the tests did not abort early enough.

Bug: 68302113
Test: builds
Change-Id: Ie6fb0e2b0bd12840ce6bc52fab1b6d4e8c5a571e
parent 6a8fab97
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -441,8 +441,8 @@ TEST_F(WifiChipHidlTest, RemoveApIface) {
 * succeeds. The 2nd iface creation should be rejected.
 */
TEST_F(WifiChipHidlTest, CreateNanIface) {
    configureChipForIfaceType(IfaceType::NAN, gEnv->isNanOn);
    if (!gEnv->isNanOn) return;
    configureChipForIfaceType(IfaceType::NAN, gEnv->isNanOn);

    sp<IWifiNanIface> iface;
    ASSERT_EQ(WifiStatusCode::SUCCESS, createNanIface(&iface));
@@ -458,8 +458,8 @@ TEST_F(WifiChipHidlTest, CreateNanIface) {
 * iface name is returned via the list.
 */
TEST_F(WifiChipHidlTest, GetNanIfaceNames) {
    configureChipForIfaceType(IfaceType::NAN, gEnv->isNanOn);
    if (!gEnv->isNanOn) return;
    configureChipForIfaceType(IfaceType::NAN, gEnv->isNanOn);

    const auto& status_and_iface_names1 =
        HIDL_INVOKE(wifi_chip_, getNanIfaceNames);
@@ -491,8 +491,8 @@ TEST_F(WifiChipHidlTest, GetNanIfaceNames) {
 * doesn't retrieve an iface object.
 */
TEST_F(WifiChipHidlTest, GetNanIface) {
    configureChipForIfaceType(IfaceType::NAN, gEnv->isNanOn);
    if (!gEnv->isNanOn) return;
    configureChipForIfaceType(IfaceType::NAN, gEnv->isNanOn);

    sp<IWifiNanIface> nan_iface;
    EXPECT_EQ(WifiStatusCode::SUCCESS, createNanIface(&nan_iface));
@@ -518,8 +518,8 @@ TEST_F(WifiChipHidlTest, GetNanIface) {
 * doesn't remove the iface.
 */
TEST_F(WifiChipHidlTest, RemoveNanIface) {
    configureChipForIfaceType(IfaceType::NAN, gEnv->isNanOn);
    if (!gEnv->isNanOn) return;
    configureChipForIfaceType(IfaceType::NAN, gEnv->isNanOn);

    sp<IWifiNanIface> nan_iface;
    EXPECT_EQ(WifiStatusCode::SUCCESS, createNanIface(&nan_iface));