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中解析
<test class="com.drawelements.deqp.runner.DeqpTestRunner">
<option name="deqp-package" value="dEQP-VK"/>
<option name="deqp-caselist-file" value="vk-master.txt"/>
<option name="runtime-hint" value="2h29m"/>
</test>

    /**
* Check if device supports Vulkan.
*/
private boolean isSupportedVulkan ()
throws DeviceNotAvailableException, CapabilityQueryFailureException {
final Set<String> 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<String> getDeviceFeatures(ITestDevice device)
throws DeviceNotAvailableException, CapabilityQueryFailureException {
if (mDeviceFeatures == null) {
mDeviceFeatures = queryDeviceFeatures(device);
}
return mDeviceFeatures;
}

/**
* Query feature set supported by the device
*/
private static Set<String> 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<String> 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下。
  • 5
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
当你使用Nginx作为网页服务器时,可以结合使用Fail2Ban来增加安全性。Fail2Ban是一个用于防止恶意登录和暴力破解的工具,它监视日志文件并采取相应的措施来阻止攻击者。 要在Nginx上启用Fail2Ban,你可以按照以下步骤操作: 1. 安装Fail2Ban:使用适合你的操作系统的包管理器来安装Fail2Ban。例如,在Ubuntu上可以运行以下命令: ``` sudo apt-get install fail2ban ``` 2. 配置Fail2Ban:编辑Fail2Ban的配置文件 `/etc/fail2ban/jail.conf` 或 `/etc/fail2ban/jail.local`,根据你的系统选择一个文件。在该文件中,你可以定义Fail2Ban监视的日志文件和设置封禁规则。 3. 创建自定义Nginx的Fail2Ban规则:在 `/etc/fail2ban/filter.d/` 目录下创建一个名为 `nginx.conf` 的文件,并添加以下内容: ``` [Definition] failregex = ^<HOST>.*"(GET|POST).*HTTP.*" (444|403|401) ignoreregex = ``` 4. 更新Fail2Ban配置:编辑 `/etc/fail2ban/jail.local` 文件,在 `[DEFAULT]` 部分添加以下内容: ``` [nginx] enabled = true filter = nginx action = iptables[name=nginx, port=http, protocol=tcp] logpath = /var/log/nginx/access.log findtime = 3600 maxretry = 5 ``` 这将启用针对Nginx的Fail2Ban规则,并定义了一些参数,如查找时间(findtime)和最大重试次数(maxretry)。 5. 重启Fail2Ban服务:根据你的操作系统,使用适当的命令重启Fail2Ban服务。例如,在Ubuntu上可以运行以下命令: ``` sudo service fail2ban restart ``` 现在,Fail2Ban将开始监视Nginx的访问日志文件,并根据你在配置文件中定义的规则来封禁恶意IP地址。 请注意,以上步骤仅提供了一个简单的示例配置。你可以根据自己的需求进行定制化设置,例如增加更多的Fail2Ban规则或调整封禁参数。同时,确保你的Nginx日志文件路径与Fail2Ban配置文件中指定的路径一致。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值