From: Ben Gras Date: Wed, 10 Oct 2012 16:35:08 +0000 (+0200) Subject: minor fixes for safecopy & safemap tests X-Git-Tag: v3.2.1~292^2 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/jquery.js?a=commitdiff_plain;h=39393e704683b35b1b10c17e4819affd1fb9640b;p=minix.git minor fixes for safecopy & safemap tests --- diff --git a/test/safecopy/Makefile b/test/safecopy/Makefile index 67d7da7db..42fd715c6 100644 --- a/test/safecopy/Makefile +++ b/test/safecopy/Makefile @@ -2,10 +2,10 @@ all: requestor grantor 1fifo 2fifo chmod +x down run requestor: requestor.c inc.h - cc -o $@ $< -lsys + cc -static -o $@ $< -lsys -lminlib -lcompat_minix grantor: grantor.c inc.h - cc -o $@ $< -lsys + cc -static -o $@ $< -lsys -lminlib -lcompat_minix 1fifo 2fifo: mkfifo $@ diff --git a/test/safecopy/down b/test/safecopy/down old mode 100644 new mode 100755 diff --git a/test/safecopy/run b/test/safecopy/run old mode 100644 new mode 100755 diff --git a/test/safemap/Makefile b/test/safemap/Makefile index 67d7da7db..42fd715c6 100644 --- a/test/safemap/Makefile +++ b/test/safemap/Makefile @@ -2,10 +2,10 @@ all: requestor grantor 1fifo 2fifo chmod +x down run requestor: requestor.c inc.h - cc -o $@ $< -lsys + cc -static -o $@ $< -lsys -lminlib -lcompat_minix grantor: grantor.c inc.h - cc -o $@ $< -lsys + cc -static -o $@ $< -lsys -lminlib -lcompat_minix 1fifo 2fifo: mkfifo $@ diff --git a/test/safemap/down b/test/safemap/down old mode 100644 new mode 100755 diff --git a/test/safemap/requestor.c b/test/safemap/requestor.c index e4159bed7..6c8b72caf 100644 --- a/test/safemap/requestor.c +++ b/test/safemap/requestor.c @@ -48,14 +48,14 @@ int main(int argc, char **argv) /* Test MAP. */ FIFO_WAIT(fid_get); - r = sys_safemap(ep_granter, gid, 0, (long)buf, size, D, 1); + r = sys_safemap(ep_granter, gid, 0, (long)buf, size, 1); if(r != OK) { printf("REQUESTOR: error in sys_safemap: %d\n", r); return 1; } CHECK_TEST("REQUESTOR", buf[0], BUF_START_GRANTOR, "MAP"); buf[0] = BUF_START_REQUESTOR; - r = sys_safeunmap(D, (long)buf); + r = sys_safeunmap((long)buf); if(r != OK) { printf("REQUESTOR: error in sys_safeunmap: %d\n", r); return 1; @@ -65,7 +65,7 @@ int main(int argc, char **argv) /* Test UNMAP. */ FIFO_WAIT(fid_get); CHECK_TEST("REQUESTOR", buf[0], BUF_START_REQUESTOR, "UNMAP"); - r = sys_safemap(ep_granter, gid, 0, (long)buf, size, D, 1); + r = sys_safemap(ep_granter, gid, 0, (long)buf, size, 1); if(r != 0) { printf("REQUESTOR: error in sys_safemap: %d\n", r); return 1; @@ -80,7 +80,7 @@ int main(int argc, char **argv) /* Test SMAP_COW. */ FIFO_WAIT(fid_get); - r = sys_safemap(ep_granter, gid, 0, (long)buf, size, D, 1); + r = sys_safemap(ep_granter, gid, 0, (long)buf, size, 1); if(r != OK) { printf("REQUESTOR: error in sys_safemap: %d\n", r); return 1; @@ -114,7 +114,7 @@ int main(int argc, char **argv) /* Test COW_SMAP. */ FIFO_WAIT(fid_get); buf[0] = BUF_START_REQUESTOR; - r = sys_safemap(ep_granter, gid, 0, (long)buf, size, D, 1); + r = sys_safemap(ep_granter, gid, 0, (long)buf, size, 1); if(r != OK) { printf("REQUESTOR: error in sys_safemap: %d\n", r); return 1; @@ -131,7 +131,7 @@ int main(int argc, char **argv) printf("REQUESTOR: error in sys_safecopyto: %d\n", r); return 1; } - r = sys_safemap(ep_granter, gid, 0, (long)buf, size, D, 1); + r = sys_safemap(ep_granter, gid, 0, (long)buf, size, 1); if(r != OK) { printf("REQUESTOR: error in sys_safemap: %d\n", r); return 1; diff --git a/test/safemap/run b/test/safemap/run old mode 100644 new mode 100755