Back port JSS tests from tip to 4.1.1 to enable test failure reporting

RESOLVED FIXED in 4.1.3

Status

JSS
Tests
RESOLVED FIXED
12 years ago
12 years ago

People

(Reporter: Sandeep Konchady, Assigned: Sandeep Konchady)

Tracking

Details

Attachments

(2 attachments, 2 obsolete attachments)

(Assignee)

Description

12 years ago
All the change done to JSS tests to report failure correctly and System.exit(1) has been committed to JSS 4.2 (current tip).  These need to be back ported to JSS 4.1.1.  Among the changes that will not get back ported are

[1] NSS bypass
[2] FIPS
(Assignee)

Updated

12 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 1

12 years ago
Created attachment 204006 [details] [diff] [review]
Back ported JSS tests from tip (4.2) to 4.1.1

Back ported JSS tests from tip (4.2) to 4.1.1

---------------------------------------------------------
Checking jss jar and library version
---------------------------------------------------------
              Introspecting jss jar file
Package name:   org.mozilla.jss
Spec title  :   Network Security Services for Java (JSS)
Spec vendor :   Mozilla Foundation
Spec version:   4.1
Impl title  :   org.mozilla.jss
Impl vendor :   Mozilla Foundation
Impl version:   4.1

  Fetching version information from CryptoManager
JSS_VERSION = JSS_4_1_1_RTM
NSS_VERSION = NSS_3_9_RTM
NSPR_VERSION = NSPR_4_5_RTM

  Checking for header information in jss library
libjss4.so = $Header: JSS 4.1.1 (debug)  Nov 22 2005 13:52:45 $
JSSTEST_CASE 16 (Check JSS jar version): PASS
JSSTEST_SUITE: 16 / 16
JSSTEST_RATE: 100 %
Test Status: SUCCESS
Attachment #204006 - Flags: superreview?(glen.beasley)
(Assignee)

Comment 2

12 years ago
Created attachment 204057 [details] [diff] [review]
Modified SigTest to use Mozilla-JSS provider and added some System.exit(1)

Changes done to test source

[1] SigTest.java : added "Mozilla-JSS" provider
[2] SDR.java, ListCert.java, GenerateTestCert.java, PK10Gen.java: added System.exit(1)
[3] JSS_SelfServServer.java: added comment to setSoTimeout.
Attachment #204006 - Attachment is obsolete: true
Attachment #204057 - Flags: superreview?(glen.beasley)
Attachment #204006 - Flags: superreview?(glen.beasley)

Updated

12 years ago
Attachment #204057 - Flags: superreview?(glen.beasley) → superreview+
(Assignee)

Comment 3

12 years ago
Checking in SigTest.java;
/cvsroot/mozilla/security/jss/org/mozilla/jss/tests/SigTest.java,v  <--  SigTest.java
new revision: 1.5.2.1; previous revision: 1.5
done
Checking in SDR.java;
/cvsroot/mozilla/security/jss/org/mozilla/jss/tests/SDR.java,v  <--  SDR.java
new revision: 1.1.14.1; previous revision: 1.1
done
Checking in ListCerts.java;
/cvsroot/mozilla/security/jss/org/mozilla/jss/tests/ListCerts.java,v  <--  ListCerts.java
new revision: 1.6.6.1; previous revision: 1.6
done
Checking in PK10Gen.java;
/cvsroot/mozilla/security/jss/org/mozilla/jss/tests/PK10Gen.java,v  <--  PK10Gen.java
new revision: 1.5.6.1; previous revision: 1.5
done
Checking in GenerateTestCert.java;
/cvsroot/mozilla/security/jss/org/mozilla/jss/tests/GenerateTestCert.java,v  <--  GenerateTestCert.java
new revision: 1.2.2.1; previous revision: 1.2
done
Checking in CloseDBs.java;
/cvsroot/mozilla/security/jss/org/mozilla/jss/tests/CloseDBs.java,v  <--  CloseDBs.java
new revision: 1.6.6.1; previous revision: 1.6
done
Checking in JSSE_SSLClient.java;
/cvsroot/mozilla/security/jss/org/mozilla/jss/tests/JSSE_SSLClient.java,v  <--  JSSE_SSLClient.java
new revision: 1.4.2.1; previous revision: 1.4
done
Checking in JSS_SelfServServer.java;
/cvsroot/mozilla/security/jss/org/mozilla/jss/tests/JSS_SelfServServer.java,v  <--  JSS_SelfServServer.java
new revision: 1.1.2.1; previous revision: 1.1
done
Checking in JSSE_SSLServer.java;
/cvsroot/mozilla/security/jss/org/mozilla/jss/tests/JSSE_SSLServer.java,v  <--  JSSE_SSLServer.java
new revision: 1.4.2.1; previous revision: 1.4
done
Checking in SelfTest.java;
/cvsroot/mozilla/security/jss/org/mozilla/jss/tests/SelfTest.java,v  <--  SelfTest.java
new revision: 1.7.6.1; previous revision: 1.7
done
Checking in VerifyCert.java;
/cvsroot/mozilla/security/jss/org/mozilla/jss/tests/VerifyCert.java,v  <--  VerifyCert.java
new revision: 1.2.6.1; previous revision: 1.2
done
Checking in all.pl;
/cvsroot/mozilla/security/jss/org/mozilla/jss/tests/all.pl,v  <--  all.pl
new revision: 1.24.2.1; previous revision: 1.24
done
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED

Updated

12 years ago
Target Milestone: --- → 4.1.1
(Assignee)

Comment 4

12 years ago
Created attachment 207533 [details] [diff] [review]
Missing port configuration in JSSE and JSS client/server tests

When back porting the changes from tip to JSS 4.1.x branch, the changes to JSS/JSSE client/server and SSLClientAuth.java were missing. Specifically the changes done to use separate ports for each client/server test pair.
Attachment #207533 - Flags: superreview?(glen.beasley)
Attachment #207533 - Flags: review?(alexei.volkov.bugs)
(Assignee)

Updated

12 years ago
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Assignee)

Updated

12 years ago
Status: REOPENED → ASSIGNED
Target Milestone: 4.1.1 → 4.1.3
(Assignee)

Comment 5

12 years ago
Created attachment 207536 [details] [diff] [review]
Missing port configuration in JSSE and JSS client/server tests

Missing port back porting from tip to JSS/JSSE server/clients.
Attachment #207533 - Attachment is obsolete: true
Attachment #207536 - Flags: superreview?(glen.beasley)
Attachment #207536 - Flags: review?(alexei.volkov.bugs)
Attachment #207533 - Flags: superreview?(glen.beasley)
Attachment #207533 - Flags: review?(alexei.volkov.bugs)
(Assignee)

Comment 6

12 years ago
bypassOff needs to be removed from all.pl in the patch that I have checked in. This will be done before I check in the changes.

Comment 7

12 years ago
Comment on attachment 207536 [details] [diff] [review]
Missing port configuration in JSSE and JSS client/server tests

>Index: JSS_SSLClient.java
>===================================================================
>RCS file: /cvsroot/mozilla/security/jss/org/mozilla/jss/tests/JSS_SSLClient.java,v
>retrieving revision 1.4
>diff -u -r1.4 JSS_SSLClient.java
>--- JSS_SSLClient.java	23 Jun 2005 05:59:36 -0000	1.4
>+++ JSS_SSLClient.java	4 Jan 2006 19:48:16 -0000
>@@ -316,12 +316,13 @@
>         String  usage      = "USAGE:\n" +
>                 "java org.mozilla.jss.tests.JSS_SSLClient" +
>                 " <cert db path> <password file>\n" +
>-                " <test cipher> <server host> <server port>";
>+                " [server port] [test cipher] [server host] ";

It is not possible to test remote server with all available ciphers 
at one program launch With such order of arguments . 
Cipher should be at least the last argument. 


>Index: JSS_SSLServer.java
>===================================================================
>RCS file: /cvsroot/mozilla/security/jss/org/mozilla/jss/tests/JSS_SSLServer.java,v
>retrieving revision 1.4
>diff -u -r1.4 JSS_SSLServer.java
>--- JSS_SSLServer.java	23 Jun 2005 05:59:36 -0000	1.4
>+++ JSS_SSLServer.java	4 Jan 2006 19:48:16 -0000
>@@ -88,17 +90,17 @@
>     private String        serverHost      = "localhost";
>     private boolean       TestInetAddress = false;
>     private boolean       success         = true;
>-    public  static int    port            = 29750;
>+    public  int           port            = 29750;

This is unnecessary change that does not bring any value to the code.
There is only one class created at the main method throughout a run.

>Index: SSLClientAuth.java
>===================================================================
>RCS file: /cvsroot/mozilla/security/jss/org/mozilla/jss/tests/SSLClientAuth.java,v
>retrieving revision 1.2
>diff -u -r1.2 SSLClientAuth.java
>--- SSLClientAuth.java	5 Oct 2005 17:09:03 -0000	1.2
>+++ SSLClientAuth.java	4 Jan 2006 19:48:17 -0000
>@@ -67,7 +67,7 @@
>     {
>         AlgorithmIdentifier sigAlgID = new AlgorithmIdentifier( sigAlg.toOID());
> 
>-        Name issuer = new Name();
>+        Name issuer = new Name();                                           

Extra space characters at the end of the line.

>@@ -254,7 +258,7 @@
> 
>     private boolean success = true;
> 
>-    public static int port = 29752;
>+    public int port = 29752;

unnecessary change. Same as before.

>Index: all.pl
>===================================================================
>RCS file: /cvsroot/mozilla/security/jss/org/mozilla/jss/tests/all.pl,v
>retrieving revision 1.24.2.1
>diff -u -r1.24.2.1 all.pl
>--- all.pl	23 Nov 2005 22:25:51 -0000	1.24.2.1
>+++ all.pl	4 Jan 2006 19:48:17 -0000
>@@ -65,8 +65,8 @@
> my $lib_jss       = "libjss";
> my $jss_rel_dir   = "";
> my $jss_classpath = "";
>-my $portJSSEServer = 29753;
>-my $portJSSServer = 29750;
>+my $portJSSEServer = 2876;
>+my $portJSSServer = 2877;

Ports should be farther apart. Port collision is created at the end of the script
when $portJSSEServer port gets incremented.
Since you are dealing with problems related to port binding denial due to the system
timeout, tests can easily run in to other set of intermittent failures especially on fast
machines.  

RW+: since no critial problems were found
Attachment #207536 - Flags: review?(alexei.volkov.bugs) → review+

Updated

12 years ago
Attachment #207536 - Flags: superreview?(glen.beasley) → superreview+
(Assignee)

Comment 8

12 years ago
Checked in the code with Alexei's recommendations.

Checking in org/mozilla/jss/tests/JSS_SSLClient.java;
/cvsroot/mozilla/security/jss/org/mozilla/jss/tests/JSS_SSLClient.java,v  <--  JSS_SSLClient.java
new revision: 1.4.2.1; previous revision: 1.4
done
Checking in org/mozilla/jss/tests/JSS_SSLServer.java;
/cvsroot/mozilla/security/jss/org/mozilla/jss/tests/JSS_SSLServer.java,v  <--  JSS_SSLServer.java
new revision: 1.4.2.1; previous revision: 1.4
done
Checking in org/mozilla/jss/tests/SSLClientAuth.java;
/cvsroot/mozilla/security/jss/org/mozilla/jss/tests/SSLClientAuth.java,v  <--  SSLClientAuth.java
new revision: 1.2.2.1; previous revision: 1.2
done
Checking in org/mozilla/jss/tests/all.pl;
/cvsroot/mozilla/security/jss/org/mozilla/jss/tests/all.pl,v  <--  all.pl
new revision: 1.24.2.2; previous revision: 1.24.2.1
done
Checking in org/mozilla/jss/tests/startJssServ.sh;
/cvsroot/mozilla/security/jss/org/mozilla/jss/tests/startJssServ.sh,v  <--  startJssServ.sh
new revision: 1.2.2.1; previous revision: 1.2
done
Checking in org/mozilla/jss/tests/startJsseServ.sh;
/cvsroot/mozilla/security/jss/org/mozilla/jss/tests/startJsseServ.sh,v  <--  startJsseServ.sh
new revision: 1.3.2.1; previous revision: 1.3
done
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.