> On Aug 26, 2019, at 3:47 PM, Alexei Starovoitov
> <alexei.starovoi...@gmail.com> wrote:
>
> On Sun, Aug 25, 2019 at 10:22:13PM -0700, Song Liu wrote:
>> On Fri, Aug 23, 2019 at 2:59 AM Alexei Starovoitov <a...@kernel.org> wrote:
>>>
>>> Use BPF_F_TEST_STATE_FREQ flag to check that precision
>>> tracking works as expected by comparing every step it takes.
>>>
>>> Signed-off-by: Alexei Starovoitov <a...@kernel.org>
>>>
>>> +static bool cmp_str_seq(const char *log, const char *exp)
>>
>> Maybe call it str_str_seq()?
>
> imo cmp*() returns the result of comparison.
> Which is either boolean or -1,0,1.
> Whereas str*() should return the address, index, or offset.
> Hence I used cmp_ prefix here.
Good point. I didn't think about this.
>
>>> static void do_test_single(struct bpf_test *test, bool unpriv,
>>> int *passes, int *errors)
>>> {
>>> @@ -897,14 +929,20 @@ static void do_test_single(struct bpf_test *test,
>>> bool unpriv,
>>> pflags |= BPF_F_STRICT_ALIGNMENT;
>>> if (test->flags & F_NEEDS_EFFICIENT_UNALIGNED_ACCESS)
>>> pflags |= BPF_F_ANY_ALIGNMENT;
>>> + if (test->flags & ~3)
>>> + pflags |= test->flags;
>> ^^^^^^ why do we need these two lines?
>
> To pass flags from test into attr.prog_flags.
> Older F_NEEDS_* and F_LOAD_* may use some cleanup and can be removed,
> but it would be a different patch.
Sounds good.
Acked-by: Song Liu <songliubrav...@fb.com>
Thanks!