Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp61336ybh; Fri, 13 Mar 2020 17:04:00 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtFMg8Eh5Y8qEpFroZ8mhR3pqJ8QwWA0mngmGRLrOyWulhApNBXCoYaq8DEopTcOQwPSJST X-Received: by 2002:a9d:77d0:: with SMTP id w16mr13474695otl.66.1584144240066; Fri, 13 Mar 2020 17:04:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584144240; cv=none; d=google.com; s=arc-20160816; b=v5Fdk8/6Kt71cWqBUUwusfn2w/QS7rHgB6rmpBuRp4JBqyIT6bLqytdUK0nTGFBQgp TEl8NrULw+gCFxNfk9UfOeyRZXkRWUY2Pnk9j9C75UWSD2W0kvhGh2qCjk4uaLNA7R4G 7ft/ahdMQIqD8VDApElzhRpS0N11b0jeRuYVLu0g5vVZ92g8G3dDF4b1Oh99n126Ub1q d7r7/MdynOhWxg56ZexYPoyH2aQfAu7zJHXUjpjt0Cz1JFg/DdIWtbOH03MpuAyEpjJq 6ObGisrS+mD19sYxPnnxyd8kjMUcjQY33q2e2krMZbQQfYThVOh28cpZ7rYamclH8AU6 6EpQ== 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=1itqh9cc4kh0XmayEu5vKsKFU6ua5zUzS5gt0O5c6J0=; b=LTogweQ30SCtvVPoSpGBDXQGBodrwOYWFKYAFYtHBn4gGQOO9BBntyg/+Vk3CWRLmD ek9Lomt6YZsLeatRCJqltC71ABFrJbEsbrGV5nqGTEvLK2kRYMkOY2Gm0bql+4se83SA BatzWbictkNSlBytjaLRQcoGRmUhhA47v9gx+RENOYdHpmcXvLsTLVc7bX0MJk9YH/4Y +loPH8yn+gUB39S3IIUcQoD91VzBV+b1N62OIeASRev9b7KcqUfWL6N8pTBgZ+T/l/Mw 1EL57VGHIKWsnUHx3V4ZpMy8Y3BOAKsLrhks7d84nNcsqtHCqV2ScGKruz6p/tZro+RI 8WWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Ejxy5joI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id 71si5932318otm.111.2020.03.13.17.03.41; Fri, 13 Mar 2020 17:04:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Ejxy5joI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727618AbgCNADV (ORCPT + 99 others); Fri, 13 Mar 2020 20:03:21 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:32774 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726534AbgCNADV (ORCPT ); Fri, 13 Mar 2020 20:03:21 -0400 Received: by mail-pl1-f196.google.com with SMTP id ay11so5085591plb.0 for ; Fri, 13 Mar 2020 17:03:20 -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=1itqh9cc4kh0XmayEu5vKsKFU6ua5zUzS5gt0O5c6J0=; b=Ejxy5joItEd/+5sGbhoUHJ8XAwEfTSI0bZzwHp4wHGBwpcPPqqsq2++qFrDqLAae4Y /W9IRQZcLDhIDI+TQjMqPzbfsinuCNiEUL4GpZy/4PGlO8fDXkgiT+rh04nwySAdbgdD UkuZ36lP21XVB3QODVfE43DBWvuhyfVA7asrGUwYj903BZarex5nwAIQhJpkfLIvfzWy t3SalKNJlk+51HHfN66eQ+EZLU8qZwlsA6orv9aUKz37I8nxUf6H3rZnkdt+jQaZfApu rMg7cDdnoE9ABTQ5ljUQB6e9CrTE6NocR2mDp+nEByf2wn56bVP2rk+v/gX4ImpQVv+5 +pSA== 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=1itqh9cc4kh0XmayEu5vKsKFU6ua5zUzS5gt0O5c6J0=; b=fLDVfI0wP3no1w65gSy+EPfXh/Wx+PkWgBzGnRcBMRoYyjBFVzn7SLJb4QVBygTXll 7cO7fvbH7sRcyeQ2ss0GUvavv2fJqplfBTQnGlt4DDp4XtqJCnGAQOWx9nDjNEcquYtZ isyHL9chLn5ykfOnmXvphW8TWipIuE5Zfahg3mkNrdqowbmEOn+qg0WTx7kTaE8QOrAc qp/FaE7VwK62QhLQG99RFN+yZiwqwYf9xbko4K10z4kDM0aAhiCrdy/wP2tFbOY9TbcE uLYJMXpfZsC0bbDrGUHK3Ta19nCdzNz0gOG8N5F33FWi3eaEXsJNJ/l59+87c8bO7+G6 8+2Q== X-Gm-Message-State: ANhLgQ2kSr01hEBG1jkkmDVTUCPKLkYBRq4CZHygy/ck9cxvtDEEH7UI Xhh6pg66ObXxErx0RP9XRtTm0NhJ0QWH199b6Js3rw== X-Received: by 2002:a17:90a:a616:: with SMTP id c22mr12903657pjq.47.1584144199202; Fri, 13 Mar 2020 17:03:19 -0700 (PDT) MIME-Version: 1.0 References: <1584110682-3837-1-git-send-email-alan.maguire@oracle.com> In-Reply-To: <1584110682-3837-1-git-send-email-alan.maguire@oracle.com> From: Brendan Higgins Date: Fri, 13 Mar 2020 17:03:07 -0700 Message-ID: Subject: Re: [PATCH v7 kunit-next 0/4] kunit: add debugfs representation to show results To: Alan Maguire Cc: Frank Rowand , Greg KH , shuah , Jonathan Corbet , "open list:KERNEL SELFTEST FRAMEWORK" , Linux Kernel Mailing List , KUnit Development , "open list:DOCUMENTATION" 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, Mar 13, 2020 at 7:44 AM Alan Maguire wrote: > > When kunit tests are run on native (i.e. non-UML) environments, the results > of test execution are often intermixed with dmesg output. This patch > series attempts to solve this by providing a debugfs representation > of the results of the last test run, available as > > /sys/kernel/debug/kunit//results > > Changes since v6: > > - fixed regexp parsing in kunit_parser.py to ensure test results are read > successfully with 4-space indentation (Brendan, patch 3) > > Changes since v5: > > - replaced undefined behaviour use of snprintf(buf, ..., buf) in > kunit_log() with a function to append string to existing log > (Frank, patch 1) > - added clarification on log size limitations to documentation > (Frank, patch 4) > > Changes since v4: > > - added suite-level log expectations to kunit log test (Brendan, patch 2) > - added log expectations (of it being NULL) for case where > CONFIG_KUNIT_DEBUGFS=n to kunit log test (patch 2) > - added patch 3 which replaces subtest tab indentation with 4 space > indentation as per TAP 14 spec (Frank, patch 3) > > Changes since v3: > > - added CONFIG_KUNIT_DEBUGFS to support conditional compilation of debugfs > representation, including string logging (Frank, patch 1) > - removed unneeded NULL check for test_case in > kunit_suite_for_each_test_case() (Frank, patch 1) > - added kunit log test to verify logging multiple strings works > (Frank, patch 2) > - rephrased description of results file (Frank, patch 3) > > Changes since v2: > > - updated kunit_status2str() to kunit_status_to_string() and made it > static inline in include/kunit/test.h (Brendan) > - added log string to struct kunit_suite and kunit_case, with log > pointer in struct kunit pointing at the case log. This allows us > to collect kunit_[err|info|warning]() messages at the same time > as we printk() them. This solves for the most part the sharing > of log messages between test execution and debugfs since we > just print the suite log (which contains the test suite preamble) > and the individual test logs. The only exception is the suite-level > status, which we cannot store in the suite log as it would mean > we'd print the suite and its status prior to the suite's results. > (Brendan, patch 1) > - dropped debugfs-based kunit run patch for now so as not to cause > problems with tests currently under development (Brendan) > - fixed doc issues with code block (Brendan, patch 3) > > Changes since v1: > - trimmed unneeded include files in lib/kunit/debugfs.c (Greg) > - renamed global debugfs functions to be prefixed with kunit_ (Greg) > - removed error checking for debugfs operations (Greg) Everything looks good to me. I tried running kunit_tool and everything looked good there well.