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

Commit f0d8a1a2 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Minor style fixes for IDumpstateDevice@1.1 VTS test" am: 60cbc455 am:...

Merge "Minor style fixes for IDumpstateDevice@1.1 VTS test" am: 60cbc455 am: 3d1ccc2f am: bb79986c

Change-Id: Ib96be557aecbe777fc7b5d0f8334d8787865fbb2
parents 8852f071 bb79986c
Loading
Loading
Loading
Loading
+6 −1
Original line number Original line Diff line number Diff line
@@ -18,6 +18,7 @@


#include <fcntl.h>
#include <fcntl.h>
#include <unistd.h>
#include <unistd.h>

#include <vector>
#include <vector>


#include <android/hardware/dumpstate/1.1/IDumpstateDevice.h>
#include <android/hardware/dumpstate/1.1/IDumpstateDevice.h>
@@ -28,6 +29,8 @@
#include <hidl/ServiceManagement.h>
#include <hidl/ServiceManagement.h>
#include <log/log.h>
#include <log/log.h>


namespace {

using ::android::sp;
using ::android::sp;
using ::android::hardware::Return;
using ::android::hardware::Return;
using ::android::hardware::dumpstate::V1_1::DumpstateMode;
using ::android::hardware::dumpstate::V1_1::DumpstateMode;
@@ -55,7 +58,7 @@ class DumpstateHidl1_1Test : public ::testing::TestWithParam<std::string> {
    TEST_FOR_DUMPSTATE_MODE(name, body, WIFI);         \
    TEST_FOR_DUMPSTATE_MODE(name, body, WIFI);         \
    TEST_FOR_DUMPSTATE_MODE(name, body, DEFAULT);
    TEST_FOR_DUMPSTATE_MODE(name, body, DEFAULT);


const uint64_t kDefaultTimeoutMillis = 30 * 1000;  // 30 seconds
constexpr uint64_t kDefaultTimeoutMillis = 30 * 1000;  // 30 seconds


// Negative test: make sure dumpstateBoard() doesn't crash when passed a null pointer.
// Negative test: make sure dumpstateBoard() doesn't crash when passed a null pointer.
TEST_FOR_ALL_DUMPSTATE_MODES(TestNullHandle, [this](DumpstateMode mode) {
TEST_FOR_ALL_DUMPSTATE_MODES(TestNullHandle, [this](DumpstateMode mode) {
@@ -169,3 +172,5 @@ INSTANTIATE_TEST_SUITE_P(
        PerInstance, DumpstateHidl1_1Test,
        PerInstance, DumpstateHidl1_1Test,
        testing::ValuesIn(android::hardware::getAllHalInstanceNames(IDumpstateDevice::descriptor)),
        testing::ValuesIn(android::hardware::getAllHalInstanceNames(IDumpstateDevice::descriptor)),
        android::hardware::PrintInstanceNameToString);
        android::hardware::PrintInstanceNameToString);

}  // namespace