Various fixes.

CHECK_xx arguments should be the "right" way round, not backwards like
ASSERT_xx and EXPECT_xx.

Use /mnt/sdcard/ rather than /sdcard/ to bypass FUSE and avoid getting
intermittent mkdir(2) "Device or resource busy" failures.

Better diagnostics when methods not found by test helpers.

Remove the whitelist from oatCompileMethod.

Leave evidence in the log of what we've compiled and where we put it.

Disable card marking by generated code until we have a cards to mark.

Distinguish between CanPutArrayElementFromCode and CanPutArrayElement.
Implement both.

Add a new test to see how much of the basic System and String/StringBuilder
facilities are working.

Change-Id: Ie24f2859e404ab912e6cc77d170ceb4df5ecdf19
diff --git a/src/common_test.h b/src/common_test.h
index 4689b28..4ed61f2 100644
--- a/src/common_test.h
+++ b/src/common_test.h
@@ -98,8 +98,10 @@
       setenv("ANDROID_ROOT", root.c_str(), 1);
     }
 
-    android_data_ = (is_host_ ? "/tmp/art-data-XXXXXX" : "/sdcard/art-data-XXXXXX");
-    ASSERT_TRUE(mkdtemp(&android_data_[0]) != NULL);
+    android_data_ = (is_host_ ? "/tmp/art-data-XXXXXX" : "/mnt/sdcard/art-data-XXXXXX");
+    if (mkdtemp(&android_data_[0]) == NULL) {
+      PLOG(FATAL) << "mkdtemp(\"" << &android_data_[0] << "\") failed";
+    }
     setenv("ANDROID_DATA", android_data_.c_str(), 1);
     art_cache_.append(android_data_.c_str());
     art_cache_.append("/art-cache");
@@ -257,7 +259,8 @@
     Class* klass = class_linker_->FindClass(class_descriptor, class_loader);
     CHECK(klass != NULL) << "Class not found " << class_name;
     Method* method = klass->FindDirectMethod(method_name, signature);
-    CHECK(method != NULL) << "Method not found " << method_name;
+    CHECK(method != NULL) << "Direct method not found: "
+                          << class_name << "." << method_name << signature;
     CompileMethod(method);
   }
 
@@ -269,7 +272,8 @@
     Class* klass = class_linker_->FindClass(class_descriptor, class_loader);
     CHECK(klass != NULL) << "Class not found " << class_name;
     Method* method = klass->FindVirtualMethod(method_name, signature);
-    CHECK(method != NULL) << "Method not found " << method_name;
+    CHECK(method != NULL) << "Virtual method not found: "
+                          << class_name << "." << method_name << signature;
     CompileMethod(method);
   }