CtsDeqpTestCases fail

Suite / Plan:VTS / cts-on-gsi
Suite / Build: 8.1_R4 / 4766758
test_result_failures.html显示:
dEQP-GLES3.functional.shaders.declarations.invalid_declarations#uniform_block_in_vertex
fail
=== with config {glformat=rgba8888d24s8ms0,rotation=unspecified,surfacetype=window,required=true} ===
dEQP-GLES3.functional.shaders.large_constant_arrays.indexing#float_128_fragment
fail
=== with config {glformat=rgba8888d24s8ms0,rotation=unspecified,surfacetype=window,required=true} ===
dEQP-GLES3.functional.shaders.large_constant_arrays.indexing#float_128_vertex
fail
=== with config {glformat=rgba8888d24s8ms0,rotation=unspecified,surfacetype=window,required=true} ===
dEQP-GLES3.functional.shaders.large_constant_arrays.indexing#float_16_fragment
fail
=== with config {glformat=rgba8888d24s8ms0,rotation=unspecified,surfacetype=window,required=true} ===

host log显示:
07-24 01:45:25 D/ModuleListener: ModuleListener.testStarted(dEQP-VK.info#build)
07-24 01:45:25 D/ModuleListener: ModuleListener.testFailed(dEQP-VK.info#build, === with config {glformat=,rotation=unspecified,surfacetype=window,required=false} ===
Abort: Test cannot be executed)
07-24 01:45:25 I/ConsoleReporter: [1/227456 armeabi-v7a CtsDeqpTestCases 620191] dEQP-VK.info#build fail: === with config {glformat=,rotation=unspecified,surfacetype=window,required=false} ===
Abort: Test cannot be executed
07-24 01:45:25 I/FailureListener: FailureListener.testFailed dEQP-VK.info#build false false false
07-24 01:45:25 D/ModuleListener: ModuleListener.testEnded(dEQP-VK.info#build, {})
07-24 01:45:25 D/ddms: Reading file permision of /tmp/temp573772372853853837.txt as: rw-rw-r--
07-24 01:45:33 D/ModuleListener: ModuleListener.testStarted(dEQP-VK.info#device)
07-24 01:45:33 D/ModuleListener: ModuleListener.testFailed(dEQP-VK.info#device, === with config {glformat=,rotation=unspecified,surfacetype=window,required=false} ===
Abort: Test cannot be executed)
07-24 01:45:33 I/ConsoleReporter: [2/227456 armeabi-v7a CtsDeqpTestCases 620191] dEQP-VK.info#device fail: === with config {glformat=,rotation=unspecified,surfacetype=window,required=false} ===
Abort: Test cannot be executed
07-24 01:45:33 I/FailureListener: FailureListener.testFailed dEQP-VK.info#device false false false
07-24 01:45:33 D/ModuleListener: ModuleListener.testEnded(dEQP-VK.info#device, {})
07-24 01:45:33 D/ddms: Reading file permision of /tmp/temp8053606987980308468.txt as: rw-rw-r--
07-24 01:45:41 D/ModuleListener: ModuleListener.testStarted(dEQP-VK.info#platform)
07-24 01:45:41 D/ModuleListener: ModuleListener.testFailed(dEQP-VK.info#platform, === with config {glformat=,rotation=unspecified,surfacetype=window,required=false} ===
Abort: Test cannot be executed)

经过分析是由于系统不支持vulkan feature 而导致的,但在跑CtsDeqpTestCases的时候,在DeqpTestRunner.java
    /**
* Parse vulkan nature from package name
*/
private boolean isVulkanPackage() {
if ("dEQP-GLES2".equals(mDeqpPackage) || "dEQP-GLES3".equals(mDeqpPackage) ||
"dEQP-GLES31".equals(mDeqpPackage) || "dEQP-EGL".equals(mDeqpPackage)) {
return false;
} else if ("dEQP-VK".equals(mDeqpPackage)) {
return true;
} else {
throw new IllegalStateException("dEQP runner was created with illegal name");
}
}

这个从android-cts\testcases\CtsDeqpTestCases.config中解析



    /**
* Check if device supports Vulkan.
*/
private boolean isSupportedVulkan ()
throws DeviceNotAvailableException, CapabilityQueryFailureException {
final Set features = getDeviceFeatures(mDevice);

for (String feature : features) {
if (feature.startsWith(FEATURE_VULKAN_LEVEL)) {
return true;
}
}

return false;
}


    /**
* Return feature set supported by the device
*/
private Set getDeviceFeatures(ITestDevice device)
throws DeviceNotAvailableException, CapabilityQueryFailureException {
if (mDeviceFeatures == null) {
mDeviceFeatures = queryDeviceFeatures(device);
}
return mDeviceFeatures;
}

/**
* Query feature set supported by the device
*/
private static Set queryDeviceFeatures(ITestDevice device)
throws DeviceNotAvailableException, CapabilityQueryFailureException {
// NOTE: Almost identical code in BaseDevicePolicyTest#hasDeviceFeatures
// TODO: Move this logic to ITestDevice.
String command = "pm list features";
String commandOutput = device.executeShellCommand(command);

// Extract the id of the new user.
HashSet availableFeatures = new HashSet<>();
for (String feature: commandOutput.split("\\s+")) {
// Each line in the output of the command has the format "feature:{FEATURE_VALUE}".
String[] tokens = feature.split(":");
if (tokens.length < 2 || !"feature".equals(tokens[0])) {
CLog.e("Failed parse features. Unexpect format on line \"%s\"", tokens[0]);
throw new CapabilityQueryFailureException();
}
availableFeatures.add(tokens[1]);
}
return availableFeatures;
}

通过pm list features来获取device支持的fearture,在fail的机器上我们执行该命令得到的结果包含了:
feature:android.hardware.vulkan.compute
feature:android.hardware.vulkan.level
feature:android.hardware.vulkan.version=4194307
导致
final boolean isSupportedApi = (isOpenGlEsPackage() && isSupportedGles())
|| (isVulkanPackage() && isSupportedVulkan())
|| (!isOpenGlEsPackage() && !isVulkanPackage());

if (!isSupportedApi || mCollectTestsOnly) {
// Pass all tests if OpenGL ES version is not supported or we are collecting
// the names of the tests only
fakePassTests(listener);
} else if (!mRemainingTests.isEmpty()) {
// Make sure there is no pre-existing package form earlier interrupted test run.
uninstallTestApk();
installTestApk();

mInstanceListerner.setSink(listener);
mDeviceRecovery.setDevice(mDevice);
runTests();

uninstallTestApk();
}

执行了 runTests();但实际上机器是不支持vulkan。
在高通平台是可以通过以下设置可以得知该结论:
"msm8909")
case "$soc_hwplatform" in
*)
setprop persist.graphics.vulkan.disable true
setprop ro.opengles.version 196608
;;
esac
;;


//Remove vulkan specific features
if (SystemProperties.getBoolean("persist.graphics.vulkan.disable", false)) {
removeFeature(PackageManager.FEATURE_VULKAN_HARDWARE_LEVEL);
removeFeature(PackageManager.FEATURE_VULKAN_HARDWARE_VERSION);
removeFeature(PackageManager.FEATURE_VULKAN_HARDWARE_COMPUTE);
}


但pm list features是读取/vendor/etc/permission/下的文件来确定feature的,查看fail的机器再该目录下有如下文件;
android.hardware.vulkan.compute-0.xml
android.hardware.vulkan.level-0.xml
android.hardware.vulkan.version-1_0_3.xml
所以得到结果isSupportedVulkan返回true.
所以解决方法就是系统不要copy上面三个文件到/vendor/etc/permission/即可,这样CtsDeqpTestCases就会fakePassTests,跳过了对vulkan的测试。高通平台是通过TARGET_NOT_SUPPORT_VULKAN 这个值来决定是否copyvulkan相关的文件到vendor下。

你可能感兴趣的:(平常遇到的问题与解决方法)