selftests: netfilter: xt_string.sh: move to lib.sh infra
authorFlorian Westphal <fw@strlen.de>
Thu, 18 Apr 2024 15:27:33 +0000 (17:27 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 20 Apr 2024 03:10:50 +0000 (20:10 -0700)
commit5067fec09403b36f8f6501bdb4c5a9c949ce930b
tree68eb8ce67757f386e1c58ce05664ead15bca1a16
parentc1a9d47b59d02f466ead8c023f6822f68285edbe
selftests: netfilter: xt_string.sh: move to lib.sh infra

Intentional changes:
- Use socat instead of netcat
- Use a temporary file instead of pipe, else packets do not match
  "-m string" rules, multiple writes to the pipe cause multiple packets,
  but this needs only one to work.

Signed-off-by: Florian Westphal <fw@strlen.de>
Link: https://lore.kernel.org/r/20240418152744.15105-6-fw@strlen.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/netfilter/xt_string.sh