summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/com/android/loganalysis/parser/DmesgParser.java5
-rw-r--r--tests/src/com/android/loganalysis/parser/DmesgParserTest.java14
2 files changed, 11 insertions, 8 deletions
diff --git a/src/com/android/loganalysis/parser/DmesgParser.java b/src/com/android/loganalysis/parser/DmesgParser.java
index ba802cf..bd0d8e4 100644
--- a/src/com/android/loganalysis/parser/DmesgParser.java
+++ b/src/com/android/loganalysis/parser/DmesgParser.java
@@ -20,7 +20,6 @@ import com.android.loganalysis.item.DmesgActionInfoItem;
import com.android.loganalysis.item.DmesgItem;
import com.android.loganalysis.item.DmesgServiceInfoItem;
import com.android.loganalysis.item.DmesgStageInfoItem;
-
import com.google.common.annotations.VisibleForTesting;
import java.io.BufferedReader;
@@ -65,12 +64,10 @@ public class DmesgParser implements IParser {
String.format("%s%s", SERVICE_PREFIX, START_STAGE_PREFIX));
// Matches: init: processing action (early-init)
- // must not match: init: processing action (vold.decrypt=trigger_restart_framework)
private static final String START_PROCESSING_ACTION_PREFIX = String.format(
- "processing action \\((?<%s>[^=]+)\\)", ACTION);
+ "processing action \\((?<%s>.*)\\)", ACTION);
// Matches: [ 14.942872] init: processing action (early-init)
- // Does not match: [ 22.361049] init: processing action (persist.sys.usb.config=* boot)
private static final Pattern START_PROCESSING_ACTION = Pattern.compile(
String.format("%s%s", SERVICE_PREFIX, START_PROCESSING_ACTION_PREFIX));
diff --git a/tests/src/com/android/loganalysis/parser/DmesgParserTest.java b/tests/src/com/android/loganalysis/parser/DmesgParserTest.java
index 4b043e1..2206733 100644
--- a/tests/src/com/android/loganalysis/parser/DmesgParserTest.java
+++ b/tests/src/com/android/loganalysis/parser/DmesgParserTest.java
@@ -95,7 +95,7 @@ public class DmesgParserTest extends TestCase {
dmesgParser.getServiceInfoItems().size());
assertEquals("Stage info items list size should be 2", 2,
dmesgParser.getStageInfoItems().size());
- assertEquals("Action info items list size should be 5", 5,
+ assertEquals("Action info items list size should be 8", 8,
dmesgParser.getActionInfoItems().size());
assertEquals(EXPECTED_SERVICE_INFO_ITEMS, actualDmesgItem.getServiceInfoItems());
@@ -115,7 +115,7 @@ public class DmesgParserTest extends TestCase {
dmesgParser.getServiceInfoItems().size());
assertEquals("Stage info items list size should be 2", 2,
dmesgParser.getStageInfoItems().size());
- assertEquals("Action info items list size should be 5", 5,
+ assertEquals("Action info items list size should be 8", 8,
dmesgParser.getActionInfoItems().size());
}
}
@@ -207,7 +207,7 @@ public class DmesgParserTest extends TestCase {
dmesgParser.parseActionInfo(line);
}
List<DmesgActionInfoItem> actualActionInfoItems = dmesgParser.getActionInfoItems();
- assertEquals(5, actualActionInfoItems.size());
+ assertEquals(8, actualActionInfoItems.size());
assertEquals(EXPECTED_ACTION_INFO_ITEMS, actualActionInfoItems);
}
@@ -219,8 +219,14 @@ public class DmesgParserTest extends TestCase {
new DmesgActionInfoItem("set_kptr_restrict",
(long) (Double.parseDouble("47240.083"))),
new DmesgActionInfoItem("keychord_init", (long) (Double.parseDouble("47245.778"))),
+ new DmesgActionInfoItem("persist.sys.usb.config=* boot",
+ (long) (Double.parseDouble("52361.049"))),
new DmesgActionInfoItem("enable_property_trigger",
- (long) (Double.parseDouble("52361.108"))));
+ (long) (Double.parseDouble("52361.108"))),
+ new DmesgActionInfoItem("security.perf_harden=1",
+ (long) (Double.parseDouble("52361.313"))),
+ new DmesgActionInfoItem("ro.debuggable=1",
+ (long) (Double.parseDouble("52361.495"))));
}
private static List<DmesgStageInfoItem> getExpectedStageInfoItems() {