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

Commit 4634c90b authored by Alice Ryhl's avatar Alice Ryhl
Browse files

binderLibTest: catch binder driver with reversed freezing



This catches the Rust Binder bug that is being fixed by aosp/3037496.

Previously, this test would just get skipped since Rust Binder returned
-EAGAIN on this call. The correct error code for the ioctl being
unsupported is -EINVAL.

Test: Ran test with Rust Binder with and without fix
Test: Ran test with C Binder and it still passes
Change-Id: I6f8b7721e6769053062183710ae81e890fd794bb
Signed-off-by: default avatarAlice Ryhl <aliceryhl@google.com>
parent ab2daeca
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -506,10 +506,11 @@ TEST_F(BinderLibTest, Freeze) {

    // Pass test on devices where BINDER_FREEZE ioctl is not supported
    int ret = IPCThreadState::self()->freeze(pid, false, 0);
    if (ret != 0) {
    if (ret == -EINVAL) {
        GTEST_SKIP();
        return;
    }
    EXPECT_EQ(NO_ERROR, ret);

    EXPECT_EQ(-EAGAIN, IPCThreadState::self()->freeze(pid, true, 0));