Project

General

Profile

Actions

Bug #13792

closed

zfs_program_json zfs test can sometimes fail due to poor json comparison

Added by Jason King 7 months ago. Updated 7 months ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

I encountered a failure with zfs_program_json, looking at the failure:

NOTE: Got     :{
    "return": {
        "succeeded": {
            "testpool/zcp-json": 131072
        },
        "failed": {}
    }
}
NOTE: Expected:{
    "return": {
        "failed": {},
        "succeeded": {
            "testpool/zcp-json": 131072
        }
    }
}

Unfortunately, it appears the test is relying on the order of the properties being returned from LUA to be predictable. These JSON are effectively identical (thus the test actually passed), and we should investigate a better way to compare results.

Actions #1

Updated by Matt Fiddaman 7 months ago

  • Assignee set to Matt Fiddaman
Actions #2

Updated by Electric Monk 7 months ago

  • Gerrit CR set to 1502
Actions #3

Updated by Matt Fiddaman 7 months ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 90
Actions #4

Updated by Matt Fiddaman 7 months ago

To test this change, I ran the test in a loop for 3 hours before applying the change in an attempt to get it to fail as above, then I ran it for another 3 hours after the change and it passed every time. This change has also been in openzfs for over a year with no issues.

Actions #5

Updated by Matt Fiddaman 7 months ago

  • Status changed from In Progress to Pending RTI
  • % Done changed from 90 to 100
Actions #6

Updated by Electric Monk 7 months ago

  • Status changed from Pending RTI to Closed

git commit 9c529ec6574455bcb43e19fed8ca49fe5518be38

commit  9c529ec6574455bcb43e19fed8ca49fe5518be38
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   2021-05-21T21:43:47.000Z

    13792 zfs_program_json zfs test can sometimes fail due to poor json comparison
    Reviewed by: Robert Mustacchi <rm@fingolfin.org>
    Reviewed by: Sebastian Wiedenroth <sebastian.wiedenroth@skylime.net>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF