KhronosGroup / OpenXR-CTS

Conformance test suite for OpenXR

Home Page:https://www.khronos.org/conformance/adopters/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

can not running tests in Android

wanhex opened this issue · comments

hi:

I use OpenXR-SDK-Source + RuntimeBroker + Monado
to build 3 apks successfully, then I build hello_xr apk in OpenXR-SDK-Source , hello_xr apk can run correctly.

I want to do openxr-cts to test the monado runtime. but it can not run tests, it seems it blocked by calling xrDestroyInstance in AutoBasicInstance::~AutoBasicInstance(), it called in conformance_framework.cpp's GlobalData::Initialize(), at the end of this function, it will destory autoInstance, autoInstance is a instance of class AutoBasicInstance.

the branch I used:

  1. monado: main
  2. OpenXR-CTS: devel
  3. OpenXR-SDK-Source: master

steps I build a OpenXR-CTS apk:

  1. after git clone the OpenXR-CTS, I copy OpenXR-CTS/src/conformance directory to OpenXR-SDK-Source/src,
  2. then copy some missing scripts in OpenXR-CTS/src/scripts/ to OpenXR-CTS/src/scripts/ to OpenXR-SDK-Source/src/scripts/,
  3. then copy OpenXR-CTS/src/external/catch2 and OpenXR-CTS/src/external/stb to OpenXR-SDK-Source/src/external/.
  4. then edit the src/conformance/build.gradle to remove the line of "apply from: file('../version.gradle')", set versionName to 1.0, set versionCode to 1 manually.

after do that , I can get a openxr-cts apk, after install and run it, it logs:

2021-12-17 23:41:32.367 17522-17605/com.khronos.openxr.cts V/OpenXR_Conformance: ----------------------------------------------------------------
2021-12-17 23:41:32.367 17522-17605/com.khronos.openxr.cts V/OpenXR_Conformance: android_app_entry()
2021-12-17 23:41:32.367 17522-17605/com.khronos.openxr.cts V/OpenXR_Conformance:     android_main()
2021-12-17 23:41:32.379 17522-17605/com.khronos.openxr.cts V/OpenXR-Loader: Verbose [GENERAL | xrInitializeLoaderKHR | OpenXR-Loader] : Entering loader trampoline
2021-12-17 23:41:32.381 17522-17605/com.khronos.openxr.cts V/OpenXR_Conformance: ### Exception Test: - before throw...
2021-12-17 23:41:32.383 17522-17605/com.khronos.openxr.cts V/OpenXR_Conformance: ### Exception Test: caught - `### Exception Test DONE ###`
2021-12-17 23:41:32.384 17522-17522/com.khronos.openxr.cts V/threaded_app: Start: 0x72300ed100
2021-12-17 23:41:32.384 17522-17605/com.khronos.openxr.cts V/threaded_app: activityState=10
2021-12-17 23:41:32.384 17522-17605/com.khronos.openxr.cts V/OpenXR_Conformance:     APP_CMD_START
2021-12-17 23:41:32.391 17522-17522/com.khronos.openxr.cts V/threaded_app: Resume: 0x72300ed100
2021-12-17 23:41:32.391 17522-17605/com.khronos.openxr.cts V/threaded_app: activityState=11
2021-12-17 23:41:32.391 17522-17605/com.khronos.openxr.cts V/OpenXR_Conformance:     APP_CMD_RESUME
2021-12-17 23:41:32.431 17522-17522/com.khronos.openxr.cts V/threaded_app: InputQueueCreated: 0x72300ed100 -- 0x72300ed380
2021-12-17 23:41:32.431 17522-17605/com.khronos.openxr.cts V/threaded_app: APP_CMD_INPUT_CHANGED
2021-12-17 23:41:32.431 17522-17605/com.khronos.openxr.cts V/threaded_app: Attaching input queue to looper
2021-12-17 23:41:32.472 17522-17522/com.khronos.openxr.cts V/threaded_app: NativeWindowCreated: 0x72300ed100 -- 0x7230182010
2021-12-17 23:41:32.473 17522-17605/com.khronos.openxr.cts V/threaded_app: APP_CMD_INIT_WINDOW
2021-12-17 23:41:32.473 17522-17605/com.khronos.openxr.cts V/OpenXR_Conformance:     APP_CMD_INIT_WINDOW
2021-12-17 23:41:32.475 17522-17606/com.khronos.openxr.cts V/OpenXR_Conformance: AttachCurrentThread
2021-12-17 23:41:32.476 17522-17606/com.khronos.openxr.cts V/OpenXR_Conformance: ... begin conformance test ...
2021-12-17 23:41:32.476 17522-17606/com.khronos.openxr.cts V/OpenXR_Conformance: arg[0] = OpenXR_Conformance_Test_Android
2021-12-17 23:41:32.476 17522-17606/com.khronos.openxr.cts V/OpenXR_Conformance: arg[1] = -G
2021-12-17 23:41:32.476 17522-17606/com.khronos.openxr.cts V/OpenXR_Conformance: arg[2] = OpenGLES
2021-12-17 23:41:32.476 17522-17606/com.khronos.openxr.cts V/OpenXR_Conformance: arg[3] = --use-colour
2021-12-17 23:41:32.476 17522-17606/com.khronos.openxr.cts V/OpenXR_Conformance: arg[4] = no
2021-12-17 23:41:32.476 17522-17606/com.khronos.openxr.cts V/OpenXR_Conformance: arg[5] = --reporter
2021-12-17 23:41:32.476 17522-17606/com.khronos.openxr.cts V/OpenXR_Conformance: arg[6] = console
2021-12-17 23:41:32.478 17522-17606/com.khronos.openxr.cts V/OpenXR_Conformance: *********************************************
2021-12-17 23:41:32.478 17522-17606/com.khronos.openxr.cts V/OpenXR_Conformance: OpenXR Conformance Test v1.0.20
2021-12-17 23:41:32.478 17522-17606/com.khronos.openxr.cts V/OpenXR_Conformance: *********************************************
2021-12-17 23:41:32.478 17522-17522/com.khronos.openxr.cts V/threaded_app: WindowFocusChanged: 0x72300ed100 -- 1
2021-12-17 23:41:32.479 17522-17606/com.khronos.openxr.cts V/OpenXR_Conformance: AndroidApplicationVM = 0x72c65f7380
2021-12-17 23:41:32.479 17522-17606/com.khronos.openxr.cts V/OpenXR_Conformance: AndroidApplicationActivity = 0x2822
2021-12-17 23:41:32.479 17522-17606/com.khronos.openxr.cts V/OpenXR-Loader: Verbose [GENERAL | xrEnumerateApiLayerProperties | OpenXR-Loader] : Entering loader trampoline
2021-12-17 23:41:32.479 17522-17606/com.khronos.openxr.cts V/OpenXR-Loader: Verbose [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : Entering loader trampoline
2021-12-17 23:41:32.483 17522-17606/com.khronos.openxr.cts I/openxr_loader: getActiveRuntimeCursor: Querying URI: content://org.khronos.openxr.runtime_broker/openxr/1/abi/arm64-v8a/runtimes/active/0
2021-12-17 23:41:32.717 17522-17606/com.khronos.openxr.cts I/OpenXR-Loader: Got runtime: package: org.freedesktop.monado.openxr_runtime.in_process, so filename: /data/app/org.freedesktop.monado.openxr_runtime.in_process-0QxY5C07-4ZsWTSZa33Q-g==/lib/arm64, native lib dir: libopenxr_monado.so, has functions: no
2021-12-17 23:41:33.178 17522-17606/com.khronos.openxr.cts I/OpenXR-Loader: Info [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : RuntimeInterface::LoadRuntime forwarding xrInitializeLoaderKHR call to runtime after calling xrNegotiateLoaderRuntimeInterface.
2021-12-17 23:41:33.179 17522-17606/com.khronos.openxr.cts I/OpenXR-Loader: Info [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : RuntimeInterface::LoadRuntime succeeded loading runtime defined in manifest file  using interface version 1 and OpenXR API version 1.0
2021-12-17 23:41:33.179 17522-17606/com.khronos.openxr.cts V/OpenXR-Loader: Verbose [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : Completed loader trampoline
2021-12-17 23:41:33.180 17522-17606/com.khronos.openxr.cts V/OpenXR-Loader: Verbose [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : Entering loader trampoline
2021-12-17 23:41:33.180 17522-17606/com.khronos.openxr.cts V/OpenXR-Loader: Verbose [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : Completed loader trampoline
2021-12-17 23:41:33.180 17522-17606/com.khronos.openxr.cts V/OpenXR-Loader: Verbose [GENERAL | xrCreateInstance | OpenXR-Loader] : Entering loader trampoline
2021-12-17 23:41:33.181 17522-17606/com.khronos.openxr.cts V/OpenXR-Loader: Verbose [GENERAL | xrCreateInstance | OpenXR-Loader] : Entering LoaderInstance::CreateInstance
2021-12-17 23:41:33.181 17522-17606/com.khronos.openxr.cts V/OpenXR-Loader: Verbose [GENERAL | xrCreateInstance | OpenXR-Loader] : Entering loader terminator
2021-12-17 23:41:33.498 17522-17606/com.khronos.openxr.cts D/xrt_gfx_provider_create_system: Doing init 0x71d556c800
2021-12-17 23:41:33.869 17522-17606/com.khronos.openxr.cts D/vulkan: searching for layers in '/data/app/com.khronos.openxr.cts-bUtDhjHI14PBYRvSwVS6Aw==/lib/arm64'
2021-12-17 23:41:33.870 17522-17606/com.khronos.openxr.cts D/vulkan: searching for layers in '/data/app/com.khronos.openxr.cts-bUtDhjHI14PBYRvSwVS6Aw==/base.apk!/lib/arm64-v8a'
2021-12-17 23:41:33.834 17522-17522/com.khronos.openxr.cts W/Thread-4: type=1400 audit(0.0:530): avc: granted { read } for name="u:object_r:net_dns_prop:s0" dev="tmpfs" ino=3901 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:net_dns_prop:s0 tclass=file app=com.khronos.openxr.cts
2021-12-17 23:41:34.101 17522-17606/com.khronos.openxr.cts I/AdrenoVK: QUALCOMM build          : 2d5b8fa, I57cbb7a178
    Build Date              : 12/04/19
    Shader Compiler Version : EV031.27.05.03
    Local Branch            : mybranchea165fe9-f4f3-f147-8a0b-1458d0b52ae8
    Remote Branch           : quic/gfx-adreno.lnx.1.0.r72-rel
    Remote Branch           : NONE
    Reconstruct Branch      : NOTHING
2021-12-17 23:41:34.101 17522-17606/com.khronos.openxr.cts I/AdrenoVK: Build Config            : S P 8.0.12 AArch64
2021-12-17 23:41:34.133 17522-17606/com.khronos.openxr.cts I/create_device: Created device and graphics queue with high priority.
2021-12-17 23:41:34.148 17522-17606/com.khronos.openxr.cts I/MonadoView: Starting to add a new surface!
2021-12-17 23:41:34.150 17522-17522/com.khronos.openxr.cts I/MonadoView: Starting runOnUiThread
2021-12-17 23:41:34.210 17522-17522/com.khronos.openxr.cts I/MonadoView: Registered callbacks!
2021-12-17 23:41:34.256 17522-17602/com.khronos.openxr.cts I/AdrenoGLES: QUALCOMM build                   : 2d5b8fa, I57cbb7a178
    Build Date                       : 12/04/19
    OpenGL ES Shader Compiler Version: EV031.27.05.03
    Local Branch                     : mybranchea165fe9-f4f3-f147-8a0b-1458d0b52ae8
    Remote Branch                    : quic/gfx-adreno.lnx.1.0.r72-rel
    Remote Branch                    : NONE
    Reconstruct Branch               : NOTHING
2021-12-17 23:41:34.256 17522-17602/com.khronos.openxr.cts I/AdrenoGLES: Build Config                     : S P 8.0.12 AArch64
2021-12-17 23:41:34.259 17522-17602/com.khronos.openxr.cts I/AdrenoGLES: PFP: 0x016ee187, ME: 0x00000000
2021-12-17 23:41:34.274 17522-17522/com.khronos.openxr.cts I/MonadoView: surfaceCreated: Got a surface holder!
2021-12-17 23:41:34.274 17522-17522/com.khronos.openxr.cts I/MonadoView: surfaceChanged
2021-12-17 23:41:34.274 17522-17522/com.khronos.openxr.cts I/MonadoView: surfaceRedrawNeeded
2021-12-17 23:41:34.322 17522-17602/com.khronos.openxr.cts W/Gralloc3: mapper 3.x is not supported
2021-12-17 23:41:34.444 17522-17606/com.khronos.openxr.cts V/OpenXR-Loader: Verbose [GENERAL | xrCreateInstance | OpenXR-Loader] : Completed loader terminator
2021-12-17 23:41:34.444 17522-17606/com.khronos.openxr.cts I/OpenXR-Loader: Info [GENERAL | xrCreateInstance | OpenXR-Loader] : LoaderInstance::CreateInstance succeeded with 0 layers enabled and runtime interface - created instance = 0x00000071d55bac00
2021-12-17 23:41:34.444 17522-17606/com.khronos.openxr.cts V/OpenXR-Loader: Verbose [GENERAL | xrCreateInstance | OpenXR-Loader] : Completed loader trampoline
2021-12-17 23:41:34.445 17522-17606/com.khronos.openxr.cts V/OpenXR-Loader: Verbose [GENERAL | xrDestroyInstance | OpenXR-Loader] : Entering loader trampoline
2021-12-17 23:41:34.445 17522-17606/com.khronos.openxr.cts V/OpenXR-Loader: Verbose [GENERAL | xrDestroyInstance | OpenXR-Loader] : Entering loader terminator`

it stop exec tests case, because it blocked by xrDestroyInstance function call, I make a breakpoint to prove that.

I am not found some docs to build openxr-cts apk, so all the steps above may has something wrong to block the cts tests.

so, is that any steps to build openxr-cts apk has something wrong?

An issue (number 1644) has been filed to correspond to this issue in the internal Khronos GitLab (Khronos members only: KHR:openxr/openxr#1644 ), to facilitate working group processes.

This GitHub issue will continue to be the main site of discussion.

I can't quite understand your build instructions: none of that should be neccessary, though I am aware of some build issues with 1.0.20. 1.0.21 should fix those build issues, though there is still some changes (mostly related to bundling/using assets) that aren't merged because I'm waiting on Working Group approval for them.

I guess I haven't checked to see that error myself, I haven't run Monado on Android with the CTS recently except for a single interactive composition test (to test the asset-bundling changes).

I think the 1.0.22.1 release should have fixed the build issues you noted. Can you test again?

1.0.25 now includes the conformance layer in the APK as well, so you should not need any system changes to pass conformance. If you're still having problems, please open a new issue.