summaryrefslogtreecommitdiff
path: root/tests/psk-file.c
diff options
context:
space:
mode:
authorRical Jasan <ricaljasan@pacific.net>2017-02-17 21:22:19 -0800
committerNikos Mavrogiannopoulos <nmav@redhat.com>2017-02-19 09:44:23 +0100
commit8c0ab41b766002be9631399a210f6dd71874d4f7 (patch)
tree4173dfcb78a4e244c7c3df97f180c0f4923b9610 /tests/psk-file.c
parent39d4e43edb75bfdc85372b093598f26c1481496a (diff)
downloadgnutls-tmp-work-without-netstat.tar.gz
tests: Improve port-checking infrastructure.tmp-work-without-netstat
The test suite unnecessarily failed on systems without netstat because it was assumed to be present. Instead of simply checking for its presence and indicating an unsupported test, however, the ss utility can be used as a drop-in replacement. When netstat/net-tools is not present, the ss utility from iproute2 still stands a fair chance of existing, and they also have similar enough semantics that they can be used interchangeably in the test suite. The functions in tests/scripts/common.sh that used netstat (wait_for_port, wait_for_free_port) now use new functions, check_if_port_in_use and check_if_port_listening, to abstract the call to netstat/ss. The eval'd variable GETPORT also used netstat, and has been updated accordingly. The new port-checking functions use another new function, have_port_finder, which takes care of the details of selecting ss (preferred) or netstat, or fails otherwise. Signed-off-by: Rical Jasan <ricaljasan@pacific.net> Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'tests/psk-file.c')
0 files changed, 0 insertions, 0 deletions