avocado-framework-tests / avocado-misc-tests

Community maintained Avocado tests repository
Other
22 stars 123 forks source link

[nvme] iozone test fails TypeError: write() argument must be str, not bytes #1730

Closed abdhaleegit closed 1 year ago

abdhaleegit commented 4 years ago
2020-04-23 17:55:13,329 process          L0436 DEBUG| [stdout]           524288    8192  3603132  8042603 15639188 14722992 15693430  8022651 15569540  10759493  15559845  5948019  6109012 15502257 15654998
2020-04-23 17:55:21,166 process          L0436 DEBUG| [stdout]           524288   16384  3481511  7327053 13168055 12501496 13162853  7322442 13109493   8603922  13123262  5969623  5957752 13083364 13107149
2020-04-23 17:55:21,207 process          L0436 DEBUG| [stdout]
2020-04-23 17:55:21,208 process          L0436 DEBUG| [stdout] iozone test complete.
2020-04-23 17:55:21,208 process          L0686 INFO | Command '/var/tmp/avocado_3jxlz2x3/iozone3_434/src/current/iozone -a' finished with 0 after 141.19014263153076s
2020-04-23 17:55:21,211 stacktrace       L0039 ERROR|
2020-04-23 17:55:21,211 stacktrace       L0042 ERROR| Reproduced traceback from: /usr/local/lib/python3.6/site-packages/avocado_framework-78.0-py3.6.egg/avocado/core/test.py:865
2020-04-23 17:55:21,211 stacktrace       L0045 ERROR| Traceback (most recent call last):
2020-04-23 17:55:21,211 stacktrace       L0045 ERROR|   File "/home/ioci/avocado-fvt-wrapper/tests/avocado-misc-tests/io/disk/iozone.py", line 558, in test
2020-04-23 17:55:21,211 stacktrace       L0045 ERROR|     r_file.write(self.results)
2020-04-23 17:55:21,212 stacktrace       L0045 ERROR| TypeError: write() argument must be str, not bytes
2020-04-23 17:55:21,212 stacktrace       L0046 ERROR|
2020-04-23 17:55:21,212 test             L0870 DEBUG| Local variables:
2020-04-23 17:55:21,269 test             L0873 DEBUG|  -> r_file <class '_io.TextIOWrapper'>: <_io.TextIOWrapper name='/home/ioci/logs/io_nvme/results/job-2020-04-23T17.52-3d8c996/test-results/1-avocado-misc-tests_io_disk_iozone.py_IOZone.test_1-args-previous_results-dir-0627/data/raw_output' mode='w' encoding='UTF-8'>
2020-04-23 17:55:21,270 test             L0873 DEBUG|  -> analysisdir <class 'str'>: /home/ioci/logs/io_nvme/results/job-2020-04-23T17.52-3d8c996/test-results/1-avocado-misc-tests_io_disk_iozone.py_IOZone.test_1-args-previous_results-dir-0627/data/analysis
2020-04-23 17:55:21,270 test             L0873 DEBUG|  -> results_path <class 'str'>: /home/ioci/logs/io_nvme/results/job-2020-04-23T17.52-3d8c996/test-results/1-avocado-misc-tests_io_disk_iozone.py_IOZone.test_1-args-previous_results-dir-0627/data/raw_output
2020-04-23 17:55:21,270 test             L0873 DEBUG|  -> cmd <class 'str'>: /var/tmp/avocado_3jxlz2x3/iozone3_434/src/current/iozone
2020-04-23 17:55:21,270 test             L0873 DEBUG|  -> previous_results <class 'NoneType'>: None
2020-04-23 17:55:21,270 test             L0873 DEBUG|  -> args <class 'str'>: -a
2020-04-23 17:55:21,270 test             L0873 DEBUG|  -> directory <class 'str'>: /home/ioci/avocado-fvt-wrapper/tests/avocado-misc-tests/io/disk
2020-04-23 17:55:21,270 test             L0873 DEBUG|  -> self <class 'iozone.IOZone'>: 1-avocado-misc-tests/io/disk/iozone.py:IOZone.test;1-args-previous_results-dir-0627
2020-04-23 17:55:21,271 test             L0299 DEBUG| DATA (filename=output.expected) => NOT FOUND (data sources: variant, test, file)
2020-04-23 17:55:21,271 test             L0299 DEBUG| DATA (filename=stdout.expected) => NOT FOUND (data sources: variant, test, file)
2020-04-23 17:55:21,271 test             L0299 DEBUG| DATA (filename=stderr.expected) => NOT FOUND (data sources: variant, test, file)
2020-04-23 17:55:21,328 sysinfo          L0105 DEBUG| Not logging /proc/pci (file does not exist)
2020-04-23 17:55:21,364 sysinfo          L0173 DEBUG| Not logging 'dmidecode' (command 'dmidecode' was not found)
2020-04-23 17:55:21,409 sysinfo          L0105 DEBUG| Not logging /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor (file does not exist)
2020-04-23 17:55:21,411 sysinfo          L0173 DEBUG| Not logging 'brctl show' (command 'brctl' was not found)
2020-04-23 17:55:21,415 sysinfo          L0237 ERROR| Daemon process 'journalctl -f' (pid 13437) terminated abnormally (code 0)
2020-04-23 17:55:21,415 process          L0604 INFO | Running 'kill -19 13446'
2020-04-23 17:55:21,417 process          L0686 INFO | Command 'kill -19 13446' finished with 0 after 0.0006434917449951172s
2020-04-23 17:55:21,457 process          L0604 INFO | Running 'kill -9 13446'
2020-04-23 17:55:21,459 process          L0686 INFO | Command 'kill -9 13446' finished with 0 after 0.0007386207580566406s
2020-04-23 17:55:21,460 process          L0604 INFO | Running 'kill -18 13446'
2020-04-23 17:55:21,462 process          L0686 INFO | Command 'kill -18 13446' finished with 0 after 0.0006563663482666016s
2020-04-23 17:55:21,462 test             L1018 ERROR| Traceback (most recent call last):

2020-04-23 17:55:21,462 test             L1018 ERROR|   File "/usr/local/lib/python3.6/site-packages/avocado_framework-78.0-py3.6.egg/avocado/core/test.py", line 959, in _run_avocado
    raise test_exception

2020-04-23 17:55:21,463 test             L1018 ERROR|   File "/usr/local/lib/python3.6/site-packages/avocado_framework-78.0-py3.6.egg/avocado/core/test.py", line 860, in _run_avocado
    testMethod()
2020-04-23 17:55:21,463 test             L1018 ERROR|   File "/home/ioci/avocado-fvt-wrapper/tests/avocado-misc-tests/io/disk/iozone.py", line 558, in test
    r_file.write(self.results)

2020-04-23 17:55:21,463 test             L1018 ERROR| TypeError: write() argument must be str, not bytes
narasimhan-v commented 4 years ago

@abdhaleegit please check if this the repo we have is older.

I see that the below patch might have fixed the issue

commit df5faa01b8c129bb31bf752f495c1cd7be2359b6
Author: Praveen K Pandey <praveen@linux.vnet.ibm.com>
Date:   Fri Apr 24 12:15:54 2020 +0530

    Fixed iozone issue

    this patch will fix issue
    https://github.com/avocado-framework-tests/avocado-misc-tests/issues/1642

    Reported-by: Abdul Haleem <abdhalee@linux.vnet.ibm.com>
    Signed-off-by: Praveen K Pandey <praveen@linux.vnet.ibm.com>
smruti77 commented 4 years ago

this test is working fine,

JOB LOG    : /root/avocado/job-results/job-2020-06-09T00.48-a7d12a3/job.log
 (1/2) iozone.py:IOZone.test;1-args-previous_results-dir-0627: PASS (42.63 s)
 (2/2) iozone.py:IOZone.test;2-args-previous_results-dir-06ba: PASS (34.20 s)
RESULTS    : PASS 2 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML   : /root/avocado/job-results/job-2020-06-09T00.48-a7d12a3/results.html
JOB TIME   : 77.43 s
narasimhan-v commented 4 years ago

@smruti77 are you trying these on the system where the error eas seen ?

@abdhaleegit if we are not able to reproduce the error outside of CI system, please check the input files, and also the corresponding devices for any issues in them.

narasimhan-v commented 4 years ago

@smruti77 @abdhaleegit updates please

abdhaleegit commented 1 year ago

config issue, closing