#!/bin/sh
#
# Check decoding of address information (inode[->peer][,path])
# associated with unix domain socket descriptors.
#
# Copyright (c) 2014 Masatake YAMATO <yamato@redhat.com>
# Copyright (c) 2014-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 ../netlink_unix_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"
