Project

General

Profile

action #120918

Updated by szarate almost 2 years ago

## Observation 

 Mariadb was updated to version 10.10. openQA now reports authentication failures in the php_mysql tests. 
 The issue seems to be that this code returns the wrong outcome: 

 ``` 
     my $mysql_version = script_output qq{mysql -sN -u root -e "SELECT VERSION();"}; 
     if (check_version('>=10.4', $mysql_version)) { 
         # MariaDB changed the default authentication method since version 10.4 
         # https://mariadb.org/authentication-in-mariadb-10-4/ 
         # https://bugzilla.suse.com/show_bug.cgi?id=1165151 
         my $mysql_root_password = "ALTER USER root\@localhost IDENTIFIED VIA mysql_native_password USING PASSWORD(\'\');"; 
         assert_script_run qq{mysql -u root -e "$mysql_root_password"}; 
     } 
     record_info($mysql_version); 
 ``` 

 So, openQA knows that when a version >= 10.4 is in use, we need to set a root password; but check_version treats 10.10 as < 10.4 

 openQA test in scenario opensuse-Tumbleweed-DVD-x86_64-extra_tests_webserver@64bit fails in 
 [php_mysql](https://openqa.opensuse.org/tests/2899551/modules/php_mysql/steps/84) 

 ## Test suite description 



 ## Reproducible 

 Fails since (at least) Build [20221123](https://openqa.opensuse.org/tests/2899143) 


 ## Expected result 

 Last good: [20221122](https://openqa.opensuse.org/tests/2896850) (or more recent) 


 ## Further details 

 Always latest result in this scenario: [latest](https://openqa.opensuse.org/tests/latest?arch=x86_64&distri=opensuse&flavor=DVD&machine=64bit&test=extra_tests_webserver&version=Tumbleweed) 

 ## Suggestions 

 - Start by adding the test case in [the unit tests](https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/master/t/01_version_utils.t#L12) for `check_version` 
 - Consider depending more on `version` [module](https://metacpan.org/pod/version) to properly parse versions.

Back