From 572985d705e4575d53ec5d312a484a96a01bce9f Mon Sep 17 00:00:00 2001 From: Louis Burda Date: Thu, 6 Oct 2022 12:02:32 +0200 Subject: Move cachepc ioctl into kvm device and remove old procfs endpoint --- test/access.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test/access.c') 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); } -- cgit v1.2.3-71-gd317