Re: [PATCH v4] test-lib-functions: use test-tool for [de]packetize()
- From
Jeff King <peff@peff.net>
- Date
- Jul 16, 2021, 19:03 UTC
- Message-ID
- <YPHYHx9W4HSRMmq+@coredump.intra.peff.net>
- In-Reply-To
- <patch-1.1-546974eed59-20210716T153909Z-avarab@gmail.com>
On Fri, Jul 16, 2021 at 05:41:33PM +0200, Ævar Arnfjörð Bjarmason wrote:
Show 8 quoted lines
> I ejected changing/adding test code for this v4. This keeps the > compatibility wrappers and just narrowly changes the things that need > a packetize_raw() to use that new helper. > > I left the simpler packetize() case as a "printf", it could also use > the test tool, but in case someone cares about process overhead on say > Windows this entire change should be strictly better than the status > quo.
This looks fine to me. I actually did like some of the readability improvements possible in the other patches, but they can still be easily built on top if we care to.
Using "test-tool pkt-line unpack" doesn't behave exactly like depacketize:
- as noted earlier, it drops stuff after a NUL
- it says "0000" instead of "FLUSH"
But we don't seem to depend on either of those in any tests, so it's a good time to switch. :)
-Peff