unplugged-system/external/ltp/lib/newlib_tests/test19.c

33 lines
654 B
C

// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (c) 2018, Linux Test Project
*/
#include <stdlib.h>
#include <unistd.h>
#include "tst_test.h"
#include "tst_sys_conf.h"
static void setup(void)
{
SAFE_FILE_PRINTF("/proc/sys/kernel/core_pattern", "changed");
tst_sys_conf_dump();
}
static void run(void)
{
tst_res(TPASS, "OK");
}
static struct tst_test test = {
.needs_root = 1,
.test_all = run,
.setup = setup,
.save_restore = (const struct tst_path_val[]) {
{"/proc/nonexistent", NULL, TST_SR_SKIP},
{"/proc/sys/kernel/numa_balancing", NULL, TST_SR_TBROK},
{"/proc/sys/kernel/core_pattern", NULL, TST_SR_TCONF},
{}
},
};