1f08c3bdfSopenharmony_ci/*
2f08c3bdfSopenharmony_ci * Copyright (c) 2002, Intel Corporation. All rights reserved.
3f08c3bdfSopenharmony_ci * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
4f08c3bdfSopenharmony_ci * This file is licensed under the GPL license.  For the full content
5f08c3bdfSopenharmony_ci * of this license, see the COPYING file at the top level of this
6f08c3bdfSopenharmony_ci * source tree.
7f08c3bdfSopenharmony_ci */
8f08c3bdfSopenharmony_ci
9f08c3bdfSopenharmony_ci/*
10f08c3bdfSopenharmony_ci * return codes
11f08c3bdfSopenharmony_ci */
12f08c3bdfSopenharmony_ci
13f08c3bdfSopenharmony_ci#define PTS_PASS        0
14f08c3bdfSopenharmony_ci#define PTS_FAIL        1
15f08c3bdfSopenharmony_ci#define PTS_UNRESOLVED  2
16f08c3bdfSopenharmony_ci#define PTS_UNSUPPORTED 4
17f08c3bdfSopenharmony_ci#define PTS_UNTESTED    5
18f08c3bdfSopenharmony_ci
19f08c3bdfSopenharmony_ci#ifndef ARRAY_SIZE
20f08c3bdfSopenharmony_ci#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0]))
21f08c3bdfSopenharmony_ci#endif
22f08c3bdfSopenharmony_ci
23f08c3bdfSopenharmony_ci#define PTS_ATTRIBUTE_NORETURN		__attribute__((noreturn))
24f08c3bdfSopenharmony_ci#define PTS_ATTRIBUTE_UNUSED		__attribute__((unused))
25f08c3bdfSopenharmony_ci#define PTS_ATTRIBUTE_UNUSED_RESULT	__attribute__((warn_unused_result))
26f08c3bdfSopenharmony_ci
27f08c3bdfSopenharmony_ci#define PTS_WRITE_MSG(msg) do { \
28f08c3bdfSopenharmony_ci         if (write(STDOUT_FILENO, msg, sizeof(msg) - 1)) { \
29f08c3bdfSopenharmony_ci                 /* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425 */ \
30f08c3bdfSopenharmony_ci         } \
31f08c3bdfSopenharmony_ci} while (0)
32