Project

General

Profile

Actions

action #45008

closed

[functional][u] Further improvements on splitting backend code

Added by szarate over 5 years ago. Updated almost 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Enhancement to existing tests
Target version:
SUSE QA - Milestone 25
Start date:
2019-04-16
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Difficulty:
easy

Description

Things that can be done in the future to further separate backend specific or generic code from other packages...

Suggestions:

 TODO: all this come from version_utils.pm, does it make sense to move them to Utils::Backends                                                                                                                                               
   # is_hyperv                                                                                                                                                                                                                     
   # is_hyperv_in_gui                                                                                                                                                                                                              
   # is_aarch64_uefi_boot_hdd                                                                                                                                                                                                      
   # is_svirt_except_s390x  

Checks for specific architectures can also be moved to a different package (Utils::Architectures) and opensusebasetest inheriting from it, to avoid excess of imports...

   # defined in lib/version_utils.pm                                                                                                                                                                                               
   # sub is_s390x {                                                                                                                                                                                                                
   #     return check_var('ARCH', 's390x');                                                                                                                                                                                        
   # }                                                                                                                                                                                                                             

   # sub is_x86_64 {                                                                                                                                                                                                               
   #     return check_var('ARCH', 'x86_64');                                                                                                                                                                                       
   # } 
  • Grep for check_var('ARCH' (might use single or double quotes) and move these to an architecture specific utils package
  • grep for 'check_var("BACKEND", (might use single or double quotes) and move these to Utils::Backends or a possibly different package to ensure that we can differentiate from utilities that help with the backend, vs utilities that add more functionality to the backend independant code (like is_remote_backend)

Subtasks 3 (0 open3 closed)

action #50432: [sle][functional][u] move specific architectures Utils::ArchitecturesResolvedzluo2019-04-16

Actions
action #50435: [sle][functional][u] further separate backend specific or generic code Resolvedzluo2019-04-16

Actions
action #51236: [sle][functional][u] separate further backends to Utils::BackendsResolvedzluo2019-05-07

Actions

Related issues 1 (0 open1 closed)

Follows openQA Tests - action #33388: [functional][u][easy][pvm] Implement proper split from other backendsResolvedmgriessmeier2019-02-17

Actions
Actions #1

Updated by okurz over 5 years ago

  • Subject changed from Further improvements on splitting backend code to [functional][u] Further improvements on splitting backend code
  • Category set to Enhancement to existing tests

Try to find a category and tags so that we have less work during refinement or triaging: https://progress.opensuse.org/projects/openqatests/wiki#ticket-backlog-refinement . I know, it's just a subtask but we use these easy queries to list the "to be triaged" tickets which shows up this ticket because it did have neither category nor tags. Maybe we can just make that a related ticket and not subtask as otherwise we should finish this one before completing the parent.

Actions #2

Updated by szarate over 5 years ago

  • Parent task deleted (#33388)

Whops! I forgot to add the functional u tag! thanks! Changed the task relationship better.

Actions #3

Updated by szarate over 5 years ago

  • Follows action #33388: [functional][u][easy][pvm] Implement proper split from other backends added
Actions #4

Updated by SLindoMansilla over 5 years ago

  • Target version set to Milestone 22
Actions #5

Updated by okurz about 5 years ago

  • Status changed from New to Feedback
  • Assignee set to okurz
Actions #6

Updated by okurz about 5 years ago

PR merged, waiting for feedback regarding breaking any tests.

Actions #7

Updated by okurz about 5 years ago

  • Status changed from Feedback to Workable
  • Assignee deleted (okurz)

PR merged, no message received about broken tests. Next steps as mentioned in the suggestion can be followed on with.

Actions #8

Updated by okurz about 5 years ago

  • Status changed from Workable to In Progress
  • Assignee set to okurz
  • Target version changed from Milestone 22 to Milestone 23
Actions #9

Updated by okurz about 5 years ago

  • Start date changed from 5000-01-02 to 2019-02-18

due to changes in a related task

Actions #10

Updated by okurz about 5 years ago

  • Status changed from In Progress to Feedback

PR merged, let's see if it causes any more issues.

Actions #11

Updated by okurz about 5 years ago

  • Status changed from Feedback to Workable
  • Assignee deleted (okurz)
  • Target version changed from Milestone 23 to Milestone 25

seems like no problems so far. Based on the example of my PR I suggest to also get rid of the other architecture/backend specific bootloader test modules and call them as library functions from the main bootloader as well as extend that approach to other areas of code.

Actions #12

Updated by zluo about 5 years ago

  • Status changed from Workable to In Progress
  • Assignee set to zluo

take over.

Actions #13

Updated by zluo about 5 years ago

remove following from version_utils.pm to Utils::Backends at first and add use parts for them in main_common.pm, main.pm

# is_hyperv                                                                                                                                                                                                                     
# is_hyperv_in_gui                                                                                                                                                                                                              
# is_aarch64_uefi_boot_hdd                                                                                                                                                                                                      
# is_svirt_except_s390x 
Actions #14

Updated by zluo about 5 years ago

modified:   lib/Utils/Backends.pm
modified:   lib/main_common.pm
modified:   lib/opensusebasetest.pm
modified:   lib/version_utils.pm
modified:   products/sle/main.pm
modified:   tests/installation/data_integrity.pm
modified:   tests/installation/installation_overview.pm
Actions #15

Updated by zluo about 5 years ago

I would create 2 sub tickets because of to many files got changed and this is hard to review and check for merge them later.

Actions #16

Updated by zluo about 5 years ago

  • Status changed from In Progress to Workable

working on sub tickets at first.

Actions #17

Updated by zluo almost 5 years ago

  • Status changed from Workable to Feedback

2 sub tickets still not done yet, set this ticket for now as feedback

Actions #18

Updated by SLindoMansilla almost 5 years ago

  • Status changed from Feedback to In Progress

I would say in progress is better. Since this parent ticket doesn't need review.

Actions #19

Updated by szarate almost 5 years ago

  • Status changed from In Progress to Resolved

Backend functions have moved out of lib/utils, however there's still a lot of work to do... But at least there are stepping stones to unclutter lib/utils.pm (Let's just make sure that whatever is moved, is used... as of now, there are some checks needed either for BACKEND or for dealing with ARCH variables used in tests/ or lib/, let's discuss first a proper scope for poo#33388 and then figure out where to go from there...

lib/suse_container_urls.pm
40:        if (!check_var('ARCH', 'aarch64')) {
50:    elsif (is_tumbleweed && (check_var('ARCH', 'i586') || check_var('ARCH', 'x86_64'))) {
54:    elsif (is_tumbleweed && check_var('ARCH', 'aarch64')) {
58:    elsif (is_tumbleweed && check_var('ARCH', 'ppc64le')) {
62:    elsif (is_leap(">15.0") && check_var('ARCH', 'x86_64')) {
66:    elsif (is_leap(">15.0") && check_var('ARCH', 'aarch64')) {
70:    elsif (is_leap(">15.0") && check_var('ARCH', 'ppc64le')) {
lib/utils.pm
271:    elsif (check_var('BACKEND', 's390x')) {
325:    return if get_var('BACKEND', '') =~ /ipmi|spvm/;
557:    if (check_var('BACKEND', 'svirt') and !check_var('ARCH', 's390x')) {
934:    return if check_var('BACKEND', 's390x');
943:    systemctl "mask $service_name", ignore_failure => 1 if check_var('BACKEND', 'qemu');
1025:    if (check_var('BACKEND', 's390x')) {
1049:        if (check_var('BACKEND', 's390x')) {
1083:        if (check_var('BACKEND', 'spvm')) {
1089:        if (check_var('BACKEND', 'ipmi')) {
1107:    if (!check_var('BACKEND', 'svirt')) {
Actions

Also available in: Atom PDF