Re: [PATCH nft 2/2 v2] tests/shell: have .json-nft dumps prettified to wrap lines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Thu, Dec 07, 2023 at 10:08:50AM +0100, Thomas Haller wrote:
> Previously, the .json-nft file in git contains the output of `nft -j
> list ruleset`. This is one long line and makes diffs harder to review.
> Instead, have the prettified .json-nft file committed to git.
> - the diff now operates on the prettified version. That means, it
>   compares essentially
>      - `nft -j list ruleset | |`
>      - `cat "$TEST.json-nft" |`
>   The script "" is no longer used. It is kept
>   however, because it might be a useful for manual comparing files.
>   Note that "" and "" are still
>   two separate scripts and called at different times. They also do
>   something different. The former mangles the JSON to account for changes
>   that are not stable (in the JSON data itself), while the latter only
>   pretty prints it.
> - when generating a new .json-nft dump file, the file will be updated to
>   use the new, prettified format, unless the file is in the old format
>   and needs no update. This means, with DUMPGEN=y, old style is preserved
>   unless an update becomes necessary.
> This requires "" having stable output, as those files are
> committed to git. This is probably fine.
> Signed-off-by: Thomas Haller <thaller@xxxxxxxxxx>

Patch applied and pushed along with a bulk dump file conversion to
pretty format.

Thanks, Phil

[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux