summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Kline2017-10-20 03:08:38 -0500
committerErik Kline2017-10-20 04:33:40 -0500
commitd97f8714f07a762efe5a48747454fb4bdd51be8b (patch)
tree4150ce6834d03c194fd31c801c7413cb6d547d36 /tetheroffload
parenta555e04f8c37db86c5016218d5b7ab37cccc29c6 (diff)
downloadplatform-hardware-interfaces-d97f8714f07a762efe5a48747454fb4bdd51be8b.tar.gz
platform-hardware-interfaces-d97f8714f07a762efe5a48747454fb4bdd51be8b.tar.xz
platform-hardware-interfaces-d97f8714f07a762efe5a48747454fb4bdd51be8b.zip
Fixup netlink socket creation to make corresponding fix in JNI
Corresponding JNI fix is: aosp/516339 oc-mr1-dev:3102743 Test: as follows - built - flashed - booted - make vts -j30 BUILD_GOOGLE_VTS=true && \ vts-tradefed run commandAndExit vts --skip-all-system-status-check --primary-abi-only --skip-preconditions --module VtsHalTetherOffloadControlV1_0Target -l DEBUG 10-20 17:48:28 I/ResultReporter: Invocation finished in 5m 32s. PASSED: 38, FAILED: 0, MODULES: 1 of 1 Bug: 68018148 Change-Id: I5aa019d708abaff61387b83a857e9e8226709842
Diffstat (limited to 'tetheroffload')
-rw-r--r--tetheroffload/config/1.0/vts/functional/VtsHalTetheroffloadConfigV1_0TargetTest.cpp4
-rw-r--r--tetheroffload/control/1.0/vts/functional/VtsHalTetheroffloadControlV1_0TargetTest.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/tetheroffload/config/1.0/vts/functional/VtsHalTetheroffloadConfigV1_0TargetTest.cpp b/tetheroffload/config/1.0/vts/functional/VtsHalTetheroffloadConfigV1_0TargetTest.cpp
index 2cbe479d..bf211f0a 100644
--- a/tetheroffload/config/1.0/vts/functional/VtsHalTetheroffloadConfigV1_0TargetTest.cpp
+++ b/tetheroffload/config/1.0/vts/functional/VtsHalTetheroffloadConfigV1_0TargetTest.cpp
@@ -43,8 +43,8 @@ using android::sp;
43#define ASSERT_FALSE_CALLBACK \ 43#define ASSERT_FALSE_CALLBACK \
44 [&](bool success, const hidl_string& errMsg) { ASSERT_FALSE(success) << errMsg.c_str(); } 44 [&](bool success, const hidl_string& errMsg) { ASSERT_FALSE(success) << errMsg.c_str(); }
45 45
46const unsigned kFd1Groups = NFNLGRP_CONNTRACK_NEW | NFNLGRP_CONNTRACK_DESTROY; 46const unsigned kFd1Groups = NF_NETLINK_CONNTRACK_NEW | NF_NETLINK_CONNTRACK_DESTROY;
47const unsigned kFd2Groups = NFNLGRP_CONNTRACK_UPDATE | NFNLGRP_CONNTRACK_DESTROY; 47const unsigned kFd2Groups = NF_NETLINK_CONNTRACK_UPDATE | NF_NETLINK_CONNTRACK_DESTROY;
48 48
49inline const sockaddr* asSockaddr(const sockaddr_nl* nladdr) { 49inline const sockaddr* asSockaddr(const sockaddr_nl* nladdr) {
50 return reinterpret_cast<const sockaddr*>(nladdr); 50 return reinterpret_cast<const sockaddr*>(nladdr);
diff --git a/tetheroffload/control/1.0/vts/functional/VtsHalTetheroffloadControlV1_0TargetTest.cpp b/tetheroffload/control/1.0/vts/functional/VtsHalTetheroffloadControlV1_0TargetTest.cpp
index c009af5d..d572728e 100644
--- a/tetheroffload/control/1.0/vts/functional/VtsHalTetheroffloadControlV1_0TargetTest.cpp
+++ b/tetheroffload/control/1.0/vts/functional/VtsHalTetheroffloadControlV1_0TargetTest.cpp
@@ -131,7 +131,7 @@ class OffloadControlHidlTestBase : public testing::VtsHalHidlTargetTestBase {
131 config = testing::VtsHalHidlTargetTestBase::getService<IOffloadConfig>(); 131 config = testing::VtsHalHidlTargetTestBase::getService<IOffloadConfig>();
132 ASSERT_NE(nullptr, config.get()) << "Could not get HIDL instance"; 132 ASSERT_NE(nullptr, config.get()) << "Could not get HIDL instance";
133 133
134 unique_fd fd1(conntrackSocket(NFNLGRP_CONNTRACK_NEW | NFNLGRP_CONNTRACK_DESTROY)); 134 unique_fd fd1(conntrackSocket(NF_NETLINK_CONNTRACK_NEW | NF_NETLINK_CONNTRACK_DESTROY));
135 if (fd1.get() < 0) { 135 if (fd1.get() < 0) {
136 ALOGE("Unable to create conntrack handles: %d/%s", errno, strerror(errno)); 136 ALOGE("Unable to create conntrack handles: %d/%s", errno, strerror(errno));
137 FAIL(); 137 FAIL();
@@ -141,7 +141,7 @@ class OffloadControlHidlTestBase : public testing::VtsHalHidlTargetTestBase {
141 hidl_handle h1; 141 hidl_handle h1;
142 h1.setTo(nativeHandle1, true); 142 h1.setTo(nativeHandle1, true);
143 143
144 unique_fd fd2(conntrackSocket(NFNLGRP_CONNTRACK_UPDATE | NFNLGRP_CONNTRACK_DESTROY)); 144 unique_fd fd2(conntrackSocket(NF_NETLINK_CONNTRACK_UPDATE | NF_NETLINK_CONNTRACK_DESTROY));
145 if (fd2.get() < 0) { 145 if (fd2.get() < 0) {
146 ALOGE("Unable to create conntrack handles: %d/%s", errno, strerror(errno)); 146 ALOGE("Unable to create conntrack handles: %d/%s", errno, strerror(errno));
147 FAIL(); 147 FAIL();