Project

General

Profile

Actions

Bug #16250

closed

use zfs_nicebytes() to print human-readable sizes

Added by Toomas Soome 22 days ago. Updated 19 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
zfs - Zettabyte File System
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

When libzutil was ported (#12235), the zfs_nicebytes() was introduced for us, but not really integrated with zfs commands. It turns out to be really useful to simplify zfs tests as we can just get numeric value for certain properties and wont need to deal with different units.

The OpenZFS commit to introduce zfs_nicebytes() is e7fbeb606a18b9f04daadddc19b9c4f9a9b34841

Testing done: run zfs-tests.


Related issues

Related to illumos gate - Bug #12235: Add libzutil for libzfs or libzpool consumersClosedJerry Jelinek

Actions
Related to illumos gate - Bug #16274: zfs-tests: refreserv_004_pos is failingNew

Actions
Actions #1

Updated by Toomas Soome 22 days ago

  • Related to Bug #12235: Add libzutil for libzfs or libzpool consumers added
Actions #2

Updated by Electric Monk 22 days ago

  • Gerrit CR set to 3268
Actions #3

Updated by Toomas Soome 20 days ago

  • Status changed from In Progress to Pending RTI
Actions #4

Updated by Toomas Soome 20 days ago

Toomas Soome wrote:

When libzutil was ported (#12235), the zfs_nicebytes() was introduced for us, but not really integrated with zfs commands. It turns out to be really useful to simplify zfs tests as we can just get numeric value for certain properties and wont need to deal with different units.

The OpenZFS commit to introduce zfs_nicebytes() is e7fbeb606a18b9f04daadddc19b9c4f9a9b34841

Testing done: run zfs-tests.

Diff from last run against gate:

root@test:/var/tmp/test_results# diff -u gate.txt current.txt 
--- gate.txt    P jaan 14 00:15:02 2024
+++ current.txt R veebr  9 22:18:22 2024
@@ -420,6 +422,7 @@
 Test: /opt/zfs-tests/tests/functional/cli_root/zfs_set/zfs_set_002_neg (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/cli_root/zfs_set/zfs_set_003_neg (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/cli_root/zfs_set/zfs_set_keylocation (run as root) [PASS]
+Test: /opt/zfs-tests/tests/functional/cli_root/zfs_set/zfs_set_feature_activation (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/cli_root/zfs_set/cleanup (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/cli_root/zfs_share/setup (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/cli_root/zfs_share/zfs_share_001_pos (run as root) [PASS]
@@ -523,7 +526,7 @@
 Test: /opt/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_012_neg (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_014_neg (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_015_neg (run as root) [PASS]
-Test: /opt/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_016_pos (run as root) [FAIL]
+Test: /opt/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_016_pos (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_017_neg (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_018_pos (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_019_pos (run as root) [PASS]
@@ -764,6 +767,9 @@
 Test: /opt/zfs-tests/tests/functional/compression/compress_004_pos (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/compression/l2arc_compressed_arc (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/compression/l2arc_compressed_arc_disabled (run as root) [PASS]
+Test: /opt/zfs-tests/tests/functional/compression/l2arc_encrypted (run as root) [PASS]
+Test: /opt/zfs-tests/tests/functional/compression/l2arc_encrypted_no_compressed_arc (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/compression/cleanup (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/ctime/setup (run as root)   [PASS]
 Test: /opt/zfs-tests/tests/functional/ctime/ctime_001_pos (run as root) [PASS]
@@ -996,7 +1002,7 @@
 Test: /opt/zfs-tests/tests/functional/raidz/cleanup (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/redundancy/setup (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/redundancy/redundancy_001_pos (run as root) [PASS]
-Test: /opt/zfs-tests/tests/functional/redundancy/redundancy_002_pos (run as root) [FAIL]
+Test: /opt/zfs-tests/tests/functional/redundancy/redundancy_002_pos (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/redundancy/redundancy_003_pos (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/redundancy/redundancy_004_neg (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/redundancy/cleanup (run as root) [PASS]
@@ -1015,7 +1021,7 @@
 Test: /opt/zfs-tests/tests/functional/refreserv/refreserv_004_pos (run as root) [FAIL]
 Test: /opt/zfs-tests/tests/functional/refreserv/refreserv_005_pos (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/refreserv/refreserv_raidz (run as root) [PASS]
-Test: /opt/zfs-tests/tests/functional/refreserv/refreserv_multi_raidz (run as root) [FAIL]
+Test: /opt/zfs-tests/tests/functional/refreserv/refreserv_multi_raidz (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/refreserv/cleanup (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/removal/removal_sanity (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/removal/removal_all_vdev (run as root) [PASS]
@@ -1119,7 +1125,7 @@
 Test: /opt/zfs-tests/tests/functional/rsend/send-cpL_varied_recsize (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/rsend/send-c_recv_dedup (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/rsend/send_encrypted_files (run as root) [PASS]
-Test: /opt/zfs-tests/tests/functional/rsend/send_encrypted_freeobjects (run as root) [FAIL]
+Test: /opt/zfs-tests/tests/functional/rsend/send_encrypted_freeobjects (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/rsend/send_encrypted_hierarchy (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/rsend/send_encrypted_props (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/rsend/send_encrypted_truncated_files (run as root) [PASS]
@@ -1129,11 +1135,11 @@
 Test: /opt/zfs-tests/tests/functional/rsend/send_mixed_raw (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/rsend/send-wDR_encrypted_zvol (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/rsend/cleanup (run as root) [PASS]
-Test: /opt/zfs-tests/tests/functional/scrub_mirror/setup (run as root) [FAIL]
-Test: /opt/zfs-tests/tests/functional/scrub_mirror/scrub_mirror_001_pos (run as root) [SKIP]
-Test: /opt/zfs-tests/tests/functional/scrub_mirror/scrub_mirror_002_pos (run as root) [SKIP]
-Test: /opt/zfs-tests/tests/functional/scrub_mirror/scrub_mirror_003_pos (run as root) [SKIP]
-Test: /opt/zfs-tests/tests/functional/scrub_mirror/scrub_mirror_004_pos (run as root) [SKIP]
+Test: /opt/zfs-tests/tests/functional/scrub_mirror/setup (run as root) [PASS]
+Test: /opt/zfs-tests/tests/functional/scrub_mirror/scrub_mirror_001_pos (run as root) [PASS]
+Test: /opt/zfs-tests/tests/functional/scrub_mirror/scrub_mirror_002_pos (run as root) [PASS]
+Test: /opt/zfs-tests/tests/functional/scrub_mirror/scrub_mirror_003_pos (run as root) [PASS]
+Test: /opt/zfs-tests/tests/functional/scrub_mirror/scrub_mirror_004_pos (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/scrub_mirror/cleanup (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/slog/setup (run as root)    [PASS]
 Test: /opt/zfs-tests/tests/functional/slog/slog_001_pos (run as root) [PASS]
@@ -1210,7 +1216,7 @@
 Test: /opt/zfs-tests/tests/functional/userquota/userquota_001_pos (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/userquota/userquota_002_pos (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/userquota/userquota_003_pos (run as root) [PASS]
-Test: /opt/zfs-tests/tests/functional/userquota/userquota_004_pos (run as root) [PASS]
+Test: /opt/zfs-tests/tests/functional/userquota/userquota_004_pos (run as root) [FAIL]
 Test: /opt/zfs-tests/tests/functional/userquota/userquota_005_neg (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/userquota/userquota_006_pos (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/userquota/userquota_007_pos (run as root) [PASS]
@@ -1247,9 +1253,9 @@
 Test: /opt/zfs-tests/tests/functional/vdev_zaps/vdev_zaps_006_pos (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/vdev_zaps/vdev_zaps_007_pos (run as root) [FAIL]
 Test: /opt/zfs-tests/tests/functional/vdev_zaps/cleanup (run as root) [PASS]
-Test: /opt/zfs-tests/tests/functional/write_dirs/setup (run as root) [FAIL]
-Test: /opt/zfs-tests/tests/functional/write_dirs/write_dirs_001_pos (run as root) [SKIP]
-Test: /opt/zfs-tests/tests/functional/write_dirs/write_dirs_002_pos (run as root) [SKIP]
+Test: /opt/zfs-tests/tests/functional/write_dirs/setup (run as root) [PASS]
+Test: /opt/zfs-tests/tests/functional/write_dirs/write_dirs_001_pos (run as root) [PASS]
+Test: /opt/zfs-tests/tests/functional/write_dirs/write_dirs_002_pos (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/write_dirs/cleanup (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/xattr/setup (run as root)   [PASS]
 Test: /opt/zfs-tests/tests/functional/xattr/xattr_001_pos (run as root) [PASS]
@@ -1262,7 +1268,7 @@
 Test: /opt/zfs-tests/tests/functional/xattr/xattr_008_pos (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/xattr/xattr_009_neg (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/xattr/xattr_010_neg (run as root) [PASS]
-Test: /opt/zfs-tests/tests/functional/xattr/xattr_011_pos (run as root) [FAIL]
+Test: /opt/zfs-tests/tests/functional/xattr/xattr_011_pos (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/xattr/xattr_012_pos (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/xattr/xattr_013_pos (run as root) [PASS]
 Test: /opt/zfs-tests/tests/functional/xattr/cleanup (run as root) [PASS]
root@test:/var/tmp/test_results#

Actions #5

Updated by Toomas Soome 20 days ago

  • Related to Bug #16274: zfs-tests: refreserv_004_pos is failing added
Actions #6

Updated by Electric Monk 19 days ago

  • Status changed from Pending RTI to Closed
  • % Done changed from 90 to 100

git commit 6520eed593b6f28dfe76a9ad27bf2030d9af0a43

commit  6520eed593b6f28dfe76a9ad27bf2030d9af0a43
Author: Toomas Soome <tsoome@me.com>
Date:   2024-02-11T23:20:41.000Z

    16250 use zfs_nicebytes() to print human-readable sizes
    Reviewed by: Andy Fiddaman <illumos@fiddaman.net>
    Reviewed by: C Fraire <cfraire@me.com>
    Approved by: Gordon Ross <gordon.w.ross@gmail.com>

Actions

Also available in: Atom PDF