Merge "liblog: gtest open("/dev/pmsg0", "a")"

This commit is contained in:
Mark Salyzyn 2015-05-13 16:30:58 +00:00 committed by Gerrit Code Review
commit 10c18d64c6
1 changed files with 9 additions and 0 deletions

View File

@ -136,3 +136,12 @@ TEST(libc, __libc_fatal_no_abort) {
android_logger_list_close(logger_list);
}
TEST(libc, __pstore_append) {
FILE *fp;
ASSERT_TRUE(NULL != (fp = fopen("/dev/pmsg0", "a")));
static const char message[] = "libc.__pstore_append\n";
ASSERT_EQ((size_t)1, fwrite(message, sizeof(message), 1, fp));
ASSERT_EQ(0, fclose(fp));
fprintf(stderr, "Reboot, ensure string libc.__pstore_append is in /sys/fs/pstore/pmsg-ramoops-0\n");
}