Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp590090rwb; Thu, 27 Jul 2023 18:31:43 -0700 (PDT) X-Google-Smtp-Source: APBJJlFj4C2AA65cVVKndwz3ZunlF582pzp1JaE10Or2hvSbY46xTHAUOin7VIMACGm0fQ8if5Qn X-Received: by 2002:a05:6402:10c1:b0:522:200f:cc50 with SMTP id p1-20020a05640210c100b00522200fcc50mr673534edu.19.1690507902969; Thu, 27 Jul 2023 18:31:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690507902; cv=none; d=google.com; s=arc-20160816; b=fIm+xfhywLCMjuaUZ8B62hrrZ4LXA11r0jHB30Lk2MgmBK1YILLb2bAMSelKw5WHHJ hOOEyWr449SiM90bl/mVCsmqVDksCTs/j2Xf8T8k4drHyZ8pefFPVP3jOAvU2h167P++ 6I8OK6TU9Nnjg6vi0GGrILD3/kk7t5aVgxXEVboZ8bmRxq/CVnGgUTc3QpfJ5MtkoNHX 4LAAvDG+xGT5hJ+lXtIMs9PU62cgfGmKPPruq3i92Da0bTgpxukRdsagDiP9KNP15cSl wRi9AkYm7Gtzn0gmb1sypQ+Mwux7NApu+XplFotFODrr9tTkflZgTvBAB3r4P0+q4YZb NyUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=s/aJ9ksmeVttXwGKwUVAJi8p79DGJB0zVa/mu7nUe/g=; fh=Ywl1b8QkAxvdqhocg99l72SF70XaNtPHw2Gs3EdCKc0=; b=f4v9KoJYKjpDONnCeuYLCd5H0Z4HOrGgGwhCKPN+kvKyAZfpCf3j6JtImAhiwDY0tX mg8epHlN3wmdgyCjaeXjNnaghzTgh5PUo83cC725k4DHD0lUtCOW6LH9jYvu/PgLnsM/ OzasSZSUEDexTsFUl2NNQn1Ei0cSdrh78jI0DH9QVC6v4tSEWrwsRvJgELPY7Pe/pfvM j/z0pEI33WZMb3mV63gNXjpuno7BS7WujA3O4Q+mKPItYOUl4E5L+63cmL9Irg7clhlj tzBF+sgxs0rFYrmau5L+VQANnI+hJXPjcejapdE9a+Yc1nMYuymL0NpjwFLIRBShPJK4 3GjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=arbI1npl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n13-20020a05640206cd00b00521820ef027si1782440edy.210.2023.07.27.18.31.17; Thu, 27 Jul 2023 18:31:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=arbI1npl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231959AbjG1AoE (ORCPT + 99 others); Thu, 27 Jul 2023 20:44:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232495AbjG1AoB (ORCPT ); Thu, 27 Jul 2023 20:44:01 -0400 Received: from mail-il1-x129.google.com (mail-il1-x129.google.com [IPv6:2607:f8b0:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A5B035AB for ; Thu, 27 Jul 2023 17:43:53 -0700 (PDT) Received: by mail-il1-x129.google.com with SMTP id e9e14a558f8ab-348de7bc865so963225ab.0 for ; Thu, 27 Jul 2023 17:43:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1690505032; x=1691109832; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=s/aJ9ksmeVttXwGKwUVAJi8p79DGJB0zVa/mu7nUe/g=; b=arbI1nple3pEZAfWdlLMRZfRSr+OZ67LXd6z/b2gt4LbN37fvQgaP9XQwqxKJBSgE3 hzhmxZkSnXVRLJHfKccq3tDsK03dmoanQxj8VlhBZneW6edBniqML4RUffXiwCxOQCWv HYKAv3b9AUgVD9Gh7ex2kWFPd43Y6a+PRp6AU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690505032; x=1691109832; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=s/aJ9ksmeVttXwGKwUVAJi8p79DGJB0zVa/mu7nUe/g=; b=ZCWoDXG2czcE/OgC1TmK5r19pvnNJiXFiEqjvVvaUZUpfBMPPQ3zoRG0oQT8Lg0fFJ xJOtXjB5pph+DNIYgVKO9VINCBSoo8/v1ia5cQY4gEknjqhc7GAPoAJZ48oLxBRrs3/p q7nPvpFULT043QKYTRFwelXHC8cG25MIWVc2GonB9bQCv6/jtDoC7d0LBBDEruAOqAxo f9t2HRwH10D17eqKJCo05/9+0VM76zMjYZxi8VZV4SUj9MWxxGstJf9qBxdTM4WfvSuo 7XNLROvvjapFQABeT2NrK/HT5lzxUdbRrGeq0GY9hQ30bdJYPvAfo0md7eXDevL67xp2 IweA== X-Gm-Message-State: ABy/qLa5Zdn5HHmWcsNSwSD23/8RXPGnJZ9qiPrBkVd2KCSAQZEtR0+a X5qO6kyOUlne316aqghmCm05ig== X-Received: by 2002:a05:6602:1694:b0:780:cb36:6f24 with SMTP id s20-20020a056602169400b00780cb366f24mr1268855iow.2.1690505032517; Thu, 27 Jul 2023 17:43:52 -0700 (PDT) Received: from [192.168.1.128] ([38.15.45.1]) by smtp.gmail.com with ESMTPSA id g22-20020a056602249600b0077e3acd5ea1sm762425ioe.53.2023.07.27.17.43.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 27 Jul 2023 17:43:52 -0700 (PDT) Message-ID: <799d6088-e28f-f386-6a00-2291304171a2@linuxfoundation.org> Date: Thu, 27 Jul 2023 18:43:51 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: selftests: connector: proc_filter.c:48:20: error: invalid application of 'sizeof' to an incomplete type 'struct proc_input' To: Anjali Kulkarni , Naresh Kamboju Cc: "open list:KERNEL SELFTEST FRAMEWORK" , open list , "lkft-triage@lists.linaro.org" , Netdev , clang-built-linux , Shuah Khan , Anders Roxell , "David S. Miller" , Liam Howlett , Shuah Khan References: Content-Language: en-US From: Shuah Khan In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/27/23 11:34, Anjali Kulkarni wrote: > > >> On Jul 25, 2023, at 9:48 AM, Anjali Kulkarni wrote: >> >> >> >>> On Jul 25, 2023, at 6:05 AM, Naresh Kamboju wrote: >>> >>> selftests: connector: proc_filter build failed with clang-16 due to below >>> warnings / errors on Linux next-20230725. >>> >>> Reported-by: Linux Kernel Functional Testing >>> >>> clang --target=aarch64-linux-gnu -fintegrated-as >>> -Werror=unknown-warning-option -Werror=ignored-optimization-argument >>> -Werror=option-ignored -Werror=unused-command-line-argument >>> --target=aarch64-linux-gnu -fintegrated-as -Wall proc_filter.c -o >>> /home/tuxbuild/.cache/tuxmake/builds/1/build/kselftest/connector/proc_filter >>> proc_filter.c:42:12: error: invalid application of 'sizeof' to an >>> incomplete type 'struct proc_input' >>> char buff[NL_MESSAGE_SIZE]; >>> ^~~~~~~~~~~~~~~ >>> proc_filter.c:22:5: note: expanded from macro 'NL_MESSAGE_SIZE' >>> sizeof(struct proc_input)) >>> ^ ~~~~~~~~~~~~~~~~~~~ >>> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >>> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >>> sizeof(struct proc_input)) >>> ^ >>> proc_filter.c:48:20: error: invalid application of 'sizeof' to an >>> incomplete type 'struct proc_input' >>> hdr->nlmsg_len = NL_MESSAGE_SIZE; >>> ^~~~~~~~~~~~~~~ >>> proc_filter.c:22:5: note: expanded from macro 'NL_MESSAGE_SIZE' >>> sizeof(struct proc_input)) >>> ^ ~~~~~~~~~~~~~~~~~~~ >>> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >>> char buff[NL_MESSAGE_SIZE]; >>> ^ >>> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >>> sizeof(struct proc_input)) >>> ^ >>> proc_filter.c:64:14: error: invalid application of 'sizeof' to an >>> incomplete type 'struct proc_input' >>> msg->len = sizeof(struct proc_input); >>> ^ ~~~~~~~~~~~~~~~~~~~ >>> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >>> char buff[NL_MESSAGE_SIZE]; >>> ^ >>> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >>> sizeof(struct proc_input)) >>> ^ >>> proc_filter.c:65:35: error: incomplete definition of type 'struct proc_input' >>> ((struct proc_input *)msg->data)->mcast_op = >>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ >>> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >>> char buff[NL_MESSAGE_SIZE]; >>> ^ >>> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >>> sizeof(struct proc_input)) >>> ^ >>> proc_filter.c:66:31: error: incomplete definition of type 'struct proc_input' >>> ((struct proc_input *)pinp)->mcast_op; >>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~^ >>> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >>> char buff[NL_MESSAGE_SIZE]; >>> ^ >>> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >>> sizeof(struct proc_input)) >>> ^ >>> proc_filter.c:67:35: error: incomplete definition of type 'struct proc_input' >>> ((struct proc_input *)msg->data)->event_type = >>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ >>> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >>> char buff[NL_MESSAGE_SIZE]; >>> ^ >>> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >>> sizeof(struct proc_input)) >>> ^ >>> proc_filter.c:68:31: error: incomplete definition of type 'struct proc_input' >>> ((struct proc_input *)pinp)->event_type; >>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~^ >>> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >>> char buff[NL_MESSAGE_SIZE]; >>> ^ >>> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >>> sizeof(struct proc_input)) >>> ^ >>> proc_filter.c:245:20: error: variable has incomplete type 'struct proc_input' >>> struct proc_input input; >>> ^ >>> proc_filter.c:245:9: note: forward declaration of 'struct proc_input' >>> struct proc_input input; >>> ^ >>> proc_filter.c:264:22: error: use of undeclared identifier >>> 'PROC_EVENT_NONZERO_EXIT' >>> input.event_type = PROC_EVENT_NONZERO_EXIT; >>> ^ >>> 9 errors generated. >>> make[4]: Leaving directory '/builds/linux/tools/testing/selftests/connector’ >>> >>> >> These are expected since you need to have the changes in kernel that were committed with this patch to be installed on the kernel on which this is being compiled/run on. That is what the test is for, and the check to make it run on previous kernels as well was made a runtime check. Do you expect this to compile on a kernel without the corresponding kernel changes that were committed with this patch? >> >> Anjali > > Gentle ping - could you answer above questions? >> I am seeing the same on linux-next next-20230727 PROC_EVENT_NONZERO_EXIT is defined and NL_MESSAGE_SIZE Anjali, What are the dependent commits and should they be in next? Shouldn't this test patch go with the kernel patches it depends on? Can you do some testing on next and let me know why this test is failing to build? It is failing for me for sure. There could be problem in the test Makefile that it isn't including the right headers. thanks, -- Shuah thanks, -- Shuah