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

Commit 0c831fc9 authored by Gustavo Padovan's avatar Gustavo Padovan Committed by android-build-merger
Browse files

libsync: tests: remove WaitOnDestroyedTimeline test am: e4682802 am: 26df302b

am: 9445716a

Change-Id: I90fc2f18efbb5c1b739af5a212ec03b1071529b2
parents 4bd5f18f 9445716a
Loading
Loading
Loading
Loading
+0 −27
Original line number Diff line number Diff line
@@ -348,33 +348,6 @@ TEST(FenceTest, MergeSameFence) {
    ASSERT_EQ(selfMergeFence.getSignaledCount(), 1);
}

TEST(FenceTest, WaitOnDestroyedTimeline) {
    SyncTimeline timeline;
    ASSERT_TRUE(timeline.isValid());

    SyncFence fenceSig(timeline, 100);
    SyncFence fenceKill(timeline, 200);

    // Spawn a thread to wait on a fence when the timeline is killed.
    thread waitThread{
        [&]() {
            ASSERT_EQ(timeline.inc(100), 0);

            ASSERT_EQ(fenceKill.wait(-1), -1);
            ASSERT_EQ(errno, ENOENT);
        }
    };

    // Wait for the thread to spool up.
    fenceSig.wait();

    // Kill the timeline.
    timeline.destroy();

    // wait for the thread to clean up.
    waitThread.join();
}

TEST(FenceTest, PollOnDestroyedTimeline) {
    SyncTimeline timeline;
    ASSERT_TRUE(timeline.isValid());