A few small fix ups.

- Add a default xml file to run if nothing is specified on the command-line.
- Add a way to specify a xml file in suites without having to specify the
  full path name.
- Move all of the test xml files into their own directory.
- Add the suites directory for to glibc benchmarks.
- Add a new test for help data.
- Modify the full suite test to verify the default xml is chosen and use
  the real full.xml instead of the test one. Delete the test_full.xml.
- Move the property tests to the end of the suite.
- Add skipping of xml comments.

Test: Ran the unit tests and ran the bionic benchmarks.
Change-Id: Ie99965f86fe915af0175de46c7780ab79e2b0843
diff --git a/benchmarks/Android.bp b/benchmarks/Android.bp
index 6cda463..e8745a2 100644
--- a/benchmarks/Android.bp
+++ b/benchmarks/Android.bp
@@ -80,6 +80,7 @@
             enabled: false,
         },
     },
+    data: ["suites/*"],
 }
 
 cc_library_static {
@@ -100,5 +101,5 @@
         "libbase",
         "libBionicBenchmarksUtils",
     ],
-    data: ["suites/test_*.xml"],
+    data: ["suites/*", "test_suites/*"],
 }
diff --git a/benchmarks/bionic_benchmarks.cpp b/benchmarks/bionic_benchmarks.cpp
index e5a23ad..e61233c 100644
--- a/benchmarks/bionic_benchmarks.cpp
+++ b/benchmarks/bionic_benchmarks.cpp
@@ -25,11 +25,18 @@
 #include <string>
 #include <vector>
 
-#include "android-base/strings.h"
+#include <android-base/file.h>
+#include <android-base/strings.h>
 #include <benchmark/benchmark.h>
 #include <tinyxml2.h>
 #include "util.h"
 
+#if defined(__ANDROID__)
+static constexpr const char* kDefaultSuite="full.xml";
+#else
+static constexpr const char* kDefaultSuite="host.xml";
+#endif
+
 std::map<std::string, benchmark_func_t> g_str_to_func;
 
 std::mutex g_map_lock;
@@ -48,9 +55,10 @@
 
 void Usage() {
   printf("Usage:\n");
-  printf("bionic_benchmarks [--bionic_cpu=<cpu_to_isolate>] [--bionic_xml=<path_to_xml>]\n");
+  printf("bionic_benchmarks [--bionic_cpu=<cpu_to_isolate>]\n");
+  printf("                  [--bionic_xml=<path_to_xml>]\n");
   printf("                  [--bionic_iterations=<num_iter>]\n");
-  printf("                  [--bionic_extra=\"<fn_name> <arg1> <arg 2> ... ]\n");
+  printf("                  [--bionic_extra=\"<fn_name> <arg1> <arg 2> ...\"]\n");
   printf("                  [<Google benchmark flags>]\n");
   printf("Google benchmark flags:\n");
 
@@ -255,9 +263,13 @@
 
   // Read and register the functions.
   tinyxml2::XMLNode* fn = doc.FirstChildElement("fn");
-  args_vector_t arg_vector;
-  args_vector_t* run_args = &arg_vector;
   while (fn) {
+    if (fn == fn->ToComment()) {
+      // Skip comments.
+      fn = fn->NextSibling();
+      continue;
+    }
+
     auto fn_elem = fn->FirstChildElement("name");
     if (!fn_elem) {
       errx(1, "ERROR: Malformed XML entry: missing name element.");
@@ -267,8 +279,10 @@
       errx(1, "ERROR: Malformed XML entry: error parsing name text.");
     }
     auto* xml_args = fn->FirstChildElement("args");
-    run_args = ResolveArgs(run_args, xml_args ? android::base::Trim(xml_args->GetText()) : "",
-                           args_shorthand);
+    args_vector_t arg_vector;
+    args_vector_t* run_args = ResolveArgs(&arg_vector,
+                                          xml_args ? android::base::Trim(xml_args->GetText()) : "",
+                                          args_shorthand);
 
     // XML values for CPU and iterations take precedence over those passed in via CLI.
     bench_opts_t xml_opts{};
@@ -292,8 +306,6 @@
     RegisterGoogleBenchmarks(xml_opts, cmdline_opts, fn_name, run_args);
 
     fn = fn->NextSibling();
-    run_args = &arg_vector;
-    arg_vector.clear();
   }
   return 0;
 }
@@ -355,6 +367,10 @@
   return args_shorthand;
 }
 
+static bool FileExists(const std::string& file) {
+  struct stat st;
+  return stat(file.c_str(), &st) != -1 && S_ISREG(st.st_mode);
+}
 
 int main(int argc, char** argv) {
   std::map<std::string, args_vector_t> args_shorthand = GetShorthand();
@@ -362,6 +378,26 @@
   std::vector<char*> new_argv(argc);
   SanitizeOpts(argc, argv, &new_argv);
 
+  if (opts.xmlpath.empty()) {
+    // Don't add the default xml file if a user is specifying the tests to run.
+    if (opts.extra_benchmarks.empty()) {
+      // Try and use the default.
+      opts.xmlpath = android::base::GetExecutableDirectory() + "/suites/" + kDefaultSuite;
+      if (!FileExists(opts.xmlpath)) {
+        printf("Cannot find default xml file %s\n", kDefaultSuite);
+        return 1;
+      }
+    }
+  } else if (!FileExists(opts.xmlpath)) {
+    // See if this is a file in the suites directory.
+    std::string file(android::base::GetExecutableDirectory() + "/suites/" + opts.xmlpath);
+    if (opts.xmlpath[0] == '/' || !FileExists(file)) {
+      printf("Cannot find xml file %s: does not exist or is not a file.\n", opts.xmlpath.c_str());
+      return 1;
+    }
+    opts.xmlpath = file;
+  }
+
   if (!opts.xmlpath.empty()) {
     if (int err = RegisterXmlBenchmarks(opts, args_shorthand)) {
       return err;
diff --git a/benchmarks/suites/full.xml b/benchmarks/suites/full.xml
index fc58914..a7bd9d4 100644
--- a/benchmarks/suites/full.xml
+++ b/benchmarks/suites/full.xml
@@ -99,22 +99,6 @@
   <args>MATH_COMMON</args>
 </fn>
 <fn>
-  <name>BM_property_get</name>
-  <args>NUM_PROPS</args>
-</fn>
-<fn>
-  <name>BM_property_find</name>
-  <args>NUM_PROPS</args>
-</fn>
-<fn>
-  <name>BM_property_read</name>
-  <args>NUM_PROPS</args>
-</fn>
-<fn>
-  <name>BM_property_serial</name>
-  <args>NUM_PROPS</args>
-</fn>
-<fn>
   <name>BM_pthread_self</name>
 </fn>
 <fn>
@@ -305,3 +289,23 @@
   <name>BM_stdlib_mbrtowc</name>
   <args>0</args>
 </fn>
+<!--
+ Put the property tests at the end since they might cause segfaults in
+ tests running afterwards (b/62197783).
+-->
+<fn>
+  <name>BM_property_get</name>
+  <args>NUM_PROPS</args>
+</fn>
+<fn>
+  <name>BM_property_find</name>
+  <args>NUM_PROPS</args>
+</fn>
+<fn>
+  <name>BM_property_read</name>
+  <args>NUM_PROPS</args>
+</fn>
+<fn>
+  <name>BM_property_serial</name>
+  <args>NUM_PROPS</args>
+</fn>
diff --git a/benchmarks/suites/test_full.xml b/benchmarks/suites/test_full.xml
deleted file mode 100644
index adc3f28..0000000
--- a/benchmarks/suites/test_full.xml
+++ /dev/null
@@ -1,291 +0,0 @@
-<fn>
-  <name>BM_empty</name>
-</fn>
-<fn>
-  <name>BM_load_relaxed</name>
-</fn>
-<fn>
-  <name>BM_load_acquire</name>
-</fn>
-<fn>
-  <name>BM_store_release</name>
-</fn>
-<fn>
-  <name>BM_store_seq_cst</name>
-</fn>
-<fn>
-  <name>BM_fetch_add_relaxed</name>
-</fn>
-<fn>
-  <name>BM_fetch_add_seq_cst</name>
-</fn>
-<fn>
-  <name>BM_acquire_fence</name>
-</fn>
-<fn>
-  <name>BM_seq_cst_fence</name>
-</fn>
-<fn>
-  <name>BM_fetch_add_cs</name>
-</fn>
-<fn>
-  <name>BM_math_sqrt</name>
-</fn>
-<fn>
-  <name>BM_math_log10</name>
-</fn>
-<fn>
-  <name>BM_math_logb</name>
-</fn>
-<fn>
-  <name>BM_math_isfinite_macro</name>
-  <args>0</args>
-</fn>
-<fn>
-  <name>BM_math_isfinite</name>
-  <args>0</args>
-</fn>
-<fn>
-  <name>BM_math_isinf_macro</name>
-  <args>0</args>
-</fn>
-<fn>
-  <name>BM_math_isinf</name>
-  <args>0</args>
-</fn>
-<fn>
-  <name>BM_math_isnan_macro</name>
-  <args>0</args>
-</fn>
-<fn>
-  <name>BM_math_isnan</name>
-  <args>0</args>
-</fn>
-<fn>
-  <name>BM_math_isnormal_macro</name>
-  <args>0</args>
-</fn>
-<fn>
-  <name>BM_math_isnormal</name>
-  <args>0</args>
-</fn>
-<fn>
-  <name>BM_math_sin_fast</name>
-</fn>
-<fn>
-  <name>BM_math_sin_feupdateenv</name>
-</fn>
-<fn>
-  <name>BM_math_sin_fesetenv</name>
-</fn>
-<fn>
-  <name>BM_math_fpclassify</name>
-  <args>0</args>
-</fn>
-<fn>
-  <name>BM_math_signbit_macro</name>
-  <args>0</args>
-</fn>
-<fn>
-  <name>BM_math_signbit</name>
-  <args>0</args>
-</fn>
-<fn>
-  <name>BM_math_fabs_macro</name>
-  <args>0</args>
-</fn>
-<fn>
-  <name>BM_math_fabs</name>
-  <args>0</args>
-</fn>
-<fn>
-  <name>BM_property_get</name>
-  <args>NUM_PROPS</args>
-</fn>
-<fn>
-  <name>BM_property_find</name>
-  <args>NUM_PROPS</args>
-</fn>
-<fn>
-  <name>BM_property_read</name>
-  <args>NUM_PROPS</args>
-</fn>
-<fn>
-  <name>BM_property_serial</name>
-  <args>NUM_PROPS</args>
-</fn>
-<fn>
-  <name>BM_pthread_self</name>
-</fn>
-<fn>
-  <name>BM_pthread_getspecific</name>
-</fn>
-<fn>
-  <name>BM_pthread_setspecific</name>
-</fn>
-<fn>
-  <name>BM_pthread_once</name>
-</fn>
-<fn>
-  <name>BM_pthread_mutex_lock</name>
-</fn>
-<fn>
-  <name>BM_pthread_mutex_lock_ERRORCHECK</name>
-</fn>
-<fn>
-  <name>BM_pthread_mutex_lock_RECURSIVE</name>
-</fn>
-<fn>
-  <name>BM_pthread_rwlock_read</name>
-</fn>
-<fn>
-  <name>BM_pthread_rwlock_write</name>
-</fn>
-<fn>
-  <name>BM_pthread_create</name>
-</fn>
-<fn>
-  <name>BM_pthread_create_and_run</name>
-</fn>
-<fn>
-  <name>BM_pthread_exit_and_join</name>
-</fn>
-<fn>
-  <name>BM_pthread_key_create</name>
-</fn>
-<fn>
-  <name>BM_pthread_key_delete</name>
-</fn>
-<fn>
-  <name>BM_semaphore_sem_getvalue</name>
-</fn>
-<fn>
-  <name>BM_semaphore_sem_wait_sem_post</name>
-</fn>
-<fn>
-  <name>BM_stdio_fread</name>
-  <args>AT_COMMON_SIZES</args>
-</fn>
-<fn>
-  <name>BM_stdio_fwrite</name>
-  <args>AT_COMMON_SIZES</args>
-</fn>
-<fn>
-  <name>BM_stdio_fread_unbuffered</name>
-  <args>AT_COMMON_SIZES</args>
-</fn>
-<fn>
-  <name>BM_stdio_fwrite_unbuffered</name>
-  <args>AT_COMMON_SIZES</args>
-</fn>
-<fn>
-  <name>BM_stdio_fopen_fgets_fclose_locking</name>
-  <args>1024</args>
-</fn>
-<fn>
-  <name>BM_stdio_fopen_fgets_fclose_no_locking</name>
-  <args>1024</args>
-</fn>
-<fn>
-  <name>BM_stdio_fopen_fgetc_fclose_locking</name>
-  <args>1024</args>
-</fn>
-<fn>
-  <name>BM_stdio_fopen_fgetc_fclose_no_locking</name>
-  <args>1024</args>
-</fn>
-<fn>
-  <name>BM_string_memcmp</name>
-  <args>AT_ALIGNED_TWOBUF</args>
-</fn>
-<fn>
-  <name>BM_string_memcpy</name>
-  <args>AT_ALIGNED_TWOBUF</args>
-</fn>
-<fn>
-  <name>BM_string_memmove_non_overlapping</name>
-  <args>AT_ALIGNED_ONEBUF</args>
-</fn>
-<fn>
-  <name>BM_string_memmove_overlap_dst_before_src</name>
-  <args>AT_ALIGNED_ONEBUF</args>
-</fn>
-<fn>
-  <name>BM_string_memmove_overlap_src_before_dst</name>
-  <args>AT_ALIGNED_ONEBUF</args>
-</fn>
-<fn>
-  <name>BM_string_memset</name>
-  <args>AT_ALIGNED_ONEBUF</args>
-</fn>
-<fn>
-  <name>BM_string_strlen</name>
-  <args>AT_ALIGNED_ONEBUF</args>
-</fn>
-<fn>
-  <name>BM_string_strcat_copy_only</name>
-  <args>AT_ALIGNED_TWOBUF</args>
-</fn>
-<fn>
-  <name>BM_string_strcat_seek_only</name>
-  <args>AT_ALIGNED_TWOBUF</args>
-</fn>
-<fn>
-  <name>BM_string_strcat_half_copy_half_seek</name>
-  <args>AT_ALIGNED_TWOBUF</args>
-</fn>
-<fn>
-  <name>BM_string_strcpy</name>
-  <args>AT_ALIGNED_TWOBUF</args>
-</fn>
-<fn>
-  <name>BM_string_strcmp</name>
-  <args>AT_ALIGNED_TWOBUF</args>
-</fn>
-<fn>
-  <name>BM_string_strstr</name>
-  <args>AT_ALIGNED_TWOBUF</args>
-</fn>
-<fn>
-  <name>BM_string_strchr</name>
-  <args>AT_ALIGNED_ONEBUF</args>
-</fn>
-<fn>
-  <name>BM_time_clock_gettime</name>
-</fn>
-<fn>
-  <name>BM_time_clock_gettime_syscall</name>
-</fn>
-<fn>
-  <name>BM_time_gettimeofday</name>
-</fn>
-<fn>
-  <name>BM_time_gettimeofday_syscall</name>
-</fn>
-<fn>
-  <name>BM_time_time</name>
-</fn>
-<fn>
-  <name>BM_unistd_getpid</name>
-</fn>
-<fn>
-  <name>BM_unistd_getpid_syscall</name>
-</fn>
-<fn>
-  <name>BM_unistd_gettid</name>
-</fn>
-<fn>
-  <name>BM_unistd_gettid_syscall</name>
-</fn>
-<fn>
-  <name>BM_stdlib_malloc_free</name>
-  <args>AT_ALIGNED_ONEBUF</args>
-</fn>
-<fn>
-  <name>BM_stdlib_mbstowcs</name>
-  <args>0 0</args>
-</fn>
-<fn>
-  <name>BM_stdlib_mbrtowc</name>
-  <args>0</args>
-</fn>
diff --git a/benchmarks/suites/test_alignment.xml b/benchmarks/test_suites/test_alignment.xml
similarity index 100%
rename from benchmarks/suites/test_alignment.xml
rename to benchmarks/test_suites/test_alignment.xml
diff --git a/benchmarks/suites/test_from_each.xml b/benchmarks/test_suites/test_from_each.xml
similarity index 100%
rename from benchmarks/suites/test_from_each.xml
rename to benchmarks/test_suites/test_from_each.xml
diff --git a/benchmarks/suites/test_medium.xml b/benchmarks/test_suites/test_medium.xml
similarity index 100%
rename from benchmarks/suites/test_medium.xml
rename to benchmarks/test_suites/test_medium.xml
diff --git a/benchmarks/suites/test_small.xml b/benchmarks/test_suites/test_small.xml
similarity index 100%
rename from benchmarks/suites/test_small.xml
rename to benchmarks/test_suites/test_small.xml
diff --git a/benchmarks/tests/interface_test.cpp b/benchmarks/tests/interface_test.cpp
index 601dcc5..b8279b6 100644
--- a/benchmarks/tests/interface_test.cpp
+++ b/benchmarks/tests/interface_test.cpp
@@ -38,10 +38,9 @@
   void SanitizeOutput();
 
   void Exec(std::vector<const char*> args);
-  void ExecAndCapture(std::vector<const char*> args);
   void RunTest(std::vector<const char*> extra_args = {});
   void Verify(const std::string& expected_output, int expected_exitcode,
-              std::vector<const char*> extra_args = {});
+              std::vector<const char*> extra_args = {}, bool sanitize = true);
 
   std::string raw_output_;
   std::string sanitized_output_;
@@ -51,7 +50,7 @@
 };
 
 static std::string GetBionicXmlArg(const char* xml_file) {
-  return "--bionic_xml=" + android::base::GetExecutableDirectory() + "/suites/" + xml_file;
+  return "--bionic_xml=" + android::base::GetExecutableDirectory() + "/test_suites/" + xml_file;
 }
 
 void SystemTests::SanitizeOutput() {
@@ -104,7 +103,7 @@
 }
 
 void SystemTests::Verify(const std::string& expected_output,
-                         int expected_exitcode, std::vector<const char*> extra_args) {
+                         int expected_exitcode, std::vector<const char*> extra_args, bool sanitize) {
   std::vector<const char*> args;
   for (const auto& arg : extra_args) {
     args.push_back(arg);
@@ -131,13 +130,37 @@
   int status;
   ASSERT_EQ(pid_, TEMP_FAILURE_RETRY(waitpid(pid_, &status, 0))) << "Test output:\n" << raw_output_;
   exitcode_ = WEXITSTATUS(status);
-  SanitizeOutput();
-
   ASSERT_EQ(expected_exitcode, exitcode_) << "Test output:\n" << raw_output_;
-  if (!expected_output.empty()) {
-    ASSERT_EQ(expected_output, sanitized_output_);
-  }
 
+  if (sanitize) {
+    SanitizeOutput();
+    ASSERT_EQ(expected_output, sanitized_output_);
+  } else {
+    ASSERT_EQ(expected_output, raw_output_);
+  }
+}
+
+TEST_F(SystemTests, help) {
+  std::string expected =
+    "Usage:\n"
+    "bionic_benchmarks [--bionic_cpu=<cpu_to_isolate>]\n"
+    "                  [--bionic_xml=<path_to_xml>]\n"
+    "                  [--bionic_iterations=<num_iter>]\n"
+    "                  [--bionic_extra=\"<fn_name> <arg1> <arg 2> ...\"]\n"
+    "                  [<Google benchmark flags>]\n"
+    "Google benchmark flags:\n"
+    "benchmark [--benchmark_list_tests={true|false}]\n"
+    "          [--benchmark_filter=<regex>]\n"
+    "          [--benchmark_min_time=<min_time>]\n"
+    "          [--benchmark_repetitions=<num_repetitions>]\n"
+    "          [--benchmark_report_aggregates_only={true|false}\n"
+    "          [--benchmark_format=<console|json|csv>]\n"
+    "          [--benchmark_out=<filename>]\n"
+    "          [--benchmark_out_format=<json|console|csv>]\n"
+    "          [--benchmark_color={auto|true|false}]\n"
+    "          [--benchmark_counters_tabular={true|false}]\n"
+    "          [--v=<verbosity>]\n";
+  Verify(expected, 0, std::vector<const char*>{"--help"}, false);
 }
 
 TEST_F(SystemTests, full_suite) {
@@ -156,49 +179,60 @@
     "BM_math_log10/iterations:1\n"
     "BM_math_logb/iterations:1\n"
     "BM_math_isfinite_macro/0/iterations:1\n"
+    "BM_math_isfinite_macro/1/iterations:1\n"
+    "BM_math_isfinite_macro/2/iterations:1\n"
+    "BM_math_isfinite_macro/3/iterations:1\n"
     "BM_math_isfinite/0/iterations:1\n"
+    "BM_math_isfinite/1/iterations:1\n"
+    "BM_math_isfinite/2/iterations:1\n"
+    "BM_math_isfinite/3/iterations:1\n"
     "BM_math_isinf_macro/0/iterations:1\n"
+    "BM_math_isinf_macro/1/iterations:1\n"
+    "BM_math_isinf_macro/2/iterations:1\n"
+    "BM_math_isinf_macro/3/iterations:1\n"
     "BM_math_isinf/0/iterations:1\n"
+    "BM_math_isinf/1/iterations:1\n"
+    "BM_math_isinf/2/iterations:1\n"
+    "BM_math_isinf/3/iterations:1\n"
     "BM_math_isnan_macro/0/iterations:1\n"
+    "BM_math_isnan_macro/1/iterations:1\n"
+    "BM_math_isnan_macro/2/iterations:1\n"
+    "BM_math_isnan_macro/3/iterations:1\n"
     "BM_math_isnan/0/iterations:1\n"
+    "BM_math_isnan/1/iterations:1\n"
+    "BM_math_isnan/2/iterations:1\n"
+    "BM_math_isnan/3/iterations:1\n"
     "BM_math_isnormal_macro/0/iterations:1\n"
+    "BM_math_isnormal_macro/1/iterations:1\n"
+    "BM_math_isnormal_macro/2/iterations:1\n"
+    "BM_math_isnormal_macro/3/iterations:1\n"
     "BM_math_isnormal/0/iterations:1\n"
+    "BM_math_isnormal/1/iterations:1\n"
+    "BM_math_isnormal/2/iterations:1\n"
+    "BM_math_isnormal/3/iterations:1\n"
     "BM_math_sin_fast/iterations:1\n"
     "BM_math_sin_feupdateenv/iterations:1\n"
     "BM_math_sin_fesetenv/iterations:1\n"
     "BM_math_fpclassify/0/iterations:1\n"
+    "BM_math_fpclassify/1/iterations:1\n"
+    "BM_math_fpclassify/2/iterations:1\n"
+    "BM_math_fpclassify/3/iterations:1\n"
     "BM_math_signbit_macro/0/iterations:1\n"
+    "BM_math_signbit_macro/1/iterations:1\n"
+    "BM_math_signbit_macro/2/iterations:1\n"
+    "BM_math_signbit_macro/3/iterations:1\n"
     "BM_math_signbit/0/iterations:1\n"
+    "BM_math_signbit/1/iterations:1\n"
+    "BM_math_signbit/2/iterations:1\n"
+    "BM_math_signbit/3/iterations:1\n"
     "BM_math_fabs_macro/0/iterations:1\n"
+    "BM_math_fabs_macro/1/iterations:1\n"
+    "BM_math_fabs_macro/2/iterations:1\n"
+    "BM_math_fabs_macro/3/iterations:1\n"
     "BM_math_fabs/0/iterations:1\n"
-    "BM_property_get/1/iterations:1\n"
-    "BM_property_get/4/iterations:1\n"
-    "BM_property_get/16/iterations:1\n"
-    "BM_property_get/64/iterations:1\n"
-    "BM_property_get/128/iterations:1\n"
-    "BM_property_get/256/iterations:1\n"
-    "BM_property_get/512/iterations:1\n"
-    "BM_property_find/1/iterations:1\n"
-    "BM_property_find/4/iterations:1\n"
-    "BM_property_find/16/iterations:1\n"
-    "BM_property_find/64/iterations:1\n"
-    "BM_property_find/128/iterations:1\n"
-    "BM_property_find/256/iterations:1\n"
-    "BM_property_find/512/iterations:1\n"
-    "BM_property_read/1/iterations:1\n"
-    "BM_property_read/4/iterations:1\n"
-    "BM_property_read/16/iterations:1\n"
-    "BM_property_read/64/iterations:1\n"
-    "BM_property_read/128/iterations:1\n"
-    "BM_property_read/256/iterations:1\n"
-    "BM_property_read/512/iterations:1\n"
-    "BM_property_serial/1/iterations:1\n"
-    "BM_property_serial/4/iterations:1\n"
-    "BM_property_serial/16/iterations:1\n"
-    "BM_property_serial/64/iterations:1\n"
-    "BM_property_serial/128/iterations:1\n"
-    "BM_property_serial/256/iterations:1\n"
-    "BM_property_serial/512/iterations:1\n"
+    "BM_math_fabs/1/iterations:1\n"
+    "BM_math_fabs/2/iterations:1\n"
+    "BM_math_fabs/3/iterations:1\n"
     "BM_pthread_self/iterations:1\n"
     "BM_pthread_getspecific/iterations:1\n"
     "BM_pthread_setspecific/iterations:1\n"
@@ -247,10 +281,14 @@
     "BM_stdio_fwrite_unbuffered/16384/iterations:1\n"
     "BM_stdio_fwrite_unbuffered/32768/iterations:1\n"
     "BM_stdio_fwrite_unbuffered/65536/iterations:1\n"
-    "BM_stdio_fopen_fgets_fclose_locking/1024/iterations:1\n"
-    "BM_stdio_fopen_fgets_fclose_no_locking/1024/iterations:1\n"
+    "BM_stdio_fopen_fgetln_fclose_locking/iterations:1\n"
+    "BM_stdio_fopen_fgetln_fclose_no_locking/iterations:1\n"
+    "BM_stdio_fopen_fgets_fclose_locking/iterations:1\n"
+    "BM_stdio_fopen_fgets_fclose_no_locking/iterations:1\n"
     "BM_stdio_fopen_fgetc_fclose_locking/1024/iterations:1\n"
     "BM_stdio_fopen_fgetc_fclose_no_locking/1024/iterations:1\n"
+    "BM_stdio_fopen_getline_fclose_locking/iterations:1\n"
+    "BM_stdio_fopen_getline_fclose_no_locking/iterations:1\n"
     "BM_string_memcmp/8/0/0/iterations:1\n"
     "BM_string_memcmp/64/0/0/iterations:1\n"
     "BM_string_memcmp/512/0/0/iterations:1\n"
@@ -267,14 +305,14 @@
     "BM_string_memcpy/16384/0/0/iterations:1\n"
     "BM_string_memcpy/32768/0/0/iterations:1\n"
     "BM_string_memcpy/65536/0/0/iterations:1\n"
-    "BM_string_memmove_non_overlapping/8/0/iterations:1\n"
-    "BM_string_memmove_non_overlapping/64/0/iterations:1\n"
-    "BM_string_memmove_non_overlapping/512/0/iterations:1\n"
-    "BM_string_memmove_non_overlapping/1024/0/iterations:1\n"
-    "BM_string_memmove_non_overlapping/8192/0/iterations:1\n"
-    "BM_string_memmove_non_overlapping/16384/0/iterations:1\n"
-    "BM_string_memmove_non_overlapping/32768/0/iterations:1\n"
-    "BM_string_memmove_non_overlapping/65536/0/iterations:1\n"
+    "BM_string_memmove_non_overlapping/8/0/0/iterations:1\n"
+    "BM_string_memmove_non_overlapping/64/0/0/iterations:1\n"
+    "BM_string_memmove_non_overlapping/512/0/0/iterations:1\n"
+    "BM_string_memmove_non_overlapping/1024/0/0/iterations:1\n"
+    "BM_string_memmove_non_overlapping/8192/0/0/iterations:1\n"
+    "BM_string_memmove_non_overlapping/16384/0/0/iterations:1\n"
+    "BM_string_memmove_non_overlapping/32768/0/0/iterations:1\n"
+    "BM_string_memmove_non_overlapping/65536/0/0/iterations:1\n"
     "BM_string_memmove_overlap_dst_before_src/8/0/iterations:1\n"
     "BM_string_memmove_overlap_dst_before_src/64/0/iterations:1\n"
     "BM_string_memmove_overlap_dst_before_src/512/0/iterations:1\n"
@@ -368,6 +406,8 @@
     "BM_time_gettimeofday/iterations:1\n"
     "BM_time_gettimeofday_syscall/iterations:1\n"
     "BM_time_time/iterations:1\n"
+    "BM_time_localtime/iterations:1\n"
+    "BM_time_localtime_r/iterations:1\n"
     "BM_unistd_getpid/iterations:1\n"
     "BM_unistd_getpid_syscall/iterations:1\n"
     "BM_unistd_gettid/iterations:1\n"
@@ -381,9 +421,39 @@
     "BM_stdlib_malloc_free/32768/0/iterations:1\n"
     "BM_stdlib_malloc_free/65536/0/iterations:1\n"
     "BM_stdlib_mbstowcs/0/0/iterations:1\n"
-    "BM_stdlib_mbrtowc/0/iterations:1\n";
-  Verify(expected, 0, std::vector<const char *>{GetBionicXmlArg("test_full.xml").c_str(),
-                                                "--bionic_iterations=1"});
+    "BM_stdlib_mbrtowc/0/iterations:1\n"
+    "BM_property_get/1/iterations:1\n"
+    "BM_property_get/4/iterations:1\n"
+    "BM_property_get/16/iterations:1\n"
+    "BM_property_get/64/iterations:1\n"
+    "BM_property_get/128/iterations:1\n"
+    "BM_property_get/256/iterations:1\n"
+    "BM_property_get/512/iterations:1\n"
+    "BM_property_find/1/iterations:1\n"
+    "BM_property_find/4/iterations:1\n"
+    "BM_property_find/16/iterations:1\n"
+    "BM_property_find/64/iterations:1\n"
+    "BM_property_find/128/iterations:1\n"
+    "BM_property_find/256/iterations:1\n"
+    "BM_property_find/512/iterations:1\n"
+    "BM_property_read/1/iterations:1\n"
+    "BM_property_read/4/iterations:1\n"
+    "BM_property_read/16/iterations:1\n"
+    "BM_property_read/64/iterations:1\n"
+    "BM_property_read/128/iterations:1\n"
+    "BM_property_read/256/iterations:1\n"
+    "BM_property_read/512/iterations:1\n"
+    "BM_property_serial/1/iterations:1\n"
+    "BM_property_serial/4/iterations:1\n"
+    "BM_property_serial/16/iterations:1\n"
+    "BM_property_serial/64/iterations:1\n"
+    "BM_property_serial/128/iterations:1\n"
+    "BM_property_serial/256/iterations:1\n"
+    "BM_property_serial/512/iterations:1\n";
+  Verify(expected, 0, std::vector<const char*>{"--bionic_iterations=1"});
+
+  // Make sure that the test suite can be found in the suites directory.
+  Verify(expected, 0, std::vector<const char*>{"--bionic_iterations=1", "--bionic_xml=full.xml"});
 }
 
 TEST_F(SystemTests, small) {
@@ -391,8 +461,8 @@
     "BM_string_memcmp/8/8/8/iterations:1\n"
     "BM_math_sqrt/iterations:1\n"
     "BM_property_get/1/iterations:1\n";
-  Verify(expected, 0, std::vector<const char *>{GetBionicXmlArg("test_small.xml").c_str(),
-                                                "--bionic_iterations=1"});
+  Verify(expected, 0, std::vector<const char*>{GetBionicXmlArg("test_small.xml").c_str(),
+                                               "--bionic_iterations=1"});
 }
 
 TEST_F(SystemTests, medium) {
@@ -408,8 +478,8 @@
     "BM_math_sqrt/iterations:1\n"
     "BM_string_memcpy/512/4/4/iterations:25\n"
     "BM_property_get/1/iterations:1\n";
-  Verify(expected, 0, std::vector<const char *>{GetBionicXmlArg("test_medium.xml").c_str(),
-                                                "--bionic_iterations=1"});
+  Verify(expected, 0, std::vector<const char*>{GetBionicXmlArg("test_medium.xml").c_str(),
+                                               "--bionic_iterations=1"});
 }
 
 TEST_F(SystemTests, from_each) {
@@ -423,25 +493,25 @@
     "BM_string_memcpy/512/4/4/iterations:1\n"
     "BM_time_clock_gettime/iterations:1\n"
     "BM_unistd_getpid/iterations:1\n";
-  Verify(expected, 0, std::vector<const char *>{GetBionicXmlArg("test_from_each.xml").c_str(),
-                                                "--bionic_iterations=1"});
+  Verify(expected, 0, std::vector<const char*>{GetBionicXmlArg("test_from_each.xml").c_str(),
+                                               "--bionic_iterations=1"});
 }
 
 TEST_F(SystemTests, cmd_args) {
   std::string expected =
     "BM_string_memcpy/8/8/8/iterations:1\n"
     "BM_math_log10/iterations:1\n";
-  Verify(expected, 0, std::vector<const char *>{"--bionic_extra=BM_string_memcpy 8 8 8",
-                                                "--bionic_extra=BM_math_log10",
-                                                "--bionic_iterations=1"});
+  Verify(expected, 0, std::vector<const char*>{"--bionic_extra=BM_string_memcpy 8 8 8",
+                                               "--bionic_extra=BM_math_log10",
+                                               "--bionic_iterations=1"});
 }
 
 TEST_F(SystemTests, cmd_args_no_iter) {
   std::string expected =
     "BM_string_memcpy/8/8/8\n"
     "BM_math_log10\n";
-  Verify(expected, 0, std::vector<const char *>{"--bionic_extra=BM_string_memcpy 8 8 8",
-                                                "--bionic_extra=BM_math_log10"});
+  Verify(expected, 0, std::vector<const char*>{"--bionic_extra=BM_string_memcpy 8 8 8",
+                                               "--bionic_extra=BM_math_log10"});
 }
 
 TEST_F(SystemTests, xml_and_args) {
@@ -466,11 +536,11 @@
     "BM_string_memcpy/32768/0/0/iterations:1\n"
     "BM_string_memcpy/65536/0/0/iterations:1\n"
     "BM_math_log10/iterations:1\n";
-  Verify(expected, 0, std::vector<const char *>{"--bionic_extra=BM_string_memcpy AT_ALIGNED_TWOBUF",
-                                                "--bionic_extra=BM_math_log10",
-                                                "--bionic_cpu=0",
-                                                GetBionicXmlArg("test_medium.xml").c_str(),
-                                                "--bionic_iterations=1"});
+  Verify(expected, 0, std::vector<const char*>{"--bionic_extra=BM_string_memcpy AT_ALIGNED_TWOBUF",
+                                               "--bionic_extra=BM_math_log10",
+                                               "--bionic_cpu=0",
+                                               GetBionicXmlArg("test_medium.xml").c_str(),
+                                               "--bionic_iterations=1"});
 }
 
 TEST_F(SystemTests, alignment) {
@@ -555,6 +625,6 @@
     "BM_string_strlen/16384/2048/iterations:1\n"
     "BM_string_strlen/32768/2048/iterations:1\n"
     "BM_string_strlen/65536/2048/iterations:1\n";
-  Verify(expected, 0, std::vector<const char *>{GetBionicXmlArg("test_alignment.xml").c_str(),
-                                                "--bionic_iterations=1"});
+  Verify(expected, 0, std::vector<const char*>{GetBionicXmlArg("test_alignment.xml").c_str(),
+                                               "--bionic_iterations=1"});
 }