Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3916635pxb; Mon, 8 Feb 2021 03:31:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJw/qfUfydhzSrT8y5vhy8GfB3v93Yd+LreqQo4JIgRLqYDHSyBgDhmrbO4cHyWrHw3dlCaY X-Received: by 2002:a17:906:19cf:: with SMTP id h15mr16676745ejd.167.1612783878865; Mon, 08 Feb 2021 03:31:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612783878; cv=none; d=google.com; s=arc-20160816; b=QD/2v695Y/vxiWKQTgCdK1XBGdrrnFaO/56T7iAz8Wgo7vvQWcJU/vQ43YvDkBGNL1 v2OyI2aeixW0OLsnefDCB/yoPlyjA0lyRuSW10ye1hhSHKOfOTUfZ8qP3FHjbhPwKFiB 11J36r2k9fcVrbilbPOpbPV0TJuc1AAvDCAaC/bvBd9JEHZzr3Ovr9nOyfHX6Il7VNcU gkTfcJeOTCTW9KuzzKXMuunXD7wFdjQOTCgmor1k02zrqlYK5UAFYPmJXYyKi9IeMJeV oauA7EVr8t0u2JE/zjXqQn2h5LVj+H6Z19lvCJGIcOZL5Pclx37hD1W6Yd6vTtUK4j7i aZjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=nvwahBSZXplQiMBwEr0U7duRvv9FAMET36RKzGB3kl8=; b=gAHO5YqMwXG6Um4rhb1okPpTYvYKLlBa1COtmyl68SEAkx2AAFqTSSENnG1hRHSj2B cG6sUzZVXfTCqYLtXz+yXxvuZacKx4hsjG2v2KnhpeolRrxcG8NYG26OssGFWxoTelES rKivGnUwBEugLyc9CSqgJv655QLuyjuxT97mTZfRh4uLcyZxBjwIY07gvyjvglv3plcC xQQbY/c9ydE9bfS5nSceuaKmiiNgDNAwtx5fX7xtGZsmmtIGPU9QhcmOCYe+ZhFB15eF V9E8fUXW4t7AtoCdGGMJ+xQLsNzpmED4NngVmW7qb86ZxcPfirXfHcbz0EJVV/g45sjx o5ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=hiaVjMO4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ku7si2921433ejc.143.2021.02.08.03.30.55; Mon, 08 Feb 2021 03:31:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=hiaVjMO4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233344AbhBHL2M (ORCPT + 99 others); Mon, 8 Feb 2021 06:28:12 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:50558 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232525AbhBHLNe (ORCPT ); Mon, 8 Feb 2021 06:13:34 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 118BAbgI025685; Mon, 8 Feb 2021 11:12:36 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2020-01-29; bh=nvwahBSZXplQiMBwEr0U7duRvv9FAMET36RKzGB3kl8=; b=hiaVjMO43NnXDNgfE+kyJm9RWLNV++FYHnCUmZLJg9rYnpTJrCvPK2+7LutsxjtDKSOU DHlOGLkO4CBHCIn1Wp5ea3LvlpGpdf/Ce36+DA/LWiaG0tU63RybVuDxVTyF2EyYOeDo a3s0R6HzrdC/ujajhW07E96vewvfWmfqXC/5JA22S+r7O11duMK+hErV1haQLrtAG7e3 HRHa4yiWiGH/oKbvGtRMCguo1TUk32toTJ7AUeDtC1uGn+q7n8T9sPYeM2b3J7kqiF6e /mp5e15AtQPEp7sGbuuF3v/KXglMLz70I8PePiLZjDSCUduwL5yX7v4U7tvi5iU6g86a iA== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2130.oracle.com with ESMTP id 36hjhqkhqy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 08 Feb 2021 11:12:35 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 118BBJc1131794; Mon, 8 Feb 2021 11:12:34 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3020.oracle.com with ESMTP id 36j50ymusx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 08 Feb 2021 11:12:34 +0000 Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 118BCWRl014609; Mon, 8 Feb 2021 11:12:32 GMT Received: from kadam (/102.36.221.92) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 08 Feb 2021 03:12:31 -0800 Date: Mon, 8 Feb 2021 14:12:23 +0300 From: Dan Carpenter To: Daniel Latypov Cc: kbuild@lists.01.org, Brendan Higgins , David Gow , lkp@intel.com, kbuild-all@lists.01.org, Linux Kernel Mailing List , "open list:KERNEL SELFTEST FRAMEWORK" , Shuah Khan Subject: Re: [PATCH 1/3] kunit: add kunit.filter_glob cmdline option to filter suites Message-ID: <20210208111223.GK20820@kadam> References: <20210203234116.839819-2-dlatypov@google.com> <20210204071100.GB2696@kadam> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-IMR: 1 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9888 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 bulkscore=0 adultscore=0 mlxlogscore=999 phishscore=0 spamscore=0 suspectscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102080075 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9888 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 impostorscore=0 priorityscore=1501 bulkscore=0 suspectscore=0 mlxscore=0 phishscore=0 lowpriorityscore=0 mlxlogscore=999 clxscore=1015 spamscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102080075 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 04, 2021 at 09:30:43AM -0800, Daniel Latypov wrote: > On Wed, Feb 3, 2021 at 11:13 PM Dan Carpenter wrote: > > > > Hi Daniel, > > > > url: https://github.com/0day-ci/linux/commits/Daniel-Latypov/kunit-support-running-subsets-of-test-suites-from/20210204-074405 > > base: 88bb507a74ea7d75fa49edd421eaa710a7d80598 > > config: x86_64-randconfig-m001-20210202 (attached as .config) > > compiler: gcc-9 (Debian 9.3.0-15) 9.3.0 > > > > If you fix the issue, kindly add following tag as appropriate > > Reported-by: kernel test robot > > Reported-by: Dan Carpenter > > > > smatch warnings: > > lib/kunit/executor.c:110 kunit_run_all_tests() error: double free of 'suite_set.start' > > > > vim +110 lib/kunit/executor.c > > > > 8c0d884986ba22 Brendan Higgins 2020-08-04 96 int kunit_run_all_tests(void) > > aac35468ca20a3 Alan Maguire 2020-08-04 97 { > > aac35468ca20a3 Alan Maguire 2020-08-04 98 struct kunit_suite * const * const *suites; > > aac35468ca20a3 Alan Maguire 2020-08-04 99 > > d5554dd78a454b Daniel Latypov 2021-02-03 100 struct suite_set suite_set = kunit_filter_suites(); > > 45dcbb6f5ef78b Brendan Higgins 2020-08-04 101 > > d5554dd78a454b Daniel Latypov 2021-02-03 102 kunit_print_tap_header(&suite_set); > > d5554dd78a454b Daniel Latypov 2021-02-03 103 > > d5554dd78a454b Daniel Latypov 2021-02-03 104 for (suites = suite_set.start; suites < suite_set.end; suites++) > > aac35468ca20a3 Alan Maguire 2020-08-04 105 __kunit_test_suites_init(*suites); > > aac35468ca20a3 Alan Maguire 2020-08-04 106 > > d5554dd78a454b Daniel Latypov 2021-02-03 107 if (filter_glob) { /* a copy was made of each array */ > > d5554dd78a454b Daniel Latypov 2021-02-03 108 for (suites = suite_set.start; suites < suite_set.end; suites++) > > ^^^^^^^^^^^^^^^^^^^^^^^^ > > This will free "suite_set.start" will in the first iteration through the > > loop > > Ah, the loop is supposed to contain `kfree(*suites)`. > I'll fix the patch and resend. > > I'm not familiar with conventions but it feels like adding Reported-by > on the amended patch would almost imply the report suggested the need > for the ability to filter suites. > So I'll add an informal attribution in the cover letter. > > Thanks! These emails are autogenerated by the kbuild bot and I just look them over and hit forward. regards, dan carpenter