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

Commit aaa3c24f authored by Miao Wang's avatar Miao Wang
Browse files

Update VTS tests for executeFenced

 - Remove the DEVICE_UNAVAILABLE check
 - Pass deadline down to the driver.

Bug: 148979873
Test: mm
Test: VtsHalNeuralnetworksV1_3TargetTest
Change-Id: If90a0dce8c8907a2f8f806455074fa27e3f397ef
Merged-In: If90a0dce8c8907a2f8f806455074fa27e3f397ef
(cherry picked from commit 15a25f6e)
parent cc18d3fe
Loading
Loading
Loading
Loading
+8 −10
Original line number Diff line number Diff line
@@ -142,13 +142,11 @@ static void validate(const sp<IPreparedModel>& preparedModel, const std::string&
    // dispatch
    {
        SCOPED_TRACE(message + " [executeFenced]");
        Return<void> ret = preparedModel->executeFenced(
                request, {}, MeasureTiming::NO, {}, {},
        Return<void> ret =
                preparedModel->executeFenced(request, {}, MeasureTiming::NO, deadline, {},
                                             [](ErrorStatus error, const hidl_handle& handle,
                                                const sp<IFencedExecutionCallback>& callback) {
                    if (error != ErrorStatus::DEVICE_UNAVAILABLE) {
                                                 ASSERT_EQ(ErrorStatus::INVALID_ARGUMENT, error);
                    }
                                                 ASSERT_EQ(handle.getNativeHandle(), nullptr);
                                                 ASSERT_EQ(callback, nullptr);
                                             });
+1 −4
Original line number Diff line number Diff line
@@ -140,10 +140,7 @@ void validateExecuteFenced(const sp<IPreparedModel>& preparedModel, const Reques
            request, {hidl_handle(nullptr)}, V1_2::MeasureTiming::NO, {}, {},
            [](ErrorStatus error, const hidl_handle& handle,
               const sp<IFencedExecutionCallback>& callback) {
                // TODO: fix this once sample driver impl is merged.
                if (error != ErrorStatus::DEVICE_UNAVAILABLE) {
                ASSERT_EQ(ErrorStatus::INVALID_ARGUMENT, error);
                }
                ASSERT_EQ(handle.getNativeHandle(), nullptr);
                ASSERT_EQ(callback, nullptr);
            });