Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3817761pxj; Mon, 24 May 2021 15:58:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwq7cudhGlrzKlFg9jLZY6aZqRVcukfn668TvixkyDM8ZA9ZW7Jr8n2+4Ymr/wM6l3UvvLn X-Received: by 2002:a05:6e02:8e3:: with SMTP id n3mr17914801ilt.115.1621897083678; Mon, 24 May 2021 15:58:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621897083; cv=none; d=google.com; s=arc-20160816; b=xlpmZhdjPOdO+z4HCCzIdSRHD9ekqkvx+7zI1hdkra9mO/971qt7it857+BGlH7LHr 87A5j1SO21xQThYnGd91l/U60fKnPxILcjoegtV9KxIBEAjsHMwtaP7x8EB5KGGykOJX TZd0wqUVQ1Zrj7tEL7b8aDwdBa0PpurtAGhRL8Ds3PnGicLKa2qyrIZ2KhEmYVd9nHVP EGH5KTpHwtGLA+CJJumBXgtCAwd/P8itUYjKS0NNKTsBUxV2j9/HUgoSjuU6XhtpHa0s Qbs89nQVli9Za61iVf8lzszfzkPBX18XXEGEqiYOQTvIK4J1wIeN1S2xXSlESeztQvRM u8rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=5cEafhBeggulCP4tVLid/0r5rCTxCDN0pAzRDdwpl0k=; b=BZFgioJRZiAdL0NIcgIvmnG7Dp12Mhwb4VRcUyu0vMAJagSI6sIvZ3Z0CZvnpDR6Qa YKj/ZWOoMYvxZv0jtyFsMXvZzmfDc0cBYTQwcC3/L9ZfBWSUkEMnqMLW1d0NuTVmL/9V 5h/BF/s6Emh9/xsvZjO1pWqr8kjNUhlun+xrgAXfpA/DavQtOO++LXV4v1BW+6KPP0m1 tS2VABEc/rMjdnQJblDARMMxuDFWI2TVEymijsF7jZqnNSlcd21kM+U5mKKM7zf4FiA2 Y2TZ5FH4ZdGrHKAUuKTdrXo2s4D9+mJ85uwzZdWR1Rbim1e4/SYkSjEF13hRlQioA40V /2Ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=rWYQ9s+s; 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 q15si16518061jaj.2.2021.05.24.15.57.50; Mon, 24 May 2021 15:58:03 -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=rWYQ9s+s; 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 S229554AbhEXW6J (ORCPT + 99 others); Mon, 24 May 2021 18:58:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229503AbhEXW6G (ORCPT ); Mon, 24 May 2021 18:58:06 -0400 Received: from mail-io1-xd34.google.com (mail-io1-xd34.google.com [IPv6:2607:f8b0:4864:20::d34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A95B4C061574 for ; Mon, 24 May 2021 15:56:37 -0700 (PDT) Received: by mail-io1-xd34.google.com with SMTP id k22so5025114ioa.9 for ; Mon, 24 May 2021 15:56:37 -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=5cEafhBeggulCP4tVLid/0r5rCTxCDN0pAzRDdwpl0k=; b=rWYQ9s+sV0six3LsJ6FgGyEeC6A1jiy6gd0LOpZINvn3FFwju16v3Mpn6YIv+bSjkD oWc5qQwy0vcGx5szl0m7jN/7KSx50yeCjWoj0TKemqAUB5tc8CxtLm89gQhy1SE2drCl qeb2vLJgNdxM5KfXnZX6gc18n32R6ElqO8bn3EhBZoqpu9x8jAcLjUbKoCCp5GecLVf1 KnCfTsR3FGp5qgMJ4lKMbz3t+PaZs8nbOhqPBco3w5Lv5kaQf+wDOF6oJgDvSrI1LT7T /jYxsm/vG4A34h6PpfOIShQ66pinC9qlaRsKhraKU7NiuFa0RaVWsvnExAE+VPgc3EF5 7lsg== 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=5cEafhBeggulCP4tVLid/0r5rCTxCDN0pAzRDdwpl0k=; b=BnWqDDHnmShzyFLXljMv2sK1x1IYDVhZFWXy94+SE1Xo0CATscYDn4e8aScQdQW3aK EShSMu/D3T3oL/p41PWQMcFtKuGtB0khwSWChuvcgcpKuGCIQzdjXHXyOnjAoOBDIzD8 gGAQBsQE4/FL+yQuLAyAd0bLOXYygoJnYCdZ4ecN6xZFxEgjtRfVG1qkZhXFeJb5nZ9k +oIocYTIt+wO3Qs8MDXIa/KshWoOT9Uiac/hg1coR+rOXOyHzoQRLiEZeG/SwbC/CeEP PictVCe93goMY99JNlfhvLwW88uUm8FTjbMQwX3pKmQ0nd9RBcgosWTjMw0ZEqVl9nH8 3rRw== X-Gm-Message-State: AOAM533y8c9FJr+Sy+1A1xdSUMSheVS5UtVyJxiTA7x3YVjlY7FTz+FB m/7LcPpT8J6BhJ8bx/VkmuSXzofWzERp0R8wol+aaOIUP8l1LQ== X-Received: by 2002:a6b:7714:: with SMTP id n20mr16097968iom.126.1621896996837; Mon, 24 May 2021 15:56:36 -0700 (PDT) MIME-Version: 1.0 References: <20210523001806.3927609-1-tpiepho@gmail.com> In-Reply-To: From: Daniel Latypov Date: Mon, 24 May 2021 15:56:25 -0700 Message-ID: Subject: Re: [PATCH] lib/math/rational.c: Fix divide by zero To: Randy Dunlap Cc: Andy Shevchenko , Trent Piepho , Linux Kernel Mailing List , andy@kernel.org, Andrew Morton , Oskar Schirmer , Yiyuan Guo Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 24, 2021 at 3:04 PM Randy Dunlap wrote: > > On 5/24/21 9:55 AM, Daniel Latypov wrote: > > diff --git a/lib/math/Kconfig b/lib/math/Kconfig > > index f19bc9734fa7..20460b567493 100644 > > --- a/lib/math/Kconfig > > +++ b/lib/math/Kconfig > > @@ -15,3 +15,14 @@ config PRIME_NUMBERS > > > > config RATIONAL > > bool > > + > > +config RATIONAL_KUNIT_TEST > > + tristate "KUnit test for rational number support" if !KUNIT_ALL_TESTS > > + # depends on KUNIT && RATIONAL # this is how it should work, but > > + depends on KUNIT > > + select RATIONAL # I don't grok kconfig enough to know why this > > Only to set the symbol CONFIG_RATIONAL. > Then when 'make' descends into the lib/math/ subdir and looks at its Makefile, > it will decide to build the binary rational.o. > > obj-$(CONFIG_RATIONAL) += rational.o > Ack, I understand that much. My confusion is why this doesn't work: $ ./tools/testing/kunit/kunit.py run --kunitconfig /dev/stdin < .kunit/.config $ make ARCH=um olddefconfig O=.kunit $ grep RATIONAL .kunit/.config I'm not versed in Kconfig enough to know why CONFIG_RATIONAL=y is getting removed. > > > is necessary > > + default KUNIT_ALL_TESTS > > + help > > + This builds unit tests for the rational number support. > > + > > + If unsure, say N. > > > -- > ~Randy >