Blame SOURCES/0052-tests-robustify-bpf-obj_get_info_by_fd-test-against-.patch

b484ca
From c661605b520fa64b6fc042a642027c14ae9a62f9 Mon Sep 17 00:00:00 2001
b484ca
From: "Dmitry V. Levin" <ldv@altlinux.org>
b484ca
Date: Tue, 21 May 2019 23:30:35 +0000
b484ca
Subject: [PATCH] tests: robustify bpf-obj_get_info_by_fd test against future
b484ca
 kernels
b484ca
b484ca
* tests/bpf-obj_get_info_by_fd.c (print_prog_load, main): Change
b484ca
log_level from 42 to 7, to placate Linux kernels containing commit
b484ca
v5.2-rc1~133^2~193^2~18^2~9.
b484ca
---
b484ca
 tests/bpf-obj_get_info_by_fd.c | 4 ++--
b484ca
 1 file changed, 2 insertions(+), 2 deletions(-)
b484ca
b484ca
Index: strace-4.24/tests/bpf-obj_get_info_by_fd.c
b484ca
===================================================================
b484ca
--- strace-4.24.orig/tests/bpf-obj_get_info_by_fd.c	2020-01-28 00:16:43.589035258 +0100
b484ca
+++ strace-4.24/tests/bpf-obj_get_info_by_fd.c	2020-01-28 01:49:32.228432719 +0100
b484ca
@@ -180,7 +180,7 @@
b484ca
 	if (size > offsetof(struct BPF_PROG_LOAD_struct, license))
b484ca
 		printf(", license=\"BSD\"");
b484ca
 	if (size > offsetof(struct BPF_PROG_LOAD_struct, log_buf))
b484ca
-		printf(", log_level=42, log_size=%zu, log_buf=\"\"",
b484ca
+		printf(", log_level=7, log_size=%zu, log_buf=\"\"",
b484ca
 		       sizeof(log_buf));
b484ca
 	if (size > offsetof(struct BPF_PROG_LOAD_struct, kern_version))
b484ca
 		printf(", kern_version=KERNEL_VERSION(57005, 192, 222)");
b484ca
@@ -239,7 +239,7 @@
b484ca
 		.insn_cnt     = ARRAY_SIZE(socket_prog),
b484ca
 		.insns        = (uintptr_t) socket_prog,
b484ca
 		.license      = (uintptr_t) license,
b484ca
-		.log_level    = 42,
b484ca
+		.log_level    = 7,
b484ca
 		.log_size     = sizeof(log_buf),
b484ca
 		.log_buf      = (uintptr_t) log_buf,
b484ca
 		.kern_version = 0xdeadc0de,
b484ca
Index: strace-4.24/tests-m32/bpf-obj_get_info_by_fd.c
b484ca
===================================================================
b484ca
--- strace-4.24.orig/tests-m32/bpf-obj_get_info_by_fd.c	2020-01-28 00:16:49.360980900 +0100
b484ca
+++ strace-4.24/tests-m32/bpf-obj_get_info_by_fd.c	2020-01-28 01:53:08.192398852 +0100
b484ca
@@ -180,7 +180,7 @@
b484ca
 	if (size > offsetof(struct BPF_PROG_LOAD_struct, license))
b484ca
 		printf(", license=\"BSD\"");
b484ca
 	if (size > offsetof(struct BPF_PROG_LOAD_struct, log_buf))
b484ca
-		printf(", log_level=42, log_size=%zu, log_buf=\"\"",
b484ca
+		printf(", log_level=7, log_size=%zu, log_buf=\"\"",
b484ca
 		       sizeof(log_buf));
b484ca
 	if (size > offsetof(struct BPF_PROG_LOAD_struct, kern_version))
b484ca
 		printf(", kern_version=KERNEL_VERSION(57005, 192, 222)");
b484ca
@@ -239,7 +239,7 @@
b484ca
 		.insn_cnt     = ARRAY_SIZE(socket_prog),
b484ca
 		.insns        = (uintptr_t) socket_prog,
b484ca
 		.license      = (uintptr_t) license,
b484ca
-		.log_level    = 42,
b484ca
+		.log_level    = 7,
b484ca
 		.log_size     = sizeof(log_buf),
b484ca
 		.log_buf      = (uintptr_t) log_buf,
b484ca
 		.kern_version = 0xdeadc0de,
b484ca
Index: strace-4.24/tests-mx32/bpf-obj_get_info_by_fd.c
b484ca
===================================================================
b484ca
--- strace-4.24.orig/tests-mx32/bpf-obj_get_info_by_fd.c	2020-01-28 00:16:51.902956961 +0100
b484ca
+++ strace-4.24/tests-mx32/bpf-obj_get_info_by_fd.c	2020-01-28 01:53:10.772374555 +0100
b484ca
@@ -180,7 +180,7 @@
b484ca
 	if (size > offsetof(struct BPF_PROG_LOAD_struct, license))
b484ca
 		printf(", license=\"BSD\"");
b484ca
 	if (size > offsetof(struct BPF_PROG_LOAD_struct, log_buf))
b484ca
-		printf(", log_level=42, log_size=%zu, log_buf=\"\"",
b484ca
+		printf(", log_level=7, log_size=%zu, log_buf=\"\"",
b484ca
 		       sizeof(log_buf));
b484ca
 	if (size > offsetof(struct BPF_PROG_LOAD_struct, kern_version))
b484ca
 		printf(", kern_version=KERNEL_VERSION(57005, 192, 222)");
b484ca
@@ -239,7 +239,7 @@
b484ca
 		.insn_cnt     = ARRAY_SIZE(socket_prog),
b484ca
 		.insns        = (uintptr_t) socket_prog,
b484ca
 		.license      = (uintptr_t) license,
b484ca
-		.log_level    = 42,
b484ca
+		.log_level    = 7,
b484ca
 		.log_size     = sizeof(log_buf),
b484ca
 		.log_buf      = (uintptr_t) log_buf,
b484ca
 		.kern_version = 0xdeadc0de,