From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-171.mta1.migadu.com (out-171.mta1.migadu.com [95.215.58.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BF5CB2E7653 for ; Thu, 5 Feb 2026 03:54:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770263659; cv=none; b=R1YqV1Mz4bQ5ut64m97uXIGsia6+akMWCUXt/bvYb8NflTNWYiqIZFBqYD1466Hn1JLlf2b7OPjcLoODEl0mKfR3SQvkH2qR1FPoVKTK9KmK4J5CKLnyMk7rUcgURiUkKXeBMIUOcfaBClIzfCKc687BZGIBy0pjRi+4xwKuqZU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770263659; c=relaxed/simple; bh=EDzbVnWsaolK7bt356IBQRQhbNq88nRcMZLD3NRKgL8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=FZnn+j5NCnJH29k4bHpavdrC6IiZWiz6vIBGYfLGm0fkl4SCK91jooRUiDeVt+cSBDhvrwnqUaEQ3hQwyhZTi+lP8rxLMmW09C10KDkja5L08CVgVZ81MmA8YuSkKomAXzex/Dnw4+exGmdgdOwqOGnFvSfbB9rZD0L9gy/pk58= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=O0oajHir; arc=none smtp.client-ip=95.215.58.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="O0oajHir" Message-ID: <11bb515b-35fd-44f3-9647-9c39580ce6a1@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1770263646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WaBtND/7awN/SSuV1JIN93DjuyLnhAQAfNp10RP53CE=; b=O0oajHirx1etMhbfwCKJrGOE8bwmUmdb4X597u7RlsJclcn7gJuARPqzcwX7aSdTm2B5YC 25T7e9FhSMldbXQfkD4D51woYU5DktFfZvv1z5oNWtAMEB9qo4Ncdg7RAUAkczsZ2W6AOQ Vr1jVBrkj4tdUziBJiou1YQpZFXle44= Date: Thu, 5 Feb 2026 11:53:40 +0800 Precedence: bulk X-Mailing-List: linux-api@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH bpf-next v9 9/9] selftests/bpf: Add tests to verify map create failure log Content-Language: en-US To: Alexei Starovoitov Cc: bpf , Alexei Starovoitov , Daniel Borkmann , John Fastabend , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Shuah Khan , Christian Brauner , Seth Forshee , Yuichiro Tsuji , Andrey Albershteyn , Willem de Bruijn , Jason Xing , Tao Chen , Mykyta Yatsenko , Kumar Kartikeya Dwivedi , Anton Protopopov , Amery Hung , Rong Tao , LKML , Linux API , "open list:KERNEL SELFTEST FRAMEWORK" , kernel-patches-bot@fb.com References: <20260202144046.30651-1-leon.hwang@linux.dev> <20260202144046.30651-10-leon.hwang@linux.dev> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Leon Hwang In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT On 5/2/26 04:14, Alexei Starovoitov wrote: > On Mon, Feb 2, 2026 at 6:43 AM Leon Hwang wrote: >> >> + >> +#define BPF_LOG_FIXED 8 >> + >> +static void test_map_create(enum bpf_map_type map_type, const char *map_name, >> + struct bpf_map_create_opts *opts, const char *exp_msg) >> +{ >> + const int key_size = 4, value_size = 4, max_entries = 1; >> + char log_buf[128]; >> + int fd; >> + LIBBPF_OPTS(bpf_log_opts, log_opts); >> + >> + log_buf[0] = '\0'; >> + log_opts.log_buf = log_buf; >> + log_opts.log_size = sizeof(log_buf); >> + log_opts.log_level = BPF_LOG_FIXED; > > Why? Which part of the test needs the log with this flag? BPF_LOG_FIXED looks odd here. This test sets 'log_level = BPF_LOG_FIXED' to match the behavior of bpf_vlog_init() as initialized by bpf_log_attr_create_vlog() in patch #7. BPF_LOG_FIXED is intended to be the default log_level there. Thanks, Leon