Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp159418ybt; Fri, 12 Jun 2020 23:59:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxtxwC03dQrzVhIjgIsiRrEMtxqcBQ5D6E1P9J0nn7dvZn2hzSmO6e6fkOMGQsJAYLDtPXj X-Received: by 2002:a05:6402:3044:: with SMTP id bu4mr15068003edb.69.1592031562676; Fri, 12 Jun 2020 23:59:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592031562; cv=none; d=google.com; s=arc-20160816; b=Ya/K4rnFSifADG9yvAzBXbPXmRNoM+8W6gkmlE44FT765keLmmIoEImnA3bEcC7JCf BPMkev91zsy286RX97j7gVP7R9BWKVg0XXFY910+tF0F0QFN/uzMofSDFbpn8EcuWWDX Rk0BsQKoyRhclZ7WbvoL+gE9MsWZGuhTRrTGH9c/ftC7vbOYg4WJOEdLygqBOns4GxG5 HMSZ+x6AvrrpGtL5LWwM+3EfxbFwFliZuiO4sUW+OzpqVfPOgH+TIliT7WAVmQd5T3xi wdjZbnM/YaBwnPNzoT2AJ1tysFVkPmSqZJFnVrv9iMiDJRfALYAqiH7CxgORBEOiPLzj IulA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=OFFZRUuwZyciolFutHUZy+k3hDO5IWFL+Mp7cEZTf1o=; b=e4q475tyqPYbk5Ig+XPn2g6r3Y+EGLfowwG6YYiRyeYAF6I0LCW1/iyj+A7Udqm9pq SlKvmRLx8kjri/eY6v9VvmzfaOnv0Y4HGy1x66KAVc6VQqDhX0sOjrMcOiaPMJXUs3QP b/b9QU9JnvAOxte+AFQ05L2YVqqmzQbKiw8QmHVnWn1m67VCITUPsoa/BSRkEdMXR5YK j1GYe6i70uCB9H1+WGFdI4yn8D7G/VEzGaR8ath/tBisDQwfuV+Bt+B0v9jEX+GSmiYR eiaZ3rhoCr5WG626Zdz50dc/wdYIJ4pSM+EdixE/BqVEHuJeL54MwXsWbqO+3rJOsKeK YQPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=TtPuXKAe; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dm27si5128750edb.308.2020.06.12.23.59.00; Fri, 12 Jun 2020 23:59:22 -0700 (PDT) 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=@google.com header.s=20161025 header.b=TtPuXKAe; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726475AbgFMG46 (ORCPT + 99 others); Sat, 13 Jun 2020 02:56:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725783AbgFMG45 (ORCPT ); Sat, 13 Jun 2020 02:56:57 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCF48C03E96F for ; Fri, 12 Jun 2020 23:56:56 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id l26so9791150wme.3 for ; Fri, 12 Jun 2020 23:56:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=OFFZRUuwZyciolFutHUZy+k3hDO5IWFL+Mp7cEZTf1o=; b=TtPuXKAeBC4b7WRt8j5QlCvQ7mq3sQssnKqhuC8v1kjpfVTco+fsFkYswB9EdOATuX CAQ5eTEC7dTFj4dGzRkx4QX92FcQ0ZmMwQ220MlEnm5nXRwUf+c81iouibty9uX7iwSb AbCQ2Helzyo7TWlXliHGkSoX7ihF28qag1IFHomseE8hakNgDCZ9J5UC7O/UDdbN7WoL F/iLQGDVivhvyJx1U2pC9TkEvQbdby8dDNiuw6jiuPX7eaoDMfVR2PAE6hkkaVOBHVT9 2NlNf2m5ByPos85L+6pKsBDYOdx/6fo+sDHHeeq5V9EGuw1pwoWtLAdt13n1wTRsWccC Fnvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OFFZRUuwZyciolFutHUZy+k3hDO5IWFL+Mp7cEZTf1o=; b=WZht1fRQlJHhXfCea177RfpWzVuJS0eBQgW2yxVosT4A4iLYqFaEuOXIzOv+HVBEdy mLNvWzeGjkkPZ/4p0zfryLdl9thmw3Fm1A6iDPqwFtb/Mw8xYPycxEoRRMLYCMY0/oSo PYhTNOqKNB+0LY85h21qPqIexkuZLybkwwIPE5DRe7BcQEVlg4Gd2Pdz4WM7wsHRdTKa 6X7HVcmKQ9UvTqJrQvSQGz4/SEfMs+0rHDKQnyDW3JUAPNSiYDAwFlvzTol2Lnr9ubVf OpdRkBqKvMHrXtnjv2brlCB24+RFqeaHFelMPiekqbim8cetgK4hnV5rYBJGjETFjHlb gvjQ== X-Gm-Message-State: AOAM532Ya0XbPwfue/EYe0ElLhVtBPUwmwOfV0jm6dN6wmVjm05yGPsG C3KcKeed6lRY6uujbOuMHy1l4Xmz67xEb2gj1nhjBg== X-Received: by 2002:a1c:a444:: with SMTP id n65mr2429963wme.99.1592031415287; Fri, 12 Jun 2020 23:56:55 -0700 (PDT) MIME-Version: 1.0 References: <20200611215501.213058-1-vitor@massaru.org> In-Reply-To: <20200611215501.213058-1-vitor@massaru.org> From: David Gow Date: Sat, 13 Jun 2020 14:56:43 +0800 Message-ID: Subject: Re: [PATCH] lib: kunit_test_overflow: add KUnit test of check_*_overflow functions To: Vitor Massaru Iha Cc: KUnit Development , Shuah Khan , "open list:KERNEL SELFTEST FRAMEWORK" , Linux Kernel Mailing List , Brendan Higgins , linux-kernel-mentees@lists.linuxfoundation.org, Kees Cook , linux@rasmusvillemoes.dk Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 12, 2020 at 5:55 AM Vitor Massaru Iha wrote: > > This adds the convertion of the runtime tests of check_*_overflow fuctions, > from `lib/test_overflow.c`to KUnit tests. Nit: couple of minor typos here: convertion -> conversion, and functions -> functions > The log similar to the one seen in dmesg running test_overflow can be > seen in `test.log`. > > Signed-off-by: Vitor Massaru Iha I've tested that this builds and runs on my system, and it all seems to be working fine! Tested-by: David Gow > --- > lib/Kconfig.debug | 17 ++ > lib/Makefile | 1 + > lib/kunit_overflow_test.c | 590 ++++++++++++++++++++++++++++++++++++++ > 3 files changed, 608 insertions(+) > create mode 100644 lib/kunit_overflow_test.c Echoing what Brendan and Kees mentioned, it'd be nicer to have this replace the existing test, both because there's no need for redundant tests (one will get out-of-date), and so that we can have a nice diff showing the changes made as part of the conversion. Cheers, -- David