This looks fine (and safe) to me. There are probably other Linux distros where 
the NSS libraries are in /usr/lib64. Perhaps RHEL? "rpm -E %{rhel}" on AL2 
produces "7", so there seems to be some RHEL DNA in AL2.

Thanks,
Paul

-----Original Message-----
From: security-dev <security-dev-r...@openjdk.java.net> on behalf of Evgeny 
Astigeevich <github.com+42899633+eas...@openjdk.java.net>
Date: Wednesday, May 26, 2021 at 7:21 AM
To: "security-dev@openjdk.java.net" <security-dev@openjdk.java.net>
Subject: RFR: 8267721: Enable sun/security/pkcs11 tests for Amazon Linux 2 
AArch64

Tests sun/security/pkcs11 are skipped on AArch64 Linux when they cannot find 
NSS libraries in one of the directories {'/usr/lib/aarch64-linux-gnu/', 
'/usr/lib/aarch64-linux-gnu/nss/'}. On Amazon Linux 2 the libraries are in 
/usr/lib64.

This patch adds '/usr/lib64' to the search list of directories.
Test:
- Before the patch

$ make run-test TEST=sun/security/pkcs11
$ cd build
$ find . -name '*.jtr' -exec grep 'find NSS' {} ; | wc -l
129

- After the patch

$ make run-test TEST=sun/security/pkcs11
$ cd build
$ find . -name '*.jtr' -exec grep 'find NSS' {} ; | wc -l
0

-------------

Commit messages:
 - 8267721: Enable sun/security/pkcs11 tests for Amazon Linux 2 AArch64

Changes: https://git.openjdk.java.net/jdk/pull/4207/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4207&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8267721
  Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/4207.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/4207/head:pull/4207

PR: https://git.openjdk.java.net/jdk/pull/4207

Reply via email to