Details
-
Bug
-
Status: Resolved
-
Low
-
Resolution: Fixed
-
None
-
Low
Description
Seems like MacOS(El Capitan) doesn't allow writing to /dev/urandom:
$ echo 1 > /dev/urandom echo: write error: operation not permitted
Which is causing CipherFactoryTest failed:
$ ant test -Dtest.name=CipherFactoryTest ... [junit] Testsuite: org.apache.cassandra.security.CipherFactoryTest [junit] Testsuite: org.apache.cassandra.security.CipherFactoryTest Tests run: 7, Failures: 0, Errors: 7, Skipped: 0, Time elapsed: 2.184 sec [junit] [junit] Testcase: buildCipher_SameParams(org.apache.cassandra.security.CipherFactoryTest): Caused an ERROR [junit] setSeed() failed [junit] java.security.ProviderException: setSeed() failed [junit] at sun.security.provider.NativePRNG$RandomIO.implSetSeed(NativePRNG.java:472) [junit] at sun.security.provider.NativePRNG$RandomIO.access$300(NativePRNG.java:331) [junit] at sun.security.provider.NativePRNG.engineSetSeed(NativePRNG.java:214) [junit] at java.security.SecureRandom.getDefaultPRNG(SecureRandom.java:209) [junit] at java.security.SecureRandom.<init>(SecureRandom.java:190) [junit] at org.apache.cassandra.security.CipherFactoryTest.setup(CipherFactoryTest.java:50) [junit] Caused by: java.io.IOException: Operation not permitted [junit] at java.io.FileOutputStream.writeBytes(Native Method) [junit] at java.io.FileOutputStream.write(FileOutputStream.java:313) [junit] at sun.security.provider.NativePRNG$RandomIO.implSetSeed(NativePRNG.java:470) ...
I'm able to reproduce the issue on two Mac machines. But not sure if it's affecting all other developers.
-Djava.security.egd=file:/dev/urandom was introduced in:
CASSANDRA-9581
I would suggest to revert the change as pig-test is removed (pig is no longer supported).
Or adding a condition for MacOS in build.xml.