Skip to content

Commit

Permalink
8296631: NSS tests failing on OL9 linux-aarch64 hosts
Browse files Browse the repository at this point in the history
Reviewed-by: valeriep
  • Loading branch information
Mark Powers authored and Valerie Peng committed Oct 2, 2023
1 parent d2e2c4c commit 6e1aacd
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 15 deletions.
Binary file not shown.
Binary file not shown.
30 changes: 18 additions & 12 deletions test/jdk/sun/security/pkcs11/PKCS11Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -627,12 +627,10 @@ private static Map<String, String[]> getOsMap() {
osMap.put("Linux-arm-32", new String[]{
"/usr/lib/arm-linux-gnueabi/nss/",
"/usr/lib/arm-linux-gnueabihf/nss/"});
// Exclude linux-aarch64 at the moment until the following bug is fixed:
// 8296631: NSS tests failing on OL9 linux-aarch64 hosts
// osMap.put("Linux-aarch64-64", new String[] {
// "/usr/lib/aarch64-linux-gnu/",
// "/usr/lib/aarch64-linux-gnu/nss/",
// "/usr/lib64/" });
osMap.put("Linux-aarch64-64", new String[] {
"/usr/lib/aarch64-linux-gnu/",
"/usr/lib/aarch64-linux-gnu/nss/",
"/usr/lib64/" });
return osMap;
}

Expand Down Expand Up @@ -910,14 +908,22 @@ protected void copyNssCertKeyToClassesDir() throws IOException {

protected void copyNssCertKeyToClassesDir(Path dbPath) throws IOException {
Path destinationPath = Path.of(TEST_CLASSES);
String keyDbFile = "key3.db";
String certDbFile = "cert8.db";
String keyDbFile3 = "key3.db";
String keyDbFile4 = "key4.db";
String certDbFile8 = "cert8.db";
String certDbFile9 = "cert9.db";

Files.copy(dbPath.resolve(certDbFile),
destinationPath.resolve(certDbFile),
Files.copy(dbPath.resolve(certDbFile8),
destinationPath.resolve(certDbFile8),
StandardCopyOption.REPLACE_EXISTING);
Files.copy(dbPath.resolve(keyDbFile),
destinationPath.resolve(keyDbFile),
Files.copy(dbPath.resolve(certDbFile9),
destinationPath.resolve(certDbFile9),
StandardCopyOption.REPLACE_EXISTING);
Files.copy(dbPath.resolve(keyDbFile3),
destinationPath.resolve(keyDbFile3),
StandardCopyOption.REPLACE_EXISTING);
Files.copy(dbPath.resolve(keyDbFile4),
destinationPath.resolve(keyDbFile4),
StandardCopyOption.REPLACE_EXISTING);
}

Expand Down
6 changes: 6 additions & 0 deletions test/jdk/sun/security/pkcs11/Provider/MultipleLogins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ esac

# first make cert/key DBs writable

${CP} ${TESTSRC}${FS}..${FS}nss${FS}db${FS}cert9.db ${TESTCLASSES}
${CHMOD} +w ${TESTCLASSES}${FS}cert9.db

${CP} ${TESTSRC}${FS}..${FS}nss${FS}db${FS}key4.db ${TESTCLASSES}
${CHMOD} +w ${TESTCLASSES}${FS}key4.db

${CP} ${TESTSRC}${FS}..${FS}nss${FS}db${FS}cert8.db ${TESTCLASSES}
${CHMOD} +w ${TESTCLASSES}${FS}cert8.db

Expand Down
Binary file modified test/jdk/sun/security/pkcs11/Secmod/cert9.db
Binary file not shown.
Binary file modified test/jdk/sun/security/pkcs11/Secmod/key4.db
Binary file not shown.
9 changes: 7 additions & 2 deletions test/jdk/sun/security/pkcs11/Secmod/pkcs11.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
library=
name=NSS Internal PKCS #11 Module
parameters=configdir='sql:./tmpdb' certPrefix='' keyPrefix='' secmod='' flags= updatedir='' updateCertPrefix='' updateKeyPrefix='' updateid='' updateTokenDescription=''
NSS=Flags=internal,critical trustOrder=75 cipherOrder=100 slotParams=(1={slotFlags=[RSA,DSA,DH,RC2,RC4,DES,RANDOM,SHA1,MD5,MD2,SSL,TLS,AES,Camellia,SEED,SHA256,SHA512] askpw=any timeout=30})
parameters=configdir='sql:./tmpdb' certPrefix='' keyPrefix='' secmod='secmod.db' flags= updatedir='' updateCertPrefix='' updateKeyPrefix='' updateid='' updateTokenDescription=''
NSS=trustOrder=75 cipherOrder=100 slotParams={0x00000001=[slotFlags=RSA,RC4,RC2,DES,DH,SHA1,MD5,MD2,SSL,TLS,AES,RANDOM askpw=any timeout=30 ] } Flags=internal,critical

library=libnssckbi.so
name=Builtin Roots Module
NSS=trustOrder=100

2 changes: 1 addition & 1 deletion test/jdk/sun/security/pkcs11/SecmodTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class SecmodTest extends PKCS11Test {
static String DBDIR;
static char[] password = "test12".toCharArray();
static String keyAlias = "mykey";
static boolean useSqlite = false;
static boolean useSqlite = true;

static void useSqlite(boolean b) {
useSqlite = b;
Expand Down
Binary file not shown.
Binary file added test/jdk/sun/security/pkcs11/tls/tls12/key4.db
Binary file not shown.
9 changes: 9 additions & 0 deletions test/jdk/sun/security/pkcs11/tls/tls12/pkcs11.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
library=
name=NSS Internal PKCS #11 Module
parameters=configdir='sql:./tmpdb' certPrefix='' keyPrefix='' secmod='secmod.db' flags= updatedir='' updateCertPrefix='' updateKeyPrefix='' updateid='' updateTokenDescription=''
NSS=trustOrder=75 cipherOrder=100 slotParams={0x00000001=[slotFlags=RSA,RC4,RC2,DES,DH,SHA1,MD5,MD2,SSL,TLS,AES,RANDOM askpw=any timeout=30 ] } Flags=internal,critical,FIPS

library=libnssckbi.so
name=Builtin Roots Module
NSS=trustOrder=100

5 comments on commit 6e1aacd

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GoeLin
Copy link
Member

@GoeLin GoeLin commented on 6e1aacd Jan 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jdk21u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on 6e1aacd Jan 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GoeLin the backport was successfully created on the branch backport-GoeLin-6e1aacdf in my personal fork of openjdk/jdk21u-dev. To create a pull request with this backport targeting openjdk/jdk21u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 6e1aacdf from the openjdk/jdk repository.

The commit being backported was authored by Mark Powers on 2 Oct 2023 and was reviewed by Valerie Peng.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk21u-dev:

$ git fetch https://github.com/openjdk-bots/jdk21u-dev.git backport-GoeLin-6e1aacdf:backport-GoeLin-6e1aacdf
$ git checkout backport-GoeLin-6e1aacdf
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk21u-dev.git backport-GoeLin-6e1aacdf

@GoeLin
Copy link
Member

@GoeLin GoeLin commented on 6e1aacd Jan 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jdk17u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on 6e1aacd Jan 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GoeLin the backport was successfully created on the branch backport-GoeLin-6e1aacdf in my personal fork of openjdk/jdk17u-dev. To create a pull request with this backport targeting openjdk/jdk17u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 6e1aacdf from the openjdk/jdk repository.

The commit being backported was authored by Mark Powers on 2 Oct 2023 and was reviewed by Valerie Peng.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk17u-dev:

$ git fetch https://github.com/openjdk-bots/jdk17u-dev.git backport-GoeLin-6e1aacdf:backport-GoeLin-6e1aacdf
$ git checkout backport-GoeLin-6e1aacdf
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk17u-dev.git backport-GoeLin-6e1aacdf

Please sign in to comment.