Added `test` make target & test program.

Fortune for memfd_secret-shim's current commit: Half curse − 半凶
master
Avril 7 months ago
parent 5b683de5ee
commit 7eaf4df51c
Signed by: flanchan
GPG Key ID: 284488987C31F630

1
.gitignore vendored

@ -5,6 +5,7 @@ perf/
*.o *.o
*-debug *-debug
*-release *-release
*-test
*.so *.so
*.so.* *.so.*
*.gch *.gch

@ -0,0 +1,21 @@
#include <sys/mman.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <memfd_secret.h>
int main()
{
int fd = memfd_secret(0);
if(fd < 0) {
perror("memfd_secret() failed");
return 1;
}
printf("Created memfd_secret (sec: %d): fd = %d\n", (int)_has_memfd_secret(), fd);
close(fd);
return 0;
}
Loading…
Cancel
Save