1*49cdfc7eSAndroid Build Coastguard Worker // SPDX-License-Identifier: GPL-2.0-or-later 2*49cdfc7eSAndroid Build Coastguard Worker /* 3*49cdfc7eSAndroid Build Coastguard Worker * Copyright (c) 2016 Linux Test Project 4*49cdfc7eSAndroid Build Coastguard Worker */ 5*49cdfc7eSAndroid Build Coastguard Worker 6*49cdfc7eSAndroid Build Coastguard Worker /* 7*49cdfc7eSAndroid Build Coastguard Worker * Test for segfault. 8*49cdfc7eSAndroid Build Coastguard Worker */ 9*49cdfc7eSAndroid Build Coastguard Worker 10*49cdfc7eSAndroid Build Coastguard Worker #include "tst_test.h" 11*49cdfc7eSAndroid Build Coastguard Worker do_test(void)12*49cdfc7eSAndroid Build Coastguard Workerstatic void do_test(void) 13*49cdfc7eSAndroid Build Coastguard Worker { 14*49cdfc7eSAndroid Build Coastguard Worker volatile char *ptr = NULL; 15*49cdfc7eSAndroid Build Coastguard Worker 16*49cdfc7eSAndroid Build Coastguard Worker *ptr = 0; 17*49cdfc7eSAndroid Build Coastguard Worker 18*49cdfc7eSAndroid Build Coastguard Worker tst_res(TPASS, "Not reached"); 19*49cdfc7eSAndroid Build Coastguard Worker } 20*49cdfc7eSAndroid Build Coastguard Worker 21*49cdfc7eSAndroid Build Coastguard Worker static struct tst_test test = { 22*49cdfc7eSAndroid Build Coastguard Worker .test_all = do_test, 23*49cdfc7eSAndroid Build Coastguard Worker }; 24