liblog: require root for multi_connect_dgram_socket test
Bug: 65062446 Test: multi_connect_dgram_socket is skipped for non-root Test: multi_connect_dgram_socket passes for root Change-Id: I610bed5987580e0c5a01952efc2e32e7d8cdf9b4
This commit is contained in:
parent
1a342a12f3
commit
710825ce47
1 changed files with 4 additions and 0 deletions
|
@ -29,6 +29,10 @@ using android::base::unique_fd;
|
|||
// socket. This tests for that behavior.
|
||||
TEST(liblog, multi_connect_dgram_socket) {
|
||||
#ifdef __ANDROID__
|
||||
if (getuid() != 0) {
|
||||
GTEST_SKIP() << "Skipping test, must be run as root.";
|
||||
return;
|
||||
}
|
||||
auto temp_dir = TemporaryDir();
|
||||
auto socket_path = StringPrintf("%s/test_socket", temp_dir.path);
|
||||
|
||||
|
|
Loading…
Reference in a new issue