diff options
author | Joe Onorato <joeo@google.com> | 2019-04-24 16:27:33 -0700 |
---|---|---|
committer | Joe Onorato <joeo@google.com> | 2019-04-26 17:44:10 -0700 |
commit | e547205eec1c32a7b270e4811ba161222bdb6bf7 (patch) | |
tree | eb9c3e05cd999735ca91fc0bd8ef13b7b8752ed8 /tools/incident_section_gen/main.cpp | |
parent | 7a406b47ebd2ec9dc37e203863df8806e55dfc00 (diff) |
Get incidentd cts working again.
- The buffer size increased, and the CTS test that checked that
was triggering.
- Privacy filtering wasn't working for the stack trace sections
- The incident command was not handling the default arguments correctly
- The throttler was throttling streaming reports, which made the
test flaky.
Bug: 126253679
Test: atest CtsIncidentHostTestCases
Change-Id: I342cd7d0421ea8c22b7796fc99e779f21855af73
Diffstat (limited to 'tools/incident_section_gen/main.cpp')
-rw-r--r-- | tools/incident_section_gen/main.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/incident_section_gen/main.cpp b/tools/incident_section_gen/main.cpp index 3b3fe196736d..c9c0edc59585 100644 --- a/tools/incident_section_gen/main.cpp +++ b/tools/incident_section_gen/main.cpp @@ -469,6 +469,7 @@ static bool generateSectionListCpp(Descriptor const* descriptor) { const FieldDescriptor* field = fieldsInOrder[i]; const string fieldName = getFieldName(field); const Destination fieldDest = getFieldDest(field); + printf("\n// Incident Report Section: %s (%d)\n", field->name().c_str(), field->number()); if (field->type() != FieldDescriptor::TYPE_MESSAGE) { printPrivacy(fieldName, field, "NULL", fieldDest, "NULL"); continue; @@ -477,9 +478,11 @@ static bool generateSectionListCpp(Descriptor const* descriptor) { skip[i] = true; const string fieldMessageName = getMessageName(field->message_type(), fieldDest); // generate privacy flags for each section. - if (generatePrivacyFlags(field->message_type(), fieldDest, variableNames, &parents)) { + if (generatePrivacyFlags(field->message_type(), incidentDest, variableNames, &parents)) { printPrivacy(fieldName, field, fieldMessageName, fieldDest, "NULL"); - } else if (isDefaultField(field, incidentDest)) { + } else if (fieldDest == incidentDest) { + printf("// default %s: fieldDest=%d incidentDest=%d\n", fieldName.c_str(), + getFieldDest(field), incidentDest); continue; // don't create a new privacy if the value is default. } else { printPrivacy(fieldName, field, "NULL", fieldDest, "NULL"); |