File: net-yy-inet.test

package info (click to toggle)
strace 6.13%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 71,488 kB
  • sloc: ansic: 176,497; sh: 9,675; makefile: 4,133; cpp: 885; awk: 353; perl: 267; exp: 62; sed: 9
file content (25 lines) | stat: -rwxr-xr-x 711 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
#
# Check decoding of ip:port pairs associated with socket descriptors
#
# Copyright (c) 2014-2016 Dmitry V. Levin <ldv@strace.io>
# Copyright (c) 2016-2024 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.
#
# Filter out listen() call as we cannot easily predict the kernel
# behaviour because there is no easy way to tell whether the Linux kernel
# contains commit v6.8-rc1~131^2~223.
sed -n '/^listen/d;/^socket/,$p' < "$LOG" > "$OUT"
match_diff "$OUT" "$EXP"