Merge "ConnectivityNativeBinderTest: Check Kernel Version" am: 76ff404153
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2068647 Change-Id: I4ea413a038aca1a4ab9704153bf2d9c8fa75bdcc Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
100fa4f809
1 changed files with 8 additions and 3 deletions
|
|
@ -14,14 +14,15 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <aidl/android/net/connectivity/aidl/ConnectivityNative.h>
|
||||
#include <android/binder_manager.h>
|
||||
#include <android/binder_process.h>
|
||||
#include <android-modules-utils/sdk_level.h>
|
||||
#include <cutils/misc.h> // FIRST_APPLICATION_UID
|
||||
#include <gtest/gtest.h>
|
||||
#include <netinet/in.h>
|
||||
#include <android/binder_manager.h>
|
||||
#include <android/binder_process.h>
|
||||
|
||||
#include <aidl/android/net/connectivity/aidl/ConnectivityNative.h>
|
||||
#include "bpf/BpfUtils.h"
|
||||
|
||||
using aidl::android::net::connectivity::aidl::IConnectivityNative;
|
||||
|
||||
|
|
@ -40,6 +41,10 @@ class ConnectivityNativeBinderTest : public ::testing::Test {
|
|||
if (!android::modules::sdklevel::IsAtLeastT()) GTEST_SKIP() <<
|
||||
"Should be at least T device.";
|
||||
|
||||
// Skip test case if not on 5.4 kernel which is required by bpf prog.
|
||||
if (!android::bpf::isAtLeastKernelVersion(5, 4, 0)) GTEST_SKIP() <<
|
||||
"Kernel should be at least 5.4.";
|
||||
|
||||
ASSERT_NE(nullptr, mService.get());
|
||||
|
||||
// If there are already ports being blocked on device unblockAllPortsForBind() store
|
||||
|
|
|
|||
Loading…
Reference in a new issue