diff options
| author | 2023-11-14 17:41:52 +0000 | |
|---|---|---|
| committer | 2023-11-14 17:41:52 +0000 | |
| commit | 13a390c9364dbf73adb9497de8942a5b6da96b97 (patch) | |
| tree | 747dce40597aed8bd1de84fbe06bdc431707d03c | |
| parent | 01205466ce2250463ade159bad8c943830f9a7f0 (diff) | |
| parent | 050c801a2ffda9064cdb5b382a98f3af17b777db (diff) | |
Merge "Binder RPC test: check execl return status" into main am: 050c801a2f
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2828631
Change-Id: I8aff7122a704d99616acb7969e4d16b73a102249
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| -rw-r--r-- | libs/binder/Utils.h | 2 | ||||
| -rw-r--r-- | libs/binder/tests/binderRpcTest.cpp | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/libs/binder/Utils.h b/libs/binder/Utils.h index b8aaf67552..eec09eb859 100644 --- a/libs/binder/Utils.h +++ b/libs/binder/Utils.h @@ -14,6 +14,8 @@ * limitations under the License. */ +#pragma once + #include <stddef.h> #include <sys/uio.h> #include <cstdint> diff --git a/libs/binder/tests/binderRpcTest.cpp b/libs/binder/tests/binderRpcTest.cpp index b86eb94928..8e42ec2684 100644 --- a/libs/binder/tests/binderRpcTest.cpp +++ b/libs/binder/tests/binderRpcTest.cpp @@ -287,8 +287,10 @@ std::unique_ptr<ProcessSession> BinderRpc::createRpcTestSocketServerProcessEtc( auto writeFd = std::to_string(writeEnd.get()); auto readFd = std::to_string(readEnd.get()); - execl(servicePath.c_str(), servicePath.c_str(), writeFd.c_str(), readFd.c_str(), - NULL); + auto status = execl(servicePath.c_str(), servicePath.c_str(), writeFd.c_str(), + readFd.c_str(), NULL); + PLOGF("execl('%s', _, %s, %s) should not return at all, but it returned %d", + servicePath.c_str(), writeFd.c_str(), readFd.c_str(), status); })); BinderRpcTestServerConfig serverConfig; |