• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3  * Copyright (c) Crackerjack Project., 2007
4  * Ported from Crackerjack to LTP by Masatake YAMATO <yamato@redhat.com>
5  * Copyright (c) 2011 Cyril Hrubis <chrubis@suse.cz>
6  */
7 
8 /*\
9  * [Description]
10  *
11  * Calls io_getevents() when ctx is invalid and expects it to return EINVAL.
12  */
13 
14 #include <linux/aio_abi.h>
15 
16 #include "config.h"
17 #include "tst_test.h"
18 #include "lapi/syscalls.h"
19 
run(void)20 static void run(void)
21 {
22 	aio_context_t ctx;
23 	memset(&ctx, 0, sizeof(ctx));
24 	TST_EXP_FAIL(tst_syscall(__NR_io_getevents, ctx, 0, 0, NULL, NULL), EINVAL);
25 }
26 
27 static struct tst_test test = {
28 	.test_all = run,
29 };
30