canonical / checkbox

Checkbox is a testing framework used to validate device compatibility with Ubuntu Linux. It’s the testing tool developed for the purposes of the Ubuntu Certification program.
https://checkbox.readthedocs.io
GNU General Public License v3.0
34 stars 50 forks source link

Invalid check of unity_support_test for Genio Devices (ARM Mali GPU) #1630

Open baconYao opened 15 hours ago

baconYao commented 15 hours ago

Bug Description

Problem

Recently, the cold/warm boot stress tests failed on Genio and ADVANTECH - RSB-3810 devices in SRU and enabledment phase.

The failed output like below and it's caused by checking unity support test

Test: Scan kernel log for errors and warnings.                              
                                                                     :   0.0% /
  Kernel log error check.                                            :   0.0% -
  Kernel log error check.                                            :  50.0% \

  Kernel log error check.                                      
Test: Scan kernel log for Oopses.                                           
                                                                     :  50.0% |
  Kernel log oops check.                                             :  50.0% /
  Kernel log oops check.                                             : 100.0% -

  Kernel log oops check.                                  2 passed
Running 2 tests, results appended to /var/tmp/checkbox-ng/sessions/session_title-2024-11-20T08.50.24.session/session-share/cold_reboot_cycle1/fwts_klog_oops.log
No errors detected
[ ERR ] unity support test returned 1
Comparing devices in (expected) /var/tmp/checkbox-ng/sessions/session_title-2024-11-20T08.50.24.session/session-share/before_reboot against (actual) /var/tmp/checkbox-ng/sessions/session_title-2024-11-20T08.50.24.session/session-share/cold_reboot_cycle1...
[ OK ] Devices match!
[ OK ] fwts checks passed!
[ OK ] Didn't find any failed system services!
These nodes ['renderD128', 'card0-eDP-1', 'card0-DSI-1', 'card0'] exist
card0-eDP-1 is connected to display!
Checking $DISPLAY=:0

Reason

There were two commits to enhance and fix the validation for cold/warm stress test

And there’s one validation is for Unity utils. This validation is also used by gl_support case. The check and output on my PC (201712-26032) is like below

$ cd /snap/checkbox22/current/usr/lib/nux
$ DISPLAY=:0 ./unity_support_test -p

OpenGL vendor string:   Intel
OpenGL renderer string: Mesa Intel(R) UHD Graphics 620 (KBL GT2)
OpenGL version string:  4.6 (Compatibility Profile) Mesa 22.0.1

Not software rendered:    yes
Not blacklisted:          yes
GLX fbconfig:             yes
GLX texture from pixmap:  yes
GL npot or rect textures: yes
GL vertex program:        yes
GL fragment program:      yes
GL vertex buffer object:  yes
GL framebuffer object:    yes
GL version is 1.4+:       yes

Unity 3D supported:       yes

However, this check point is NOT valid some devices with ARM Mali GPU (e.g., Genio G1200, G700, G510 with Desktop image).

DISPLAY=:0 ./unity_support_test -p
OpenGL vendor string:   Mesa
OpenGL renderer string: llvmpipe (LLVM 15.0.7, 128 bits)
OpenGL version string:  4.5 (Compatibility Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2

Not software rendered:    no
Not blacklisted:          yes
GLX fbconfig:             yes
GLX texture from pixmap:  yes
GL npot or rect textures: yes
GL vertex program:        yes
GL fragment program:      yes
GL vertex buffer object:  yes
GL framebuffer object:    yes
GL version is 1.4+:       yes

Unity 3D supported:       no

Although the outcome shows llvmpipe not ARM Mali, it's EXPECTED result. See detail in https://bugs.launchpad.net/baoshan/+bug/2025696/comments/5

In Mesa, it is actually loading the swrast DRI driver if there are no relevant DRI driver available. swrast is a software based DRI driver in Mesa to provide support on OpenGL. So Tte test failed since OpenGL is using a software rendering driver as shown as above result, where Unity 3D failed in similar way.

And it is expected that Mali driver do not support OpenGL. So any OpenGL tools are actually querying the default software rendering support from Mesa.

Cert-blocker Test Case

To Reproduce

  1. Install Desktop Image
  2. Install Checkbox via commands
    $ sudo snap install checkbox22 --beta
    $ sudo snap install checkbox --channel="22.04/beta" --classic
  3. Run Checkbox via command checkbox.checkbox-cli control <IP to DUT>
  4. Choose the com.canonical.certification::client-cert-desktop-22-04-stress test plan
  5. Run Cold-boot Stress Test and Warm-boot Stress Test`

Expected Result

No [ ERR ] unity support test returned 1 be raised during each loop-test iteration

Actual Result

Test: Scan kernel log for errors and warnings.                              
                                                                     :   0.0% /
  Kernel log error check.                                            :   0.0% -
  Kernel log error check.                                            :  50.0% \

  Kernel log error check.                                      
Test: Scan kernel log for Oopses.                                           
                                                                     :  50.0% |
  Kernel log oops check.                                             :  50.0% /
  Kernel log oops check.                                             : 100.0% -

  Kernel log oops check.                                  2 passed
Running 2 tests, results appended to /var/tmp/checkbox-ng/sessions/session_title-2024-11-20T08.50.24.session/session-share/cold_reboot_cycle1/fwts_klog_oops.log
No errors detected
[ ERR ] unity support test returned 1
Comparing devices in (expected) /var/tmp/checkbox-ng/sessions/session_title-2024-11-20T08.50.24.session/session-share/before_reboot against (actual) /var/tmp/checkbox-ng/sessions/session_title-2024-11-20T08.50.24.session/session-share/cold_reboot_cycle1...
[ OK ] Devices match!
[ OK ] fwts checks passed!
[ OK ] Didn't find any failed system services!
These nodes ['renderD128', 'card0-eDP-1', 'card0-DSI-1', 'card0'] exist
card0-eDP-1 is connected to display!
Checking $DISPLAY=:0

Environment

OS: Jammy Desktop Image Checkbox Type: Snap Hardware Testing: ARM Mali GPU

checkbox-baoshan-classic   1.2               191    latest/edge      ce-certification-qa  classic
checkbox-ce-oem            1.0-jammy         611    22.04/edge       ce-certification-qa  classic
checkbox22                 4.2.0-dev152      1328   latest/beta      ce-certification-qa  -

Relevant log output

No response

Additional context

No response

syncronize-issues-to-jira[bot] commented 15 hours ago

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/CHECKBOX-1678.

This message was autogenerated