blob: 4559b426d1011f7c614a0a9ced7f9dcd71be3904 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#include "tests.h"
#include <asm/unistd.h>
#include "scno.h"
#ifdef __NR_memfd_create
# include <stdio.h>
# include <unistd.h>
int
main(void)
{
static const char text[] = "strace";
int rc = syscall(__NR_memfd_create, text, 0xf);
printf("memfd_create(\"%s\", %s) = %s\n",
text, "MFD_CLOEXEC|MFD_ALLOW_SEALING|MFD_HUGETLB|0x8",
sprintrc(rc));
puts("+++ exited with 0 +++");
return 0;
}
#else
SKIP_MAIN_UNDEFINED("__NR_memfd_create")
#endif
|