strace/tests/net-yy-inet.test
Dmitry V. Levin c6782f144a tests: change the license to GPL-2.0-or-later
strace test suite is now provided under the terms of the GNU General
Public License version 2 or later, see tests/COPYING for more details.
2018-12-10 00:00:00 +00:00

22 lines
522 B
Bash
Executable File

#!/bin/sh
#
# Check decoding of ip:port pairs associated with socket descriptors
#
# Copyright (c) 2014-2016 Dmitry V. Levin <ldv@altlinux.org>
# Copyright (c) 2016-2017 The strace developers.
# All rights reserved.
#
# SPDX-License-Identifier: GPL-2.0-or-later
. "${srcdir=.}/init.sh"
check_prog sed
run_prog ../netlink_inet_diag
run_prog > /dev/null
run_strace -a22 -yy -eclose,network $args > "$EXP"
# Filter out close() calls made by ld.so and libc.
sed -n '/socket/,$p' < "$LOG" > "$OUT"
match_diff "$OUT" "$EXP"