xref: /aosp_15_r20/external/ltp/lib/newlib_tests/tst_needs_cmds07.c (revision 49cdfc7efb34551c7342be41a7384b9c40d7cab7)
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3  * Copyright (c) 2021 Yang Xu <[email protected]>
4  */
5 
6 /*
7  * Test non-existed cmd whether still can be detected.
8  */
9 
10 #include "tst_test.h"
11 
do_test(void)12 static void do_test(void)
13 {
14 	tst_res(TFAIL, "Nonexisting command is present!");
15 }
16 
17 static struct tst_test test = {
18 	.test_all = do_test,
19 	.needs_cmds = (const char *[]) {
20 		"mkfs.ext45",
21 		NULL
22 	}
23 };
24