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/hwinfo: Update testcases and their options #2785

Merged

Conversation

misanjumn
Copy link
Contributor

@misanjumn misanjumn commented Mar 27, 2024

ras/hwinfo: Update testcases

  1. Updated: test_list as test_list_options to test all list options
  2. Updated: test debug N to test hwinfo --debug 1,2 options
  3. Updated: test dump N to test hwinfo --debug 1,2 options
  4. Updated: test_disk by renaming it to test_only option to make it more suitable corresponding to the command
  5. Updated: test_unique_id_save to CANCEL test if directory /var/lib/hardware/udi is not present. In Fedora, Rhel, etc Operating Systems, this directory is not part of the file system. The save config option will look for the presence of the directory to save the file. If it is not present, it will fail.
  6. Updated: test_unique_id_show to CANCEL for same reason as test_unique_id_save
  7. Updated: test_save_config to CANCEL for same reason as test_unique_id_save

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

@misanjumn
Copy link
Contributor Author

OS: Fedora

Before the patch

(01/13) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_list: STARTED
(01/13) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_list:  PASS (7.20 s)
(02/13) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_disk: STARTED
(02/13) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_disk:  PASS (0.57 s)
(03/13) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_unique_id_save: STARTED
(03/13) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_unique_id_save:  FAIL: hwinfo: --save-config UDI option failed (0.71 s)
(04/13) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_unique_id_show: STARTED
(04/13) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_unique_id_show:  CANCEL: hwinfo: --save-config UDI cancelled, no saved config present (0.70 s)
(05/13) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_verbose_map: STARTED
(05/13) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_verbose_map:  PASS (0.68 s)
(06/13) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_log_file: STARTED
(06/13) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_log_file:  PASS (6.86 s)
(07/13) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_dump_0: STARTED
(07/13) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_dump_0:  PASS (0.46 s)
(08/13) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_dump_1: STARTED
(08/13) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_dump_1:  PASS (2476.43 s)
(09/13) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_version: STARTED
(09/13) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_version:  PASS (0.45 s)
(10/13) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_help: STARTED
(10/13) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_help:  PASS (0.45 s)
(11/13) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_debug: STARTED
(11/13) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_debug:  PASS (0.58 s)
(12/13) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_short_block: STARTED
(12/13) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_short_block:  PASS (0.59 s)
(13/13) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_save_config: STARTED
(13/13) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_save_config:  FAIL: hwinfo: --save-config=all option failed (0.71 s)
RESULTS    : PASS 10 | ERROR 0 | FAIL 2 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 1

After the patch

 (01/15) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_list: STARTED
 (01/15) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_list:  PASS (7.21 s)
 (02/15) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_listmd: STARTED
 (02/15) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_listmd:  PASS (7.08 s)
 (03/15) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_only: STARTED
 (03/15) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_only:  PASS (0.58 s)
 (04/15) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_unique_id_save: STARTED
 (04/15) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_unique_id_save:  CANCEL: /var/lib/hardware/udi path does not exist (0.45 s)
 (05/15) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_unique_id_show: STARTED
 (05/15) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_unique_id_show:  CANCEL: /var/lib/hardware/udi path does not exist (0.45 s)
 (06/15) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_verbose_map: STARTED
 (06/15) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_verbose_map:  PASS (0.70 s)
 (07/15) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_log_file: STARTED
 (07/15) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_log_file:  PASS (6.81 s)
 (08/15) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_dump_0: STARTED
 (08/15) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_dump_0:  PASS (0.46 s)
 (09/15) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_dump_1: STARTED
 (09/15) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_dump_1:  PASS (2475.90 s)
 (10/15) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_version: STARTED
 (10/15) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_version:  PASS (0.46 s)
 (11/15) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_help: STARTED
 (11/15) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_help:  PASS (0.45 s)
 (12/15) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_debug_0: STARTED
 (12/15) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_debug_0:  PASS (0.59 s)
 (13/15) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_debug_1: STARTED
 (13/15) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_debug_1:  PASS (46.69 s)
 (14/15) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_short_block: STARTED
 (14/15) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_short_block:  PASS (0.61 s)
 (15/15) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_save_config: STARTED
 (15/15) /home/misanjumn/tests/tests/avocado-misc-tests/ras/hwinfo.py:Hwinfo.test_save_config:  CANCEL: /var/lib/hardware/udi path does not exist (0.46 s)
RESULTS    : PASS 12 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 3

ras/hwinfo.py Outdated Show resolved Hide resolved
ras/hwinfo.py Outdated Show resolved Hide resolved
ras/hwinfo.py Show resolved Hide resolved
@misanjumn
Copy link
Contributor Author

Hi Praveen,
Resolved the suggestions. Do take a look into it.
Thanks.

@misanjumn misanjumn changed the title ras/hwinfo: Add new testcases and Update testcases ras/hwinfo: Update testcases and their options Mar 29, 2024
Updated: test_list as test_list_options to test all
list options

Updated: test debug N to test hwinfo --debug 1,2 options

Updated: test dump N to test hwinfo --debug 1,2 options

Updated: test_disk by renaming it to test_only option
to make it more suitable corresponding to the command

Updated: test_unique_id_save to CANCEL test if directory
/var/lib/hardware/udi is not present. In Fedora, Rhel,
etc Operating Systems, this directory is not part of the
file system

Updated: test_unique_id_show to CANCEL for same reason
as test_unique_id_save

Updated: test_save_config to CANCEL for same reason
as test_unique_id_save

Signed-off-by: Misbah Anjum N <[email protected]>
@PraveenPenguin PraveenPenguin merged commit b8e2d36 into avocado-framework-tests:master Apr 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.

2 participants