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: Alice Ryhl <aliceryhl@google.com>
diff --git a/libs/binder/tests/binderLibTest.cpp b/libs/binder/tests/binderLibTest.cpp
index 2cea14f..1f61f18 100644
--- a/libs/binder/tests/binderLibTest.cpp
+++ b/libs/binder/tests/binderLibTest.cpp
@@ -506,10 +506,11 @@
 
     // 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));