From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2185C4338F for ; Tue, 10 Aug 2021 22:01:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B03D76056B for ; Tue, 10 Aug 2021 22:01:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235072AbhHJWBd (ORCPT ); Tue, 10 Aug 2021 18:01:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235069AbhHJWBb (ORCPT ); Tue, 10 Aug 2021 18:01:31 -0400 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 424FBC061765 for ; Tue, 10 Aug 2021 15:01:09 -0700 (PDT) Received: by mail-pl1-x629.google.com with SMTP id k2so23186629plk.13 for ; Tue, 10 Aug 2021 15:01:09 -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=TKI2CnsdvFNjqndaNstsi5v6QE1bxINGXNExmIgLnIk=; b=RQklxLJzaKm5M8XYcoIxx2s+VbZJEnssRgd9fY2NkyKOraI6mAZUM1sUxYZfk1KDOy h0J+BEVcvhbGgefSvBtebh1jgJwBfZifBPxJppyifTFn+V58U1xSvikJhycfXu08UTAp hfky0dx4D3LjAWP8lxEbt3sLJEQ8fodBmasFbE+/vNIaakBKdwT9IajR0vc3fJ0iIDem Ics4fvJ8RWGrZuVuGqvaQNXCs9enGUASo4+cM1OHo1TmHKtwxfO2iwtkomzWk5AG01o/ zRUnBmUJogsp55aBu7PIzzTwFhiLXqMxVfi6McoCwfRbJCP8c7vDTZdFotBEI+CC/e2T 8b7g== 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=TKI2CnsdvFNjqndaNstsi5v6QE1bxINGXNExmIgLnIk=; b=YSN4OnthZnSoWesjhq0Ye6WTDUiUrZItglWfTtDpwBmCAH2LngtjjVsG06Y0xJt2be LgmropBwNuvu+8p+kY2YhsSSwHkP2tQmSuwZAk1VQgjt6QHr+f3BxUHRhexSeUfl40i/ sE6BgiXYLuXjM7yBF7WFtqHaBpLNOrT+zx/0T5R0qoQ9KcdaKJrKR7lXtwEx43GfRhew FAL7DjfXgLDgknjBdBK7TFkFRWN50qJq/SNWVYcOa9U7Rozr1ktywLs94tin18ckvX2h CrMep0v0rO45LXwA4kCDwa/HiDILqNPJOb6YEu5LAt+RRvYtiWNarmdKuDtE0cCHVdY8 +RhA== X-Gm-Message-State: AOAM532a8o3r69GEmB7ekO15rM8mDQS5hWqckHzKdPTLLg7dXtLaKSoa Y1KHsPLSMV0F88WWDnkiNjtrtejd17glWZV/uQgcDy8cHjlmpA== X-Google-Smtp-Source: ABdhPJwKvC0mQoP0/mZH8xtTq4gpHY9Occ3XZipu3kp3Ob0XgH2vxRw/2HxOtR43wGejxmnCZiXgNO1R8MB/4BJxtGs= X-Received: by 2002:a17:90a:1b0d:: with SMTP id q13mr7125701pjq.217.1628632868528; Tue, 10 Aug 2021 15:01:08 -0700 (PDT) MIME-Version: 1.0 References: <20210805043503.20252-1-bvanassche@acm.org> <20210805043503.20252-4-bvanassche@acm.org> <20210809145953.GB21234@lst.de> In-Reply-To: <20210809145953.GB21234@lst.de> From: Brendan Higgins Date: Tue, 10 Aug 2021 15:00:57 -0700 Message-ID: Subject: Re: [PATCH v4 3/3] configfs: Add unit tests To: Christoph Hellwig Cc: Bart Van Assche , Joel Becker , linux-kernel@vger.kernel.org, Bodo Stroesser , "Martin K . Petersen" , Yanko Kaneti Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 9, 2021 at 7:59 AM Christoph Hellwig wrote: > > > text and binary attribute support. This is how I run these tests: > > > > set -e > > if [ -e .config ]; then > > make ARCH=um mrproper > > fi > > if [ ! -e .kunit/.kunitconfig ]; then > > cat <.kunit/.kunitconfig > > CONFIG_CONFIGFS_FS=y > > CONFIG_CONFIGFS_KUNIT_TEST=y > > CONFIG_KUNIT=y > > CONFIG_PROVE_LOCKING=y > > CONFIG_SYSFS=y > > CONFIG_UBSAN=y > > EOF > > cp .kunit/.kunitconfig .kunit/.config > > fi > > ./tools/testing/kunit/kunit.py run > > This is very useful documentation, but shouldn't it go into a README.kunit > or similar instead of a commit message? You could also put this in a .kunitconfig specific to your subsystem like we did for ext4: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/ext4/.kunitconfig You can then build using this .kunitconfig with something like: ./tools/testing/kunit/kunit.py run --kunitconfig=fs/ext4/.kunitconfig > > +config CONFIGFS_KUNIT_TEST > > + bool "Configfs Kunit test" if !KUNIT_ALL_TESTS > > + depends on CONFIGFS_FS && KUNIT=y > > + default KUNIT_ALL_TESTS Cheers!