diff options
author | Mark Salyzyn <salyzyn@google.com> | 2015-01-14 09:40:54 -0800 |
---|---|---|
committer | Mark Salyzyn <salyzyn@google.com> | 2015-03-18 16:34:49 -0700 |
commit | df0257d344b6d85bbbdae248748040e15aac35b8 (patch) | |
tree | 16036b200fa6a50d2fbf9d695a1d477764b73ad7 /liblog | |
parent | 26c4c905d3fc19b24f12a6aa0e22217f0e73e5de (diff) | |
download | core-df0257d344b6d85bbbdae248748040e15aac35b8.tar.gz core-df0257d344b6d85bbbdae248748040e15aac35b8.tar.bz2 core-df0257d344b6d85bbbdae248748040e15aac35b8.zip |
liblog: gtest open("/dev/pmsg0", "a")
Change-Id: I918025a8ac28204076ce4831ce277b04091619f6
Diffstat (limited to 'liblog')
-rw-r--r-- | liblog/tests/libc_test.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/liblog/tests/libc_test.cpp b/liblog/tests/libc_test.cpp index 29501beb9..0e84f4eb1 100644 --- a/liblog/tests/libc_test.cpp +++ b/liblog/tests/libc_test.cpp @@ -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"); +} |