HiKey 960 vts Test failure

Hi Guys,
I am getting a failure while running Vts test on hikey 960 . Any inputs on this would be of great help

hikey960:/data/nativetest64 # ./VtsHalThermalV1_0TargetTest
[==========] Running 3 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 3 tests from ThermalHidlTest
[ RUN ] ThermalHidlTest.TemperatureTest
hardware/interfaces/thermal/1.0/vts/functional/VtsHalThermalV1_0TargetTest.cpp:53: Failure
Expected: (thermal_) != (nullptr), actual: 8-byte object <00-00 00-00 00-00 00-00> vs 8-byte object <00-00 00-00 00-00 00-00>
[ FAILED ] ThermalHidlTest.TemperatureTest (4 ms)
[ RUN ] ThermalHidlTest.CpuUsageTest
hardware/interfaces/thermal/1.0/vts/functional/VtsHalThermalV1_0TargetTest.cpp:53: Failure
Expected: (thermal_) != (nullptr), actual: 8-byte object <00-00 00-00 00-00 00-00> vs 8-byte object <00-00 00-00 00-00 00-00>
[ FAILED ] ThermalHidlTest.CpuUsageTest (1 ms)
[ RUN ] ThermalHidlTest.CoolingDeviceTest
hardware/interfaces/thermal/1.0/vts/functional/VtsHalThermalV1_0TargetTest.cpp:53: Failure
Expected: (thermal_) != (nullptr), actual: 8-byte object <00-00 00-00 00-00 00-00> vs 8-byte object <00-00 00-00 00-00 00-00>
[ FAILED ] ThermalHidlTest.CoolingDeviceTest (1 ms)
[----------] 3 tests from ThermalHidlTest (6 ms total)

[----------] Global test environment tear-down
[==========] 3 tests from 1 test case ran. (6 ms total)
[ PASSED ] 0 tests.
[ FAILED ] 3 tests, listed below:
[ FAILED ] ThermalHidlTest.TemperatureTest
[ FAILED ] ThermalHidlTest.CpuUsageTest
[ FAILED ] ThermalHidlTest.CoolingDeviceTest

3 FAILED TESTS

Thanks for reporting this issue, these errors are likely related with thermal management? I don’t understand well vts testing and what’s the purpose for thermal related testing, so need take time to look into this.

Basically now Hikey960 has supported thermal in kernel level, but we missed to enable thermal HAL in Android, @ric96 is working on thermal HAL enabling. Do you think the missing thermal HAL is the cause for the testing failure?

yes it is. I you enable the default thermal hal some of the issues go away but I haven’t been able to dig much deeper into this.

Hi, Infact i found that this may not be exactly related to Thermal HAL .
I tried running other vts tests but getting the similar error .
The error is coming from code like this

demo_ = ::testing::VtsHalHidlTargetTestBase::getService();
ASSERT_NE(demo_, nullptr);

In this above snippet. getService is returning failure , irrespective of the service

huh, interesting…
@leo-yan @jstultz any comments?

Got this resolved . Seems like it is being caused by selinux permissions . Now am able to run all the vts test cases from adb shell

Hi Pavan,

Could you be specific in what was the selinux permission that caused it?
Could be of help in a similar issue I am facing.

Hi,

To be honest, I am not familiar with VTS testing and SELinux permission, but based on the AOSP web page [1], we can see it can set the kernel parameter when build kernel image:

BOARD_KERNEL_CMDLINE := androidboot.selinux=permissive

The web page also mentions the Android build file BOARD_CONFIG.mk and BOARD_SEPOLICY_* variables, I think this also should be paid attention.

[1] Implementing SELinux  |  Android Open Source Project