https://progress.opensuse.org/https://progress.opensuse.org/themes/openSUSE/favicon/favicon.ico?15829177842020-11-26T13:06:28ZopenSUSE Project Management ToolopenQA Tests - action #77074: [qe-core] load_extra_tests_desktop is unusedhttps://progress.opensuse.org/issues/77074?journal_id=3546782020-11-26T13:06:28Ztjyrinki_susetjyrinki+redmine@suse.de
<ul><li><strong>Subject</strong> changed from <i>load_extra_tests_desktop is unused</i> to <i>[qe-core] load_extra_tests_desktop is unused</i></li><li><strong>Category</strong> set to <i>Enhancement to existing tests</i></li><li><strong>Status</strong> changed from <i>New</i> to <i>Workable</i></li><li><strong>Priority</strong> changed from <i>Normal</i> to <i>High</i></li><li><strong>Start date</strong> deleted (<del><i>2020-11-06</i></del>)</li></ul><p>Sounds like a job for QE Core. I'd love cleaning up main_common.pm when deemed safe enough.</p>
openQA Tests - action #77074: [qe-core] load_extra_tests_desktop is unusedhttps://progress.opensuse.org/issues/77074?journal_id=3550822020-11-27T09:07:02Ztjyrinki_susetjyrinki+redmine@suse.de
<ul><li><strong>Status</strong> changed from <i>Workable</i> to <i>New</i></li></ul> openQA Tests - action #77074: [qe-core] load_extra_tests_desktop is unusedhttps://progress.opensuse.org/issues/77074?journal_id=3819172021-02-09T00:29:00Zszarate
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Workable</i></li><li><strong>Priority</strong> changed from <i>High</i> to <i>Normal</i></li><li><strong>Difficulty</strong> set to <i>easy</i></li></ul> openQA Tests - action #77074: [qe-core] load_extra_tests_desktop is unusedhttps://progress.opensuse.org/issues/77074?journal_id=3821712021-02-10T13:45:01Zmgrifalconi
<ul><li><strong>Status</strong> changed from <i>Workable</i> to <i>In Progress</i></li><li><strong>Assignee</strong> set to <i>mgrifalconi</i></li></ul> openQA Tests - action #77074: [qe-core] load_extra_tests_desktop is unusedhttps://progress.opensuse.org/issues/77074?journal_id=3821772021-02-10T15:09:14Zmgrifalconi
<ul></ul><a name="TLDR-at-the-bottom"></a>
<h1 >TL;DR at the bottom.<a href="#TLDR-at-the-bottom" class="wiki-anchor">¶</a></h1>
<p>PR for removal of function in title: <a href="https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/11936">https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/11936</a></p>
<p>I had a look around main_common.pl and found some other candidates for removal..</p>
<pre><code>cat main_common.pm | grep "sub " | cut -d' ' -f2 > myList
while read s; do CALLS=$(cat main_common.pm | grep $s|wc -l); if [[ "$CALLS" -eq 1 ]]; then echo $s; fi done <myList >output
</code></pre>
<p>What this ugly script does is to list all 'sub' and check how many times they are referenced in the same file. If it happens only once, it is logged.<br>
Result:</p>
<pre><code>load_extra_tests_texlive
load_extra_tests_openqa_bootstrap
load_extra_tests_zypper
load_extra_tests_dracut
load_extra_tests_perl_bootloader
load_extra_tests_kdump
load_extra_tests_opensuse
load_extra_tests_qemu
load_extra_tests_geo_console
load_extra_tests_geo_desktop
load_extra_tests_sdk
load_extra_tests_toolkits
load_extra_tests_filesystem
load_extra_tests_wicked
load_extra_tests_udev
load_security_tests_crypt_core
load_security_tests_crypt_web
load_security_tests_crypt_kernel
load_security_tests_crypt_x11
load_security_tests_crypt_firefox
load_security_tests_crypt_tool
load_security_tests_crypt_libtool
load_security_tests_crypt_krb5kdc
load_security_tests_crypt_krb5server
load_security_tests_crypt_krb5client
load_security_tests_fips_setup
load_security_tests_ipsec
load_security_tests_mmtest
load_security_tests_apparmor_profile
load_security_tests_yast2_apparmor
load_security_tests_yast2_users
load_security_tests_lynis
load_security_tests_openscap
load_security_tests_selinux
load_security_tests_mok_enroll
load_security_tests_ima_measurement
load_security_tests_ima_appraisal
load_security_tests_evm_protection
load_security_tests_system_check
load_security_tests_check_kernel_config
load_security_tests_pam
load_security_tests_create_swtpm_hdd
load_security_tests_swtpm
load_security_tests_grub_auth
load_security_tests_tpm2
load_extra_tests_syscontainer
</code></pre>
<p>Now I am confused. For example <code>load_extra_tests_dracut</code> is not referenced anywhere as well but there is a test.</p>
<p>Never mind, I understand what is happening. Look here <a href="https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/728095c5ce9a6e2b48bb2516ed6de0769966dc58/lib/main_common.pm#L1735-L1757">https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/728095c5ce9a6e2b48bb2516ed6de0769966dc58/lib/main_common.pm#L1735-L1757</a></p>
<p><strong>TL;DR</strong><br>
There is a magic function that calls other functions with the name <code>load_tests_<<NAME>></code> so there is no easy way to make sure a function is unused, since a variable is set on openQA side. There must have been good reasons for it, but I must say that I am not that comfortable with such style.</p>
<p>I propose to reject this issue. I would not spend time on main_common since the long term goal is to get rid of it anyway (AFAIK).</p>
openQA Tests - action #77074: [qe-core] load_extra_tests_desktop is unusedhttps://progress.opensuse.org/issues/77074?journal_id=3831642021-02-17T08:05:34Zmgrifalconi
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Rejected</i></li></ul>