Project

General

Profile

Actions

Bug #14160

closed

test-runner: UnicodeDecodeError when zfstest -l logfile is used

Added by Toomas Soome 12 days ago. Updated 7 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
tests
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

    tsoome@openindiana:~$ /opt/zfs-tests/bin/zfstest -l /var/tmp/test_results/20211012T105218/log
    Traceback (most recent call last):
      File "/opt/test-runner/bin/run", line 973, in <module>
        main()
      File "/opt/test-runner/bin/run", line 960, in main
        filter_tests(testrun, options)
      File "/opt/test-runner/bin/run", line 867, in filter_tests
        line = fh.readline()
      File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 526: ordinal not in range(128)
    tsoome@openindiana:~$

The chars in question are appearing from test bootfs_004_neg:

Test: /opt/zfs-tests/tests/functional/bootfs/bootfs_004_neg (run as root) [00:00
] [PASS]
10:59:34.83 ASSERTION: Invalid pool names are rejected by zpool set bootfs
10:59:34.91 SUCCESS: zpool create pool//1715/testfs /bootfs_004.1715.dat exited 
1
10:59:34.93 SUCCESS: zfs create pool//1715/testfs/testfs exited 1
10:59:34.94 SUCCESS: zpool set bootfs=pool//1715/testfs/testfs pool//1715/testfs
 exited 1
10:59:34.95 SUCCESS: zpool create pool%d123/testfs /bootfs_004.1715.dat exited 1
10:59:34.97 SUCCESS: zfs create pool%d123/testfs/testfs exited 1
10:59:34.98 SUCCESS: zpool set bootfs=pool%d123/testfs/testfs pool%d123/testfs e
xited 1
10:59:34.99 SUCCESS: zpool create mirror/testfs /bootfs_004.1715.dat exited 1
10:59:35.04 SUCCESS: zfs create mirror/testfs/testfs exited 1
10:59:35.06 SUCCESS: zpool set bootfs=mirror/testfs/testfs mirror/testfs exited 
1
10:59:35.07 SUCCESS: zpool create c0t0d0s0/testfs /bootfs_004.1715.dat exited 1
10:59:35.08 SUCCESS: zfs create c0t0d0s0/testfs/testfs exited 1
10:59:35.08 SUCCESS: zpool set bootfs=c0t0d0s0/testfs/testfs c0t0d0s0/testfs exi
ted 1
10:59:35.09 SUCCESS: zpool create pool*23*/testfs /bootfs_004.1715.dat exited 1
10:59:35.10 SUCCESS: zfs create pool*23*/testfs/testfs exited 1
10:59:35.11 SUCCESS: zpool set bootfs=pool*23*/testfs/testfs pool*23*/testfs exi
ted 1
10:59:35.12 SUCCESS: zpool create *po!l/testfs /bootfs_004.1715.dat exited 1
10:59:35.12 SUCCESS: zfs create *po!l/testfs/testfs exited 1
10:59:35.13 SUCCESS: zpool set bootfs=*po!l/testfs/testfs *po!l/testfs exited 1
10:59:35.14 SUCCESS: zpool create %s<C2><A3><C2><A3>%^/testfs /bootfs_004.1715.d
at exited 1
10:59:35.15 SUCCESS: zfs create %s<C2><A3><C2><A3>%^/testfs/testfs exited 1
10:59:35.15 SUCCESS: zpool set bootfs=%s<C2><A3><C2><A3>%^/testfs/testfs %s<C2><<A3><C2><A3>%^/testfs exited 1

apparently, adding errors='replace' to open() does allow the log file to be processed.

Testing done: zfstest -l logfile is now able to work:

tsoome@openindiana:~$ /opt/zfs-tests/bin/zfstest -l /var/tmp/test_results/20211012T105218/log
Test: /opt/zfs-tests/tests/functional/acl/nontrivial/setup (run as root) [00:15] [PASS]
Test: /opt/zfs-tests/tests/functional/acl/nontrivial/zfs_acl_chmod_inherit_003_pos (run as root) [00:25] [FAIL]
Test: /opt/zfs-tests/tests/functional/acl/nontrivial/cleanup (run as root) [00:09] [PASS]
Test: /opt/zfs-tests/tests/functional/bootfs/setup (run as root)  [00:00] [PASS]
...
Actions #1

Updated by Electric Monk 12 days ago

  • Gerrit CR set to 1751
Actions #2

Updated by Toomas Soome 12 days ago

  • Description updated (diff)
Actions #3

Updated by Toomas Soome 10 days ago

  • Description updated (diff)
Actions #4

Updated by Toomas Soome 10 days ago

  • Description updated (diff)
Actions #5

Updated by Electric Monk 7 days ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

git commit 4947898c5d89bcfb597a613c643ce2c82845f0b9

commit  4947898c5d89bcfb597a613c643ce2c82845f0b9
Author: Toomas Soome <tsoome@me.com>
Date:   2021-10-16T06:22:30.000Z

    14160 test-runner: UnicodeDecodeError when zfstest -l logfile is used
    Reviewed by: Andy Fiddaman <andy@omnios.org>
    Approved by: Robert Mustacchi <rm@fingolfin.org>

Actions

Also available in: Atom PDF