[PATCH] D68718: [llvm-profdata] Make "malformed-ptr-to-counter-array.test" textual

Vedant Kumar via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 14 10:20:27 PDT 2019


Hi Yvan,

I'm not sure what went wrong, so I've landed r374792 to weaken the test in an attempt to get more information (or, possibly appease the bots).

It looks a bit like the error message llvm-profdata is expected to print to stderr isn't flushed. If that's the wrong explanation, r374792 should give us more info (e.g. if the exit code is 0, there must be a bug).

thanks,
vedant

> On Oct 14, 2019, at 7:59 AM, Vedant Kumar <vedant_kumar at apple.com> wrote:
> 
> Hi Yvan,
> 
> Apologies, but I won’t be able to look at this in the next 2-3 hours. Feel free to revert in the interim.
> 
> thanks,
> vedant
> 
>> On Oct 14, 2019, at 12:59 AM, Yvan Roux <yvan.roux at linaro.org> wrote:
>> 
>> Hi Vedant,
>> 
>> this commit broke ARM bots, logs are available here:
>> 
>> http://lab.llvm.org:8011/builders/clang-cmake-armv7-quick/builds/10838/steps/ninja%20check%201/logs/FAIL%3A%20LLVM%3A%3Amalformed-ptr-to-counter-array.test
>> 
>> Cheers,
>> Yvan
>> 
>> On Sat, 12 Oct 2019 at 02:28, Vedant Kumar via Phabricator via
>> llvm-commits <llvm-commits at lists.llvm.org> wrote:
>>> 
>>> This revision was automatically updated to reflect the committed changes.
>>> Closed by commit rG852e3b207651: [llvm-profdata] Make "malformed-ptr-to-counter-array.test" textual (authored by vsk).
>>> 
>>> Repository:
>>> rG LLVM Github Monorepo
>>> 
>>> CHANGES SINCE LAST ACTION
>>> https://reviews.llvm.org/D68718/new/
>>> 
>>> https://reviews.llvm.org/D68718
>>> 
>>> Files:
>>> llvm/test/tools/llvm-profdata/Inputs/malformed-ptr-to-counter-array.profraw
>>> llvm/test/tools/llvm-profdata/malformed-ptr-to-counter-array.test
>>> 
>>> 
>>> Index: llvm/test/tools/llvm-profdata/malformed-ptr-to-counter-array.test
>>> ===================================================================
>>> --- llvm/test/tools/llvm-profdata/malformed-ptr-to-counter-array.test
>>> +++ llvm/test/tools/llvm-profdata/malformed-ptr-to-counter-array.test
>>> @@ -1,5 +1,50 @@
>>> -REQUIRES: zlib
>>> +// Header
>>> +//
>>> +// INSTR_PROF_RAW_HEADER(uint64_t, Magic, __llvm_profile_get_magic())
>>> +// INSTR_PROF_RAW_HEADER(uint64_t, Version, __llvm_profile_get_version())
>>> +// INSTR_PROF_RAW_HEADER(uint64_t, DataSize, DataSize)
>>> +// INSTR_PROF_RAW_HEADER(uint64_t, CountersSize, CountersSize)
>>> +// INSTR_PROF_RAW_HEADER(uint64_t, NamesSize,  NamesSize)
>>> +// INSTR_PROF_RAW_HEADER(uint64_t, CountersDelta, (uintptr_t)CountersBegin)
>>> +// INSTR_PROF_RAW_HEADER(uint64_t, NamesDelta, (uintptr_t)NamesBegin)
>>> +// INSTR_PROF_RAW_HEADER(uint64_t, ValueKindLast, IPVK_Last)
>>> 
>>> -RUN: not llvm-profdata merge -o /dev/null %p/Inputs/malformed-ptr-to-counter-array.profraw 2>&1 | FileCheck %s
>>> +RUN: printf '\201rforpl\377' > %t.profraw
>>> +RUN: printf '\4\0\0\0\0\0\0\0' >> %t.profraw
>>> +RUN: printf '\1\0\0\0\0\0\0\0' >> %t.profraw
>>> +RUN: printf '\2\0\0\0\0\0\0\0' >> %t.profraw
>>> +RUN: printf '\10\0\0\0\0\0\0\0' >> %t.profraw
>>> +RUN: printf '\0\0\6\0\1\0\0\0' >> %t.profraw
>>> +RUN: printf '\0\0\6\0\2\0\0\0' >> %t.profraw
>>> +RUN: printf '\0\0\0\0\0\0\0\0' >> %t.profraw
>>> +
>>> +// Data Section
>>> +//
>>> +// struct ProfData {
>>> +// #define INSTR_PROF_DATA(Type, LLVMType, Name, Initializer) \
>>> +//    Type Name;
>>> +// #include "llvm/ProfileData/InstrProfData.inc"
>>> +// };
>>> +
>>> +RUN: printf '\067\265\035\031\112\165\023\344' >> %t.profraw
>>> +RUN: printf '\02\0\0\0\0\0\0\0' >> %t.profraw
>>> +
>>> +// Note: The CounterPtr here is off-by-one. This should trigger a malformed profile error.
>>> +RUN: printf '\0\0\6\0\1\0\0\1' >> %t.profraw
>>> +
>>> +RUN: printf '\0\0\0\0\0\0\0\0' >> %t.profraw
>>> +RUN: printf '\0\0\0\0\0\0\0\0' >> %t.profraw
>>> +RUN: printf '\02\0\0\0\0\0\0\0' >> %t.profraw
>>> +
>>> +// Counter Section
>>> +
>>> +RUN: printf '\067\0\0\0\0\0\0\0' >> %t.profraw
>>> +RUN: printf '\101\0\0\0\0\0\0\0' >> %t.profraw
>>> +
>>> +// Name Section
>>> +
>>> +RUN: printf '\3\0bar\0\0\0' >> %t.profraw
>>> +
>>> +RUN: not llvm-profdata merge -o /dev/null %t.profraw 2>&1 | FileCheck %s
>>> 
>>> CHECK: Malformed instrumentation profile data
>>> 
>>> 
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at lists.llvm.org
>>> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list