xref: /third_party/ltp/lib/newlib_tests/test_assert.c
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/ltp/lib/newlib_tests/
1f08c3bdfSopenharmony_ci// SPDX-License-Identifier: GPL-2.0-or-later
2f08c3bdfSopenharmony_ci/*
3f08c3bdfSopenharmony_ci * Copyright (c) 2020 Yang Xu <xuyang2018.jy@cn.fujitsu.com>
4f08c3bdfSopenharmony_ci */
5f08c3bdfSopenharmony_ci
6f08c3bdfSopenharmony_ci#include <stdio.h>
7f08c3bdfSopenharmony_ci#include "tst_test.h"
8f08c3bdfSopenharmony_ci
9f08c3bdfSopenharmony_cistatic void do_test(void)
10f08c3bdfSopenharmony_ci{
11f08c3bdfSopenharmony_ci	TST_ASSERT_INT("/proc/self/oom_score", 0);
12f08c3bdfSopenharmony_ci	TST_ASSERT_STR("/proc/self/comm", "test_assert");
13f08c3bdfSopenharmony_ci	TST_ASSERT_FILE_INT("/proc/self/io", "read_bytes:", 0);
14f08c3bdfSopenharmony_ci	TST_ASSERT_FILE_STR("/proc/self/status1", "State", "unexpected");
15f08c3bdfSopenharmony_ci}
16f08c3bdfSopenharmony_ci
17f08c3bdfSopenharmony_cistatic struct tst_test test = {
18f08c3bdfSopenharmony_ci	.test_all = do_test,
19f08c3bdfSopenharmony_ci};
20

Indexes created Thu Nov 07 10:32:03 CST 2024