diff options
| author | Louis Burda <quent.burda@gmail.com> | 2023-01-10 01:37:23 +0100 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2023-01-10 01:38:43 +0100 |
| commit | 252b11a01e061fd17821e53a41c8451a1d2c27bd (patch) | |
| tree | e887ead2faddc8691fc13da426655a0062351cdc /test/access.c | |
| parent | 864f5fa9d539734d823b3d0613dbf1a43beec334 (diff) | |
| download | cachepc-252b11a01e061fd17821e53a41c8451a1d2c27bd.tar.gz cachepc-252b11a01e061fd17821e53a41c8451a1d2c27bd.zip | |
Begin ioctl and test-case overhaul
Diffstat (limited to 'test/access.c')
| -rw-r--r-- | test/access.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/test/access.c b/test/access.c deleted file mode 100644 index dc704fb..0000000 --- a/test/access.c +++ /dev/null @@ -1,30 +0,0 @@ -#include "cachepc/uapi.h" - -#include <sys/ioctl.h> -#include <stdlib.h> -#include <stdio.h> -#include <fcntl.h> -#include <stdint.h> -#include <err.h> -#include <fcntl.h> -#include <unistd.h> - -int -main(int argc, const char **argv) -{ - uint32_t arg; - int fd, ret; - size_t i; - - fd = open("/dev/kvm", O_RDONLY); - if (fd < 0) err(1, "open"); - - for (i = 0; i < 100; i++) { - arg = 48; /* target set */ - ret = ioctl(fd, KVM_CPC_TEST_ACCESS, &arg); - if (ret == -1) err(1, "ioctl TEST_ACCESS"); - if (arg != 1) errx(1, "access result (%i) != 1", arg); - } - - close(fd); -} |
