summaryrefslogtreecommitdiff
path: root/tests/net-y-unix.test
blob: 3538a5fefcfea73932be8faca467d95a0d75779b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
#
# Check decoding of network syscalls in -y mode.
#
# Copyright (c) 2016-2021 Dmitry V. Levin <ldv@strace.io>
# All rights reserved.
#
# SPDX-License-Identifier: GPL-2.0-or-later

. "${srcdir=.}/init.sh"

check_prog sed

run_prog > /dev/null
run_strace -a20 -y -eclose,network $args > "$EXP"

# Filter out close() calls made by ld.so and libc.
sed -n '/socket/,$p' < "$LOG" > "$OUT"
match_diff "$OUT" "$EXP"