On Wed, Sep 16, 2020 at 07:07:40PM +0530, Gopal Yadav wrote: > On Mon, Sep 14, 2020 at 4:16 PM Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> wrote: > > > It would be also good if you can add a test. For instance, have a look at: > > > > tests/shell/testcases/transactions/0049huge_0 > > > > which also adds a shell tests for json. You can just get back the > > listing in json and compare it. I suggest you use the > > testcases/listing/ folder to store this new test. > > Do you mean get back the terse json listing with "nft -j -t list > ruleset" and compare it with "nft -j list ruleset" and check if they > are different. And also check if attribute "elem" is present or > something else? I think you can add a set with elements, then run "nft -j -t list ruleset" and check that the elements are not present in the json output, keep it simple.