public inbox for mauve-patches@sourceware.org
 help / color / mirror / Atom feed
* FYI: Minor File throwpoint tests cleanup
@ 2006-07-14 10:19 Gary Benson
  0 siblings, 0 replies; only message in thread
From: Gary Benson @ 2006-07-14 10:19 UTC (permalink / raw)
  To: mauve-patches

[-- Attachment #1: Type: text/plain, Size: 89 bytes --]

Hi all,

This commit removes some old junk from the File throwpoint tests.

Cheers,
Gary

[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 6256 bytes --]

Index: ChangeLog
===================================================================
RCS file: /cvs/mauve/mauve/ChangeLog,v
retrieving revision 1.1797
diff -u -r1.1797 ChangeLog
--- ChangeLog	14 Jul 2006 04:54:22 -0000	1.1797
+++ ChangeLog	14 Jul 2006 10:13:09 -0000
@@ -1,3 +1,7 @@
+2006-07-14  Gary Benson  <gbenson@redhat.com>
+
+	* gnu/testlet/java/io/File/security.java: Remove dummy mayCheck stuff.
+
 2006-07-14  raif  <raif@solomon.tng.com.au>
 
 	* gnu/testlet/gnu/javax/crypto/kwa/TestOfAESKeyWrap.java: New test.
Index: gnu/testlet/java/io/File/security.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/io/File/security.java,v
retrieving revision 1.12
diff -u -r1.12 security.java
--- gnu/testlet/java/io/File/security.java	27 Jun 2006 12:23:38 -0000	1.12
+++ gnu/testlet/java/io/File/security.java	14 Jul 2006 10:13:09 -0000
@@ -52,9 +52,6 @@
     File tmpfile2 = new File(tmpdir, "testfile2");
     harness.check(tmpfile2.delete() || !tmpfile2.exists());
 
-    Permission[] noPerms = new Permission[1];
-    noPerms[0] = new RuntimePermission("shutdownHooks");
-
     Permission tmpdirReadPerm =
       new FilePermission(tmpdir.toString(), "read");
     Permission tmpdirWritePerm =
@@ -96,7 +93,7 @@
       // throwpoint: java.io.File-canWrite-DIR
       harness.checkPoint("dir.canWrite");
       try {
-	sm.prepareChecks(new Permission[]{tmpdirWritePerm}, noPerms);
+	sm.prepareChecks(new Permission[]{tmpdirWritePerm});
 	tmpdir.canWrite();
 	sm.checkAllChecked();
       }
@@ -108,7 +105,7 @@
       // throwpoint: java.io.File-canRead-DIR
       harness.checkPoint("dir.canRead");
       try {
-	sm.prepareChecks(new Permission[]{tmpdirReadPerm}, noPerms);
+	sm.prepareChecks(new Permission[]{tmpdirReadPerm});
 	tmpdir.canRead();
 	sm.checkAllChecked();
       }
@@ -120,7 +117,7 @@
       // throwpoint: java.io.File-createNewFile
       harness.checkPoint("file.createNewFile");
       try {
-	sm.prepareChecks(new Permission[]{tmpfileWritePerm}, noPerms);
+	sm.prepareChecks(new Permission[]{tmpfileWritePerm});
 	tmpfile.createNewFile();
 	sm.checkAllChecked();
       }
@@ -132,7 +129,7 @@
       // throwpoint: java.io.File-delete-FILE
       harness.checkPoint("file.delete");
       try {
-	sm.prepareChecks(new Permission[]{tmpfileDeletePerm}, noPerms);
+	sm.prepareChecks(new Permission[]{tmpfileDeletePerm});
 	tmpfile.delete();
 	sm.checkAllChecked();
       }
@@ -144,7 +141,7 @@
       // throwpoint: java.io.File-list(FilenameFilter)
       harness.checkPoint("dir.list(null)");
       try {
-	sm.prepareChecks(new Permission[]{tmpdirReadPerm}, noPerms);
+	sm.prepareChecks(new Permission[]{tmpdirReadPerm});
 	tmpdir.list(null);
 	sm.checkAllChecked();
       }
@@ -156,7 +153,7 @@
       // throwpoint: java.io.File-list
       harness.checkPoint("dir.list()");
       try {
-	sm.prepareChecks(new Permission[]{tmpdirReadPerm}, noPerms);
+	sm.prepareChecks(new Permission[]{tmpdirReadPerm});
 	tmpdir.list();
 	sm.checkAllChecked();
       }
@@ -168,7 +165,7 @@
       // throwpoint: java.io.File-listFiles
       harness.checkPoint("dir.listFiles()");
       try {
-	sm.prepareChecks(new Permission[]{tmpdirReadPerm}, noPerms);
+	sm.prepareChecks(new Permission[]{tmpdirReadPerm});
 	tmpdir.listFiles();
 	sm.checkAllChecked();
       }
@@ -180,7 +177,7 @@
       // throwpoint: java.io.File-listFiles(FilenameFilter)
       harness.checkPoint("dir.listFiles(FilenameFilter)");
       try {
-	sm.prepareChecks(new Permission[]{tmpdirReadPerm}, noPerms);
+	sm.prepareChecks(new Permission[]{tmpdirReadPerm});
 	tmpdir.listFiles((FilenameFilter) null);
 	sm.checkAllChecked();
       }
@@ -193,7 +190,7 @@
       // throwpoint: java.io.File-listFiles(FileFilter)
       harness.checkPoint("dir.listFiles(FileFilter)");
       try {
-	sm.prepareChecks(new Permission[]{tmpdirReadPerm}, noPerms);
+	sm.prepareChecks(new Permission[]{tmpdirReadPerm});
 	tmpdir.listFiles((FileFilter) null);
 	sm.checkAllChecked();
       }
@@ -219,7 +216,7 @@
       // throwpoint: java.io.File-createTempFile(String, String, File)
       harness.checkPoint("createTempFile(3-args)");
       try {
-	sm.prepareChecks(new Permission[]{tmpdirallWritePerm}, noPerms);
+	sm.prepareChecks(new Permission[]{tmpdirallWritePerm});
 	tf2 = File.createTempFile("pfx", "sfx", tmpdir);
 	sm.checkAllChecked();
       }
@@ -231,7 +228,7 @@
       // throwpoint: java.io.File-setReadOnly-DIR
       harness.checkPoint("dir.setReadOnly");
       try {
-	sm.prepareChecks(new Permission[]{tmpdir2WritePerm}, noPerms);
+	sm.prepareChecks(new Permission[]{tmpdir2WritePerm});
 	tmpdir2.setReadOnly();
 	sm.checkAllChecked();
       }
@@ -244,7 +241,7 @@
       // Make sure we remove the read only temp dir
       harness.checkPoint("dir.delete");
       try {
-	sm.prepareChecks(new Permission[]{tmpdir2DeletePerm}, noPerms);
+	sm.prepareChecks(new Permission[]{tmpdir2DeletePerm});
 	tmpdir2.delete();
 	sm.checkAllChecked();
       }
@@ -256,7 +253,7 @@
       // throwpoint: java.io.File-listRoots
       harness.checkPoint("listRoots()");
       try {
-	sm.prepareChecks(new Permission[]{rootReadPerm}, noPerms);
+	sm.prepareChecks(new Permission[]{rootReadPerm});
 	File[] roots = File.listRoots();
 	harness.check(roots.length >= 1, "File.listRoots()");
 	sm.checkAllChecked();
@@ -270,8 +267,7 @@
       harness.checkPoint("file.renameTo");
       try {
 	sm.prepareChecks(new Permission[]{tmpfileWritePerm, 
-					  tmpfile2WritePerm}, 
-			 noPerms);
+					  tmpfile2WritePerm});
 	tmpfile.renameTo(tmpfile2);
 	sm.checkAllChecked();
       }
@@ -283,7 +279,7 @@
       // throwpoint: java.io.File-setLastModified-DIR
       harness.checkPoint("dir.setLastModified()");
       try {
-	sm.prepareChecks(new Permission[]{tmpdirWritePerm}, noPerms);
+	sm.prepareChecks(new Permission[]{tmpdirWritePerm});
 	tmpdir.setLastModified(0);
 	sm.checkAllChecked();
       }
@@ -295,7 +291,7 @@
       // throwpoint: java.io.File-deleteOnExit-DIR
       harness.checkPoint("dir.deleteOnExit()");
       try {
-	sm.prepareChecks(new Permission[]{tmpdirDeletePerm}, noPerms);
+	sm.prepareChecks(new Permission[]{tmpdirDeletePerm});
 	tmpdir.deleteOnExit();
 	sm.checkAllChecked();
       }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-07-14 10:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-14 10:19 FYI: Minor File throwpoint tests cleanup Gary Benson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).