Discussion:
RFR 8060432: tools/pack200/TestNormal.java fails on Windows with java.io.FileNotFoundException after JDK-8058854
Amy Lu
2014-10-14 14:19:29 UTC
Permalink
Please review the test fix.

bug: https://bugs.openjdk.java.net/browse/JDK-8060432
webrev: http://cr.openjdk.java.net/~weijun/8060432/webrev.00/

This test is to test
compareJars(new JarFile("normalized.jar"), new JarFile("repacked.jar"));
where the jar files (normalized.jar repacked.jar and original.jar) are
created by "jar cnf" "jar cf" or "pack200 -r?.

extractJar(JarFile jf, File where) is not really needed as this method
just try to provide some files for the test to do "jar cnf?. Actually,
"jar cnf" can work on any files, test just need some files to jar with.

Test can just simply created some files for that purpose.

Thanks,
Amy
Kumar Srinivasan
2014-10-14 20:44:23 UTC
Permalink
Amy,

The modifications you have made will not test pack200 compression
and normalization correctly, as the test needs ".class" files. Do you know
why the test fails on windows ?

Kumar
Post by Amy Lu
Please review the test fix.
bug: https://bugs.openjdk.java.net/browse/JDK-8060432
webrev: http://cr.openjdk.java.net/~weijun/8060432/webrev.00/
This test is to test
compareJars(new JarFile("normalized.jar"), new JarFile("repacked.jar"));
where the jar files (normalized.jar repacked.jar and original.jar) are
created by "jar cnf" "jar cf" or "pack200 -r?.
extractJar(JarFile jf, File where) is not really needed as this method
just try to provide some files for the test to do "jar cnf?. Actually,
"jar cnf" can work on any files, test just need some files to jar with.
Test can just simply created some files for that purpose.
Thanks,
Amy
Amy Lu
2014-10-15 02:42:41 UTC
Permalink
Post by Kumar Srinivasan
Amy,
The modifications you have made will not test pack200 compression
and normalization correctly, as the test needs ".class" files.
Sorry, I missed that.
Please review the updated version, test works on ".class" files
(Utils.TEST_CLS_DIR)
http://cr.openjdk.java.net/~weijun/8060432/webrev.01/
Post by Kumar Srinivasan
Do you know
why the test fails on windows ?
extractJar(JarFile jf, File where) try to extract jar files to folder
"testdir", as the jar contains files of
C:/blabla
extractJar method run into issue on Windows as it try to extract it to
testdir\\C:\\blabla

Anyway, as there already has some ".class" files to working on
(Utils.TEST_CLS_DIR), extractJar method is not needed.


Thanks,
Amy
Post by Kumar Srinivasan
Kumar
Post by Amy Lu
Please review the test fix.
bug: https://bugs.openjdk.java.net/browse/JDK-8060432
webrev: http://cr.openjdk.java.net/~weijun/8060432/webrev.00/
This test is to test
compareJars(new JarFile("normalized.jar"), new JarFile("repacked.jar"));
where the jar files (normalized.jar repacked.jar and original.jar)
are created by "jar cnf" "jar cf" or "pack200 -r?.
extractJar(JarFile jf, File where) is not really needed as this
method just try to provide some files for the test to do "jar cnf?.
Actually, "jar cnf" can work on any files, test just need some files
to jar with.
Test can just simply created some files for that purpose.
Thanks,
Amy
Kumar Srinivasan
2014-10-16 00:31:11 UTC
Permalink
Looks good!

Kumar
Post by Amy Lu
Post by Kumar Srinivasan
Amy,
The modifications you have made will not test pack200 compression
and normalization correctly, as the test needs ".class" files.
Sorry, I missed that.
Please review the updated version, test works on ".class" files
(Utils.TEST_CLS_DIR)
http://cr.openjdk.java.net/~weijun/8060432/webrev.01/
Post by Kumar Srinivasan
Do you know
why the test fails on windows ?
extractJar(JarFile jf, File where) try to extract jar files to folder
"testdir", as the jar contains files of
C:/blabla
extractJar method run into issue on Windows as it try to extract it to
testdir\\C:\\blabla
Anyway, as there already has some ".class" files to working on
(Utils.TEST_CLS_DIR), extractJar method is not needed.
Thanks,
Amy
Post by Kumar Srinivasan
Kumar
Post by Amy Lu
Please review the test fix.
bug: https://bugs.openjdk.java.net/browse/JDK-8060432
webrev: http://cr.openjdk.java.net/~weijun/8060432/webrev.00/
This test is to test
compareJars(new JarFile("normalized.jar"), new
JarFile("repacked.jar"));
where the jar files (normalized.jar repacked.jar and original.jar)
are created by "jar cnf" "jar cf" or "pack200 -r?.
extractJar(JarFile jf, File where) is not really needed as this
method just try to provide some files for the test to do "jar cnf?.
Actually, "jar cnf" can work on any files, test just need some files
to jar with.
Test can just simply created some files for that purpose.
Thanks,
Amy
Amy Lu
2014-10-16 07:36:55 UTC
Permalink
Thank you Kumar for your review.

I need a sponsorfor push this fix. Alan, may I get your help?

Thanks,
Amy
Post by Kumar Srinivasan
Looks good!
Kumar
Post by Amy Lu
Post by Kumar Srinivasan
Amy,
The modifications you have made will not test pack200 compression
and normalization correctly, as the test needs ".class" files.
Sorry, I missed that.
Please review the updated version, test works on ".class" files
(Utils.TEST_CLS_DIR)
http://cr.openjdk.java.net/~weijun/8060432/webrev.01/
Post by Kumar Srinivasan
Do you know
why the test fails on windows ?
extractJar(JarFile jf, File where) try to extract jar files to folder
"testdir", as the jar contains files of
C:/blabla
extractJar method run into issue on Windows as it try to extract it
to testdir\\C:\\blabla
Anyway, as there already has some ".class" files to working on
(Utils.TEST_CLS_DIR), extractJar method is not needed.
Thanks,
Amy
Post by Kumar Srinivasan
Kumar
Post by Amy Lu
Please review the test fix.
bug: https://bugs.openjdk.java.net/browse/JDK-8060432
webrev: http://cr.openjdk.java.net/~weijun/8060432/webrev.00/
This test is to test
compareJars(new JarFile("normalized.jar"), new
JarFile("repacked.jar"));
where the jar files (normalized.jar repacked.jar and original.jar)
are created by "jar cnf" "jar cf" or "pack200 -r?.
extractJar(JarFile jf, File where) is not really needed as this
method just try to provide some files for the test to do "jar cnf?.
Actually, "jar cnf" can work on any files, test just need some
files to jar with.
Test can just simply created some files for that purpose.
Thanks,
Amy
Kumar Srinivasan
2014-10-17 00:53:13 UTC
Permalink
Amy,

I will take care of pushing this on Friday.

Kumar
Post by Amy Lu
Thank you Kumar for your review.
I need a sponsorfor push this fix. Alan, may I get your help?
Thanks,
Amy
Post by Kumar Srinivasan
Looks good!
Kumar
Post by Amy Lu
Post by Kumar Srinivasan
Amy,
The modifications you have made will not test pack200 compression
and normalization correctly, as the test needs ".class" files.
Sorry, I missed that.
Please review the updated version, test works on ".class" files
(Utils.TEST_CLS_DIR)
http://cr.openjdk.java.net/~weijun/8060432/webrev.01/
Post by Kumar Srinivasan
Do you know
why the test fails on windows ?
extractJar(JarFile jf, File where) try to extract jar files to
folder "testdir", as the jar contains files of
C:/blabla
extractJar method run into issue on Windows as it try to extract it
to testdir\\C:\\blabla
Anyway, as there already has some ".class" files to working on
(Utils.TEST_CLS_DIR), extractJar method is not needed.
Thanks,
Amy
Post by Kumar Srinivasan
Kumar
Post by Amy Lu
Please review the test fix.
bug: https://bugs.openjdk.java.net/browse/JDK-8060432
webrev: http://cr.openjdk.java.net/~weijun/8060432/webrev.00/
This test is to test
compareJars(new JarFile("normalized.jar"), new
JarFile("repacked.jar"));
where the jar files (normalized.jar repacked.jar and original.jar)
are created by "jar cnf" "jar cf" or "pack200 -r?.
extractJar(JarFile jf, File where) is not really needed as this
method just try to provide some files for the test to do "jar
cnf?. Actually, "jar cnf" can work on any files, test just need
some files to jar with.
Test can just simply created some files for that purpose.
Thanks,
Amy
Loading...