diff options
| author | Louis Burda <quent.burda@gmail.com> | 2022-10-06 12:02:32 +0200 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2022-10-06 12:02:32 +0200 |
| commit | 572985d705e4575d53ec5d312a484a96a01bce9f (patch) | |
| tree | cade3b6ac3d2e07e60116abbac6495645d0a3a92 /test/access.c | |
| parent | d505f8bebab8214981a7b4ad63e2595fa497074c (diff) | |
| download | cachepc-572985d705e4575d53ec5d312a484a96a01bce9f.tar.gz cachepc-572985d705e4575d53ec5d312a484a96a01bce9f.zip | |
Move cachepc ioctl into kvm device and remove old procfs endpoint
Diffstat (limited to 'test/access.c')
| -rw-r--r-- | test/access.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/access.c b/test/access.c index 1e38e1e..dc704fb 100644 --- a/test/access.c +++ b/test/access.c @@ -16,15 +16,15 @@ main(int argc, const char **argv) int fd, ret; size_t i; - fd = open("/proc/cachepc", O_RDONLY); + fd = open("/dev/kvm", O_RDONLY); if (fd < 0) err(1, "open"); - for (i = 0; i < 50; i++) { + for (i = 0; i < 100; i++) { arg = 48; /* target set */ - ret = ioctl(fd, CACHEPC_IOCTL_TEST_ACCESS, &arg); - if (ret == -1) err(1, "ioctl fail"); - printf("%i\n", arg); + 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); } |
