Added test 7172865.
Backport lintian fixes from JDK-8032616.