Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/test/javax/swing/LookAndFeel/8145547/DemandGTK2.txt
38918 views
How to prepare an Ubuntu machine for GTK-2-less test run.12The test DemandGTK2.sh should work well without GTK-2 switching to version 33if there's no GTK-2 library available.4At the moment, it's not easy to find a system with GTK-3 and without GTK-2:5many programs still depend on version 2.6We can, however, rename GTK-2 library for a single test run and then restore7it back.89(1) Find GTK2 library: run10/sbin/ldconfig -v 2>/dev/null | grep libgtk-x11-21112It will output one or two lines like13libgtk-x11-2.0.so.0 -> libgtk-x11-2.0.so.0.2400.2314Search for the target of that symlink for instance with locate:15locate libgtk-x11-2.0.so.0.2400.2316Finally, you'll find the libraries. On my current machine they are17/usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0.2400.2318/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.231920I'm running 64-bit JDK and need to tamper with x86_64 copy only.2122(2) Find running programs depending on this library. They probably would crash23if you rename it. Stop them for this test run.24That said, I'm afraid it would be impossible to do on a system older than Ubuntu 16.04.25On my Ubuntu 16.04 I have only hud-service using this library, and that's OK, it will restart26after a crash, if any.27To find these programs, run28lsof /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.232930(3) Now,31sudo mv /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.23 /usr/lib/x86_64-linux-gnu/bak.libgtk-x11-2.0.so.0.2400.2332jtreg DemandGTK2.sh33sudo mv /usr/lib/x86_64-linux-gnu/bak.libgtk-x11-2.0.so.0.2400.23 /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.233435Needless to say, you should substitute your own library path and however you run jtreg.36373839