Try to make test 1963 pass on fugu
The fugu test device we use seems to be old enough not to have a real
memfd_create syscall and something about the setup (probably the
chroot) is preventing the tmpfile() fallback from working. To make the
bot green have the test check to see if memfd_create should work and
ignore the test results if it's not.
Test: ./test.py --host
Test: Hope
Change-Id: I21f566344047eebb7e1817eea56cc83fd0d77558
diff --git a/test/1963-add-to-dex-classloader-in-memory/src/Main.java b/test/1963-add-to-dex-classloader-in-memory/src/Main.java
index 3728b45..1825e4f 100644
--- a/test/1963-add-to-dex-classloader-in-memory/src/Main.java
+++ b/test/1963-add-to-dex-classloader-in-memory/src/Main.java
@@ -16,6 +16,17 @@
public class Main {
public static void main(String[] args) throws Exception {
- art.Test1963.run();
+ try {
+ if (!hasWorkingMemfdCreate()) {
+ System.out.println("---NO memfd_create---");
+ }
+ art.Test1963.run();
+ } catch (Throwable t) {
+ System.out.println(t);
+ t.printStackTrace(System.out);
+ return;
+ }
}
+
+ public static native boolean hasWorkingMemfdCreate();
}