Opened 2 years ago

Last modified 21 months ago

#5266 new defect

Can't run tests on arm64 device/emulator

Reported by: asmirnov Assignee:
Priority: P4 Milestone:
Module: Libadblockplus-Android Keywords:
Cc: sergz Blocked By: #5267, #5473
Blocking: Platform: Android
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description

Environment

We're having precompiled 32 bit libadblockplus binaries in https://hg.adblockplus.org/libadblockplus-binaries repo for armeabi-v7a and x86. libadblockplus-android module uses it and provides libadblockplus-jni.so that is used by both libadblockplus-android-tests and libadblockplus-webviewapp modules.

However, one can run webviewapp on 64 bit device (arm64) but can't run tests on 64 bit device/emulator with the following error:

java.lang.UnsatisfiedLinkError: dlopen failed: "/data/app/org.adblockplus.libadblockplus.tests.test-1/lib/arm/libadblockplus-jni.so" is 32-bit instead of 64-bit
at java.lang.Runtime.loadLibrary0(Runtime.java:977)
at java.lang.System.loadLibrary(System.java:1530)
at org.adblockplus.libadblockplus.JsEngine.<clinit>(JsEngine.java:29)
at org.adblockplus.libadblockplus.tests.BaseJsTest.setUp(BaseJsTest.java:36)
at org.adblockplus.libadblockplus.tests.FilterEngineGenericTest.setUp(FilterEngineGenericTest.java:97)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:198)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:183)
at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:560)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1939)

How to reproduce

  1. attach arm64 device or emulator
  2. run any test
  3. make sure the test crashes

...

Observed behaviour

crash while loading native library

Expected behaviour

native code is loaded and the tests are running

Change History (4)

comment:1 Changed 2 years ago by asmirnov

  • Ready set

comment:2 Changed 2 years ago by asmirnov

I've tried it in Android Studio 2.1, 2.2.3 and 2.3.2 to exclude IDE issue

comment:3 Changed 2 years ago by sergz

  • Blocked By 5267 added

comment:4 Changed 21 months ago by sergz

  • Blocked By 5473 added
Note: See TracTickets for help on using tickets.