Project

General

Profile

Bug #12189

zfs test suite calculates md5 digests suboptimally

Added by Kody Kantor 3 months ago. Updated 2 months ago.

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

100%

Estimated time:
Difficulty:
Bite-size
Tags:

Description

While going through the RTI for #12034 Dan noted that we could simplify some testing code by using digest(1) instead using md5sum(1) and piping the output to awk.

We can use digest(1) to replace the md5sum | awk pattern pretty easily:

$ digest -a md5 README.md
7ed980493c1161d119bd89dc85819b3f

History

#1

Updated by Kody Kantor 3 months ago

To test this I booted a new environment with these changed, crafted a runfile that contains the modified tests, and ran it. All the tests pass, just as before.

$ ./bin/zfstest -c ./kkantor.run
Test: /opt/zfs-tests/tests/functional/cli_root/zfs_receive/setup (run as root) [00:00] [PASS]
Test: /opt/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_from_encrypted (run as root) [00:02] [PASS]
Test: /opt/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_raw (run as root) [00:05] [PASS]
Test: /opt/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_raw_incremental (run as root) [00:08] [PASS]
Test: /opt/zfs-tests/tests/functional/cli_root/zfs_receive/cleanup (run as root) [00:00] [PASS]
Test: /opt/zfs-tests/tests/functional/history/setup (run as root) [00:00] [PASS]
Test: /opt/zfs-tests/tests/functional/history/history_003_pos (run as root) [00:46] [PASS]
Test: /opt/zfs-tests/tests/functional/history/cleanup (run as root) [00:00] [PASS]
Test: /opt/zfs-tests/tests/functional/rsend/setup (run as root)   [00:06] [PASS]
Test: /opt/zfs-tests/tests/functional/rsend/send-c_volume (run as root) [00:03] [PASS]
Test: /opt/zfs-tests/tests/functional/rsend/send-wDR_encrypted_zvol (run as root) [00:14] [PASS]
Test: /opt/zfs-tests/tests/functional/rsend/send_encrypted_props (run as root) [00:14] [PASS]
Test: /opt/zfs-tests/tests/functional/rsend/cleanup (run as root) [00:00] [PASS]

Results Summary
PASS      13

Running Time:   00:01:43
Percent passed: 100.0%
#2

Updated by Electric Monk 2 months ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit e3bf7d5a53699b06ef4e776789b585322c4bf8ed

commit  e3bf7d5a53699b06ef4e776789b585322c4bf8ed
Author: Kody Kantor <kody@kkantor.com>
Date:   2020-01-23T18:22:16.000Z

    12189 zfs test suite calculates md5 digests suboptimally
    Reviewed by: Dan McDonald <danmcd@joyent.com>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Approved by: Gordon Ross <gordon.w.ross@gmail.com>

Also available in: Atom PDF