public inbox for mauve-patches@sourceware.org
 help / color / mirror / Atom feed
* FYI: Even more throwpoint tests for java.io.FileOutputStream
@ 2005-12-05 11:23 Gary Benson
  0 siblings, 0 replies; only message in thread
From: Gary Benson @ 2005-12-05 11:23 UTC (permalink / raw)
  To: mauve-patches

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

Hi again,

This patch adds tests for java.io.FileOutputStream's append
constructors' security checks.  That's everything from
java.io.File{In,Out}putStream tested.

Cheers,
Gary

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

Index: ChangeLog
===================================================================
RCS file: /cvs/mauve/mauve/ChangeLog,v
retrieving revision 1.1273
retrieving revision 1.1274
diff -u -r1.1273 -r1.1274
--- ChangeLog	5 Dec 2005 10:49:00 -0000	1.1273
+++ ChangeLog	5 Dec 2005 11:05:34 -0000	1.1274
@@ -1,5 +1,10 @@
 2005-12-02  Gary Benson <gbenson@redhat.com>
 
+	* gnu/testlet/java/io/FileOutputStream/security.java: Final set of
+	throwpoint tests.
+
+2005-12-02  Gary Benson <gbenson@redhat.com>
+
 	* gnu/testlet/java/io/FileInputStream/security.java: More tests.
 	* gnu/testlet/java/io/FileOutputStream/security.java: Likewise.
 
Index: gnu/testlet/java/io/FileOutputStream/security.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/io/FileOutputStream/security.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- gnu/testlet/java/io/FileOutputStream/security.java	5 Dec 2005 10:49:00 -0000	1.2
+++ gnu/testlet/java/io/FileOutputStream/security.java	5 Dec 2005 11:05:34 -0000	1.3
@@ -55,12 +55,28 @@
       new FileOutputStream(file);
       sm.checkAllChecked(harness);
 
+      // security: java.io.FileOutputStream-FileOutputStream(File, boolean)
+      harness.checkPoint("File, boolean constructor");
+      for (int i = 0; i <= 1; i++) {
+	  sm.prepareChecks(new Permission[] {wperm}, new Permission[] {rperm});
+	  new FileOutputStream(file, i == 1);
+	  sm.checkAllChecked(harness);
+      }
+
       // security: java.io.FileOutputStream-FileOutputStream(String)
       harness.checkPoint("String constructor");
       sm.prepareChecks(new Permission[] {wperm}, new Permission[] {rperm});
       new FileOutputStream(path);
       sm.checkAllChecked(harness);
 
+      // security: java.io.FileOutputStream-FileOutputStream(String, boolean)
+      harness.checkPoint("String, boolean constructor");
+      for (int i = 0; i <= 1; i++) {
+	  sm.prepareChecks(new Permission[] {wperm}, new Permission[] {rperm});
+	  new FileOutputStream(path, i == 1);
+	  sm.checkAllChecked(harness);
+      }
+
       // security: java.io.FileOutputStream-FileOutputStream(FileDescriptor)
       harness.checkPoint("FileDescriptor constructor");
       sm.prepareChecks(new Permission[] {fdPerm}, new Permission[] {});

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

only message in thread, other threads:[~2005-12-05 11:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-05 11:23 FYI: Even more throwpoint tests for java.io.FileOutputStream 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).