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

ltp_fs : resolve interactive user check #2743

Merged
merged 1 commit into from
Mar 1, 2024

Conversation

abdhaleegit
Copy link
Collaborator

With latest ltp source, a user id check has been added causing the test to wait for user response to this check

..user ids and/or groups are missing, would you like these created? [y/N]

This code solves this check by passing the 'y' string to automatically proceed the test

@abdhaleegit
Copy link
Collaborator Author

Before fix

 Running '/var/tmp/avocado_bbu9srne/ltp-master/bin/runltp -s fs_di -q -p -l /home/OpTest/avocado-fvt-wrapper/results/job-2023-12-10T07.12-4eeaf19/test-results/01-_home_OpTest_avocado-fvt-wrapper_tests_avocado-misc-tests_io_disk_ltp_fs.py_LtpFs.test_fs_run_run-args-fs_di-fs-ext4-lv-lv-raid-raid-5a2d/ltp.log -C /home/OpTest/avocado-fvt-wrapper/results/job-2023-12-10T07.12-4eeaf19/test-results/01-_home_OpTest_avocado-fvt-wrapper_tests_avocado-misc-tests_io_disk_ltp_fs.py_LtpFs.test_fs_run_run-args-fs_di-fs-ext4-lv-lv-raid-raid-5a2d/failcmdfile -d /mnt'
INFO: creating /var/tmp/avocado_bbu9srne/ltp-master/bin/output directory
INFO: no command files were provided. Executing following runtest scenario files:
syscalls fs fs_perms_simple dio io mm ipc irq sched math nptl pty containers fs_bind controllers filecaps cap_bounds fcntl-locktests connectors power_management_tests hugetlb commands hyperthreading can cpuhotplug net.ipv6_lib input cve crypto kernel_misc uevent watchqueue

Checking for required user/group ids

If any required user ids and/or groups are missing, would you like these created? [y/N]

the ltp test is hung at above step

After fix:

SUSE:

avocado run --max-parallel-tasks=1 ltp_fs.py -m ltp_fs.py.data/ltp_fs.yaml
Fetching asset from ltp_fs.py:LtpFs.test_fs_run
JOB ID     : 79721beaf0c8964f351f61aa4ea90b4cf95c112f
JOB LOG    : /home/OpTest/avocado-fvt-wrapper/results/job-2023-12-16T13.42-79721be/job.log
 (1/1) ltp_fs.py:LtpFs.test_fs_run;run-args-fs_di-fs-ext4-lv-lv-raid-raid-d3f1: STARTED
 (1/1) ltp_fs.py:LtpFs.test_fs_run;run-args-fs_di-fs-ext4-lv-lv-raid-raid-d3f1: PASS (153.69 s)
RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML   : /home/OpTest/avocado-fvt-wrapper/results/job-2023-12-16T13.42-79721be/results.html
JOB TIME   : 190.08 s

RHEL

'sed -i '/IDcheck/ s/./    echo -e "y\n"|&/' /var/tmp/avocado_symre5k5/ltp-master/bin/runltp'
'sed -i '/IDcheck/ s/./    echo -e "y\n"|&/' /var/tmp/avocado_symre5k5/ltp-master/bin/runltp' finished with 0 after 0.003749143s
'/var/tmp/avocado_symre5k5/ltp-master/bin/runltp -s fs_di -q -p -l /home/OpTest/avocado-fvt-wrapper/results/job-2023-12-16T22.21-4644c3d/test-results/1-ltp_fs.py_LtpFs.test_fs_run_run-args-fs_di-fs-ext4-lv-no_lv-raid-no_raid-3db7/ltp.log -C /home/OpTest/avocado-fvt-wrapper/results/job-2023-12-16T22.21-4644c3d/test-results/1-ltp_fs.py_LtpFs.test_fs_run_run-args-fs_di-fs-ext4-lv-no_lv-raid-no_raid-3db7/failcmdfile -d /mnt'
 INFO: creating /var/tmp/avocado_symre5k5/ltp-master/bin/output directory
 INFO: no command files were provided. Executing following runtest scenario files:
 syscalls fs fs_perms_simple dio io mm ipc irq sched math nptl pty containers fs_bind controllers filecaps cap_bounds fcntl-locktests connectors power_management_tests hugetlb commands hyperthreading can cpuhotplug net.ipv6_lib input cve crypto kernel_misc uevent watchqueue 
 
 Checking for required user/group ids
 
 'root' user id and group found.
 'nobody' user id and group found.
 'bin' user id and group found.
 'daemon' user id and group found.
 Users group found.
 Sys group found.
 Required users/groups exist.
 no big block device was specified on commandline.
 Tests which require a big block device are disabled.
 You can specify it with option -z
 INFO: Test start time: Sat Dec 16 22:24:35 IST 2023
 COMMAND:    /var/tmp/avocado_symre5k5/ltp-master/bin/bin/ltp-pan -q  -e -S   -a 97286     -n 97286 -p -f /mnt/ltp-iZov32pNu2/alltests -l /home/OpTest/avocado-fvt-wrapper/results/job-2023-12-16T22.21-4644c3d/test-results/1-ltp_fs.py_LtpFs.test_fs_run_run-args-fs_di-fs-ext4-lv-no_lv-raid-no_raid-3db7/ltp.log  -C /home/OpTest/avocado-fvt-wrapper/results/job-2023-12-16T22.21-4644c3d/test-results/1-ltp_fs.py_LtpFs.test_fs_run_run-args-fs_di-fs-ext4-lv-no_lv-raid-no_raid-3db7/failcmdfile -T /var/tmp/avocado_symre5k5/ltp-master/bin/output/LTP_RUN_ON-ltp.log.tconf
 INFO: Restricted to fs_di
 LOG File: 
 /home/OpTest/avocado-fvt-wrapper/results/job-2023-12-16T22.21-4644c3d/test-results/1-ltp_fs.py_LtpFs.test_fs_run_run-args-fs_di-fs-ext4-lv-no_lv-raid-no_raid-3db7/ltp.log
 FAILED COMMAND File: 
 /home/OpTest/avocado-fvt-wrapper/results/job-2023-12-16T22.21-4644c3d/test-results/1-ltp_fs.py_LtpFs.test_fs_run_run-args-fs_di-fs-ext4-lv-no_lv-raid-no_raid-3db7/failcmdfile
 TCONF COMMAND File: 
 /var/tmp/avocado_symre5k5/ltp-master/bin/output/LTP_RUN_ON-ltp.log.tconf
 Running tests.......
 
 Test Options:
  Tested Filesystem: /mnt/ltp-iZov32pNu2/fs_di-97374
              Loops: 10
     Data File Size: 30
 fs_di       0  TINFO  :  Test Started
 fs_di       0  TINFO  :  Completed Loop 1
 fs_di       0  TINFO  :  Completed Loop 2
 fs_di       0  TINFO  :  Completed Loop 3
 fs_di       0  TINFO  :  Completed Loop 4
 fs_di       0  TINFO  :  Completed Loop 5
 fs_di       0  TINFO  :  Completed Loop 6
 fs_di       0  TINFO  :  Completed Loop 7
 fs_di       0  TINFO  :  Completed Loop 8
 fs_di       0  TINFO  :  Completed Loop 9
 fs_di       0  TINFO  :  Completed Loop 10
 fs_di      10  TPASS  :  Test Successful
 INFO: ltp-pan reported all tests PASS
 LTP Version: 20230929
 INFO: Test end time: Sat Dec 16 22:24:41 IST 2023
 
        ###############################################################
 
             Done executing testcases.
             LTP Version:  20230929
        ###############################################################

io/disk/ltp_fs.py Outdated Show resolved Hide resolved
@Naresh-ibm Naresh-ibm self-assigned this Jan 9, 2024
@PraveenPenguin
Copy link
Member

@abdhaleegit any update here?

@abdhaleegit
Copy link
Collaborator Author

@abdhaleegit any update here?

Done implementing python way, please review

@abdhaleegit
Copy link
Collaborator Author

latest logs

avocado run --max-parallel-tasks=1 ltp_fs.py -m ltp_fs.py.data/ltp_fs.yaml
Fetching asset from ltp_fs.py:LtpFs.test_fs_run
JOB ID     : 6a367735789fc29b48b2ef5adf98f0110c952842
JOB LOG    : /home/avocado-fvt-wrapper/results/job-2024-02-28T08.58-6a36773/job.log
 (1/4) ltp_fs.py:LtpFs.test_fs_run;run-args-fs_di-fs-ext4-b95a: STARTED
 (1/4) ltp_fs.py:LtpFs.test_fs_run;run-args-fs_di-fs-ext4-b95a: PASS (127.26 s)
 (2/4) ltp_fs.py:LtpFs.test_fs_run;run-args-fs_inod-fs-ext4-d324: STARTED
 (2/4) ltp_fs.py:LtpFs.test_fs_run;run-args-fs_inod-fs-ext4-d324: PASS (6.53 s)
 (3/4) ltp_fs.py:LtpFs.test_fs_run;run-args-fs_fill-fs-ext4-a7d2: STARTED
 (3/4) ltp_fs.py:LtpFs.test_fs_run;run-args-fs_fill-fs-ext4-a7d2: FAIL: No test failures detected, but LTP finished with 1 (11.16 s)
 (4/4) ltp_fs.py:LtpFs.test_fs_run;run-args-fs_perm-fs-ext4-1eb5: STARTED
 (4/4) ltp_fs.py:LtpFs.test_fs_run;run-args-fs_perm-fs-ext4-1eb5: PASS (4.71 s)
RESULTS    : PASS 3 | ERROR 0 | FAIL 1 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML   : /home/avocado-fvt-wrapper/results/job-2024-02-28T08.58-6a36773/results.html
JOB TIME   : 279.59 s

Test summary:

@abdhaleegit
Copy link
Collaborator Author

@Krishan-Gopal-saraswat you were facing same issue with generic/ltp.py test and i have added the same fix too

With latest ltp source, a user id check has been added
causing the test to wait for user response to this check

..user ids and/or groups are missing, would you like these created? [y/N]

This code solves this check by passing the 'y' string to
automatically proceed the test

Signed-off-by: Abdul Haleem <[email protected]>
@PraveenPenguin PraveenPenguin merged commit 5ed5edd into avocado-framework-tests:master Mar 1, 2024
2 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.

3 participants