logcat: test: also check "failed to clear" in blocking_clear
Add more detail about logcat.blocking_clear test failure Test: gTest logcat-unit-test --gtest_filter=logcat.blocking_clear Bug: 37483775 Change-Id: I6555c13593781a1278d9106e66c2dec6009a2215
This commit is contained in:
parent
3c501b50b4
commit
0a1424e196
1 changed files with 6 additions and 1 deletions
|
|
@ -1216,7 +1216,12 @@ TEST(logcat, blocking_clear) {
|
|||
signal(SIGALRM, caught_blocking_clear);
|
||||
alarm(2);
|
||||
while (fgets(buffer, sizeof(buffer), fp)) {
|
||||
if (!strncmp(buffer, "clearLog: ", 10)) {
|
||||
if (!strncmp(buffer, "clearLog: ", strlen("clearLog: "))) {
|
||||
fprintf(stderr, "WARNING: Test lacks permission to run :-(\n");
|
||||
count = signals = 1;
|
||||
break;
|
||||
}
|
||||
if (!strncmp(buffer, "failed to clear", strlen("failed to clear"))) {
|
||||
fprintf(stderr, "WARNING: Test lacks permission to run :-(\n");
|
||||
count = signals = 1;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue