#!/bin/sh
#
# Check -r option.
#
# Copyright (c) 2016-2026 The strace developers.
# All rights reserved.
#
# SPDX-License-Identifier: GPL-2.0-or-later

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

r_opt="${1:--r}"

run_prog ../sleep-timing 0 "$TIMING_FILE"
run_strace "${r_opt}" -echdir ../sleep-timing 1 "$TIMING_FILE"
match_grep
check_strace_relative_exit_time "${r_opt}"
