]> granicus.if.org Git - strace/commitdiff
tests: robustify bpf-obj_get_info_by_fd test against future kernels
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 21 May 2019 23:30:35 +0000 (23:30 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 21 May 2019 23:30:35 +0000 (23:30 +0000)
* tests/bpf-obj_get_info_by_fd.c (print_prog_load, main): Change
log_level from 42 to 7, to placate Linux kernels containing commit
v5.2-rc1~133^2~193^2~18^2~9.

tests/bpf-obj_get_info_by_fd.c

index 243a62a092c1f1dedeb252fc598c70f37e39c0d4..3e18591d3c300ab995c704ae63520a950e1abe2e 100644 (file)
@@ -180,7 +180,7 @@ print_prog_load(void *attr_void, size_t size, long rc)
        if (size > offsetof(struct BPF_PROG_LOAD_struct, license))
                printf(", license=\"BSD\"");
        if (size > offsetof(struct BPF_PROG_LOAD_struct, log_buf))
-               printf(", log_level=42, log_size=%zu, log_buf=\"\"",
+               printf(", log_level=7, log_size=%zu, log_buf=\"\"",
                       sizeof(log_buf));
        if (size > offsetof(struct BPF_PROG_LOAD_struct, kern_version))
                printf(", kern_version=KERNEL_VERSION(57005, 192, 222)");
@@ -253,7 +253,7 @@ main(void)
                .insn_cnt     = ARRAY_SIZE(socket_prog),
                .insns        = (uintptr_t) socket_prog,
                .license      = (uintptr_t) license,
-               .log_level    = 42,
+               .log_level    = 7,
                .log_size     = sizeof(log_buf),
                .log_buf      = (uintptr_t) log_buf,
                .kern_version = 0xdeadc0de,