3 # Check decoding of address information (inode[->peer][,path])
4 # associated with unix domain socket descriptors.
6 . "${srcdir=.}/init.sh"
8 # strace -yy is implemented using /proc/self/fd
9 [ -d /proc/self/fd/ ] ||
10 framework_skip_ '/proc/self/fd/ is not available'
14 run_prog ./netlink_unix_diag
15 addr=unix-yy-local-stream
16 run_prog ./net-accept-connect $addr
17 run_strace_merge -yy -eclose,network $args
19 child="$(sed -rn '/SIGCHLD/ s/^.*, si_pid=([1-9][0-9]*), .*/\1/p' "$LOG")"
21 dump_log_and_fail_with 'failed to find pid of child process'
24 sed -rn "/^$child"' /!d; / socket\(/,$ s/^[0-9]+ +[^ ]+ (.+)/\1/p' "$LOG" > "$LOG"-connect &&
25 sed -rn "/^$child"' /d; /SIGCHLD/d; / socket\(/,$ s/^[0-9]+ +[^ ]+ (.+)/\1/p' "$LOG" > "$LOG"-accept ||
26 dump_log_and_fail_with 'failed to separate logs'
28 match_awk "$LOG-connect" "$srcdir"/unix-yy-connect.awk "$STRACE $args connect output mismatch" -v addr=$addr
29 match_awk "$LOG-accept" "$srcdir"/unix-yy-accept.awk "$STRACE $args accept output mismatch" -v addr=$addr