From b887dedf99ab021118100bd1ffd0bf1cf3cb481d Mon Sep 17 00:00:00 2001 From: Roshan Pius Date: Fri, 2 Mar 2018 15:12:42 -0800 Subject: [PATCH] supplicant/hostapd(vts): Test for terminate This HIDL API is meant to terminate the HIDL service. On Pixel devices, terminate will trigger the death of the corresponding daemon. But, other OEM's may choose to do something else. Bug: 71613595 Bug: 71613528 Test: Ran the VTS tests Change-Id: I737458b5c49ecd5545be0dc7033092db9a35b089 --- wifi/hostapd/1.0/vts/functional/hostapd_hidl_test.cpp | 8 ++++++++ .../1.1/vts/functional/supplicant_hidl_test.cpp | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/wifi/hostapd/1.0/vts/functional/hostapd_hidl_test.cpp b/wifi/hostapd/1.0/vts/functional/hostapd_hidl_test.cpp index 5f51cfbd04..504f4c8d2b 100644 --- a/wifi/hostapd/1.0/vts/functional/hostapd_hidl_test.cpp +++ b/wifi/hostapd/1.0/vts/functional/hostapd_hidl_test.cpp @@ -220,3 +220,11 @@ TEST_F(HostapdHidlTest, AddInvalidPskAccessPointWithoutAcs) { getInvalidPskNwParams()); EXPECT_NE(HostapdStatusCode::SUCCESS, status.code); } + +/* + * Terminate + * This terminates the service. + */ +TEST_F(HostapdHidlTest, Terminate) { + hostapd_->terminate(); +} diff --git a/wifi/supplicant/1.1/vts/functional/supplicant_hidl_test.cpp b/wifi/supplicant/1.1/vts/functional/supplicant_hidl_test.cpp index c29fd0a9ce..7e773d611e 100644 --- a/wifi/supplicant/1.1/vts/functional/supplicant_hidl_test.cpp +++ b/wifi/supplicant/1.1/vts/functional/supplicant_hidl_test.cpp @@ -137,3 +137,11 @@ TEST_F(SupplicantHidlTest, RemoveP2pInterface) { EXPECT_EQ(SupplicantStatusCode::SUCCESS, status.code); }); } + +/* + * Terminate + * This terminates the service. + */ +TEST_F(SupplicantHidlTest, Terminate) { + supplicant_->terminate(); +}