1 /*
2 * Copyright (c) 2017-2018 The strace developers.
3 * All rights reserved.
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 */
7
8 #include "tests.h"
9
10 #include <sys/stat.h>
11 #include <unistd.h>
12
13 void
14 skip_if_unavailable(const char *const path)
15 {
16 struct stat st;
17
18 if (stat(path, &st))
19 perror_msg_and_skip("stat: %s", path);
20 }