Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ras/sosreport.py: Fix errors/false-results #2776

Merged

Conversation

misanjumn
Copy link
Contributor

ras/sosreport.py: Fix errors/false-results for Fedora and CentOS

  • Missing: self.sos_cmd = "sos report" for Fedora, Rhel and CentOS while checking distro name
  • This was leading to 10 ERRORS, 1 PASS in test-cases causing FALSE TEST RESULTS
  • This simple patch will result in 8 PASS, 1 ERROR, 2 FAILURES

Signed-off-by: Misbah Anjum N [email protected]

@misanjumn
Copy link
Contributor Author

Distro: Fedora39

Before the patch

 (01/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_short: STARTED
 (01/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_short:  ERROR: 'Sosreport' object has no attribute 'sos_cmd' (1.75 s)
 (02/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_user: STARTED
 (02/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_user:  ERROR: 'Sosreport' object has no attribute 'sos_cmd' (1.75 s)
 (03/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_plugins: STARTED
 (03/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_plugins:  ERROR: 'Sosreport' object has no attribute 'sos_cmd' (1.74 s)
 (04/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_others: STARTED
 (04/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_others:  ERROR: 'Sosreport' object has no attribute 'sos_cmd' (1.74 s)
 (05/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_archive: STARTED
 (05/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_archive:  ERROR: 'Sosreport' object has no attribute 'sos_cmd' (1.74 s)
 (06/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_PPC: STARTED
 (06/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_PPC:  ERROR: 'Sosreport' object has no attribute 'sos_cmd' (1.76 s)
 (07/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_smtchanges: STARTED
 (07/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_smtchanges:  ERROR: 'Sosreport' object has no attribute 'sos_cmd' (3.46 s)
 (08/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_dlpar_cpu_hotplug: STARTED
 (08/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_dlpar_cpu_hotplug:  ERROR: 'Sosreport' object has no attribute 'sos_cmd' (12.71 s)
 (09/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_dlpar_mem_hotplug: STARTED
 (09/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_dlpar_mem_hotplug:  ERROR: 'Sosreport' object has no attribute 'sos_cmd' (1.90 s)
 (10/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test: STARTED
 (10/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test:  PASS (8.63 s)
 (11/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_fs: STARTED
 (11/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_fs:  ERROR: [Errno 16] Device or resource busy: '1-_home_misanjumn_tests_tests_avocado-misc-tests_ras_sosreport.py_Sosreport.test_fs' (2.33 s)
RESULTS    : PASS 1 | ERROR 10 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0

After the patch

 (01/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_short: STARTED
 (01/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_short:  PASS (126.02 s)
 (02/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_user: STARTED
 (02/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_user:  PASS (41.62 s)
 (03/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_plugins: STARTED
 (03/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_plugins:  PASS (122.48 s)
 (04/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_others: STARTED
 (04/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_others:  PASS (206.02 s)
 (05/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_archive: STARTED
 (05/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_archive:  PASS (114.55 s)
 (06/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_PPC: STARTED
 (06/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_PPC:  PASS (10.54 s)
 (07/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_smtchanges: STARTED
 (07/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_smtchanges:  PASS (175.53 s)
 (08/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_dlpar_cpu_hotplug: STARTED
 (08/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_dlpar_cpu_hotplug:  FAIL: 2 command(s) failed in sosreport tool verification (52.24 s)
 (09/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_dlpar_mem_hotplug: STARTED
 (09/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_dlpar_mem_hotplug:  FAIL: 1 command(s) failed in sosreport tool verification (42.07 s)
 (10/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test: STARTED
 (10/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test:  PASS (42.79 s)
 (11/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_fs: STARTED
 (11/11) /home/misanjumn/tests/tests/avocado-misc-tests/ras/sosreport.py:Sosreport.test_fs:  ERROR: Command 'mkfs.ext4 /dev/loop1' failed.\nstdout: b''\nstderr: b"mke2fs 1.47.0 (5-Feb-2023)\nmkfs.ext4: Device size reported to be zero.  Invalid partition specified, or\n\tpartition table wasn't reread after running fdisk, due to\n\ta modified partition bein... (1.74 s)
RESULTS    : PASS 8 | ERROR 1 | FAIL 2 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0

@PraveenPenguin
Copy link
Member

@shirishaganta @rohan-r-deshpande review please

ras/sosreport.py Show resolved Hide resolved
@abdhaleegit abdhaleegit self-requested a review April 19, 2024 09:48
ras/sosreport.py Show resolved Hide resolved
@Naresh-ibm Naresh-ibm self-assigned this May 2, 2024
@Naresh-ibm
Copy link
Collaborator

@misanjumn any update on this PR?

@misanjumn
Copy link
Contributor Author

misanjumn commented May 3, 2024

@misanjumn any update on this PR?

Yes Naresh, will send the reviewed PR soon.
Thanks.

@misanjumn
Copy link
Contributor Author

@misanjumn any update on this PR?

Resolved the changes as requested and sent the updated patch.
Thanks.

ras/sosreport.py Outdated Show resolved Hide resolved
@abdhaleegit abdhaleegit self-requested a review May 6, 2024 06:51
Copy link
Collaborator

@abdhaleegit abdhaleegit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just remove the if block than we are good to merge

Missing: self.sos_cmd = "sos report" for Fedora, Rhel
and CentOS while checking distro name
This was leading to 10 ERRORS, 1 PASS in test-cases
causing FALSE TEST RESULTS
This patch will result in 8 PASS, 1 ERROR, 2 FAILURES

Signed-off-by: Misbah Anjum N <[email protected]>
@PraveenPenguin PraveenPenguin merged commit ae20f5c into avocado-framework-tests:master May 8, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants