1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * Copyright (c) 2018, Linux Test Project
4 */
5
6 #include <stdlib.h>
7 #include <unistd.h>
8 #include "tst_test.h"
9 #include "tst_sys_conf.h"
10
11 static const char * const save_restore[] = {
12 "?/proc/nonexistent",
13 "!/proc/sys/kernel/numa_balancing",
14 "/proc/sys/kernel/core_pattern",
15 NULL,
16 };
17
setup(void)18 static void setup(void)
19 {
20 SAFE_FILE_PRINTF("/proc/sys/kernel/core_pattern", "changed");
21 tst_sys_conf_dump();
22 }
23
run(void)24 static void run(void)
25 {
26 tst_res(TPASS, "OK");
27 }
28
29 static struct tst_test test = {
30 .needs_root = 1,
31 .test_all = run,
32 .setup = setup,
33 .save_restore = save_restore,
34 };
35