Raw profile data file may contain lines truncated due to unexpected app exit. This change is to have merge_fdata check number of fields in each line of raw profile data file and ignore a line if the number is not expected.
20 lines
538 B
Text
20 lines
538 B
Text
## Check that merge-fdata skips truncated lines with a warning
|
|
|
|
# REQUIRES: system-linux
|
|
|
|
# RUN: split-file %s %t
|
|
# RUN: merge-fdata %t/a.fdata %t/b.fdata -o %t/merged.fdata 2>&1 | \
|
|
# RUN: FileCheck -check-prefix=CHECK-WARN %s
|
|
# RUN: FileCheck %s --input-file %t/merged.fdata
|
|
|
|
# CHECK-WARN: WARNING: {{.*}}b.fdata: ignoring malformed entry
|
|
|
|
## Only the valid entry should appear in the merged output
|
|
# CHECK: 1 main 0 1 main 2 1 3
|
|
# CHECK-NOT: trunc
|
|
|
|
#--- a.fdata
|
|
1 main 0 1 main 2 0 1
|
|
#--- b.fdata
|
|
1 main 0 1 main 2 1 2
|
|
1 trunc 0 1
|