Before this change on systems with disabled IPv6 (e.g. `CONFIG_IPV6 is
not set` in kernel config), `lsfd/mkfds-tcp6` and `lsfd/mkfds-udp6` were
failing, and `lsfd/option-inet` was hanging forever, making it
impossible to complete the tests.
Signed-off-by: LiviaMedeiros <livia@cirno.name>
Reviewed-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
function ts_skip_docker {
test -e /.dockerenv && ts_skip "unsupported in docker environment"
}
+
+function ts_check_ipv6 {
+ if [ ! -e /proc/net/if_inet6 ]; then
+ ts_skip "IPv6 is not supported"
+ fi
+}
ts_check_test_command "$TS_CMD_LSFD"
ts_check_test_command "$TS_HELPER_MKFDS"
ts_check_native_byteorder
+ts_check_ipv6
ts_skip_docker
ts_cd "$TS_OUTDIR"
ts_check_test_command "$TS_CMD_LSFD"
ts_check_test_command "$TS_HELPER_MKFDS"
ts_check_native_byteorder
+ts_check_ipv6
ts_skip_docker
ts_cd "$TS_OUTDIR"
ts_check_test_command "$TS_CMD_LSFD"
ts_check_test_command "$TS_HELPER_MKFDS"
+ts_check_ipv6
ts_check_prog "mkfifo"