Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp4101898ioo; Wed, 25 May 2022 15:12:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLCyKLghA1+clHcLDmUlrhze3Y1no8xBW2OMmj1JtD6oVE7JqTxn+EoCwDOIMfW4ddmIpR X-Received: by 2002:a17:902:da84:b0:161:d2d2:184d with SMTP id j4-20020a170902da8400b00161d2d2184dmr35087417plx.81.1653516722324; Wed, 25 May 2022 15:12:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653516722; cv=none; d=google.com; s=arc-20160816; b=hd2nwm0hC5qvKJHpk+MuJGUtjFkPY2onG72rMYqXJGM78/e6z0x6Dc746Bzv0qcbvA kpGH2AUFPyzflMnhLB/+kAUhnt+3hz1CjNzKVVCxuyoe5/o8l4h2XLzoX2uyqlndv+DY 0vt/DjY8HyyEMiH4BtL0nv1Px5TDz8j6PQakhoz5MPMx1LR6tGJzUS3NKe12oVSLc2S9 0FJWqkkHRWTuyOOM2ut0AYdkRtxT43qTC6f7kOuC3zf0StNB73SHErrT1LejC3zbV82n EpVV1i72YTu0BCZ1EmM3EXJXahE7pZuqdyctU3sJLkPNIRjElMU4LteAZqcUcqW4D6PW nVrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:mime-version:message-id:date :dkim-signature; bh=GgY7NSiX6uiGDtMHlohDtQsx1OJlx0SAIigzyTay35s=; b=RKeme0j0qVsDMNPAH5+Fc6B5uYIx+ru4B7lELc/S8eHOvMAzpKhbfTU/grZv+BnlH4 mtulE8Ci2kaka9L3K7fzdFv6y+ygCIk6Ssn9Bp7fQbJ3kbHaoJuIWpgZO/1eFacvi1gG TvniOx4UCCAd0QvRRJGJUXJiKGfZVC66K8q9rMMn0eZQaG2CkRY8S9W15KAXgySqQPXd t94BBmP4kU/VzoenosNE+3unDMFD8eOCTw4O+8Qu4WsbT+QZ+lFIYnbl7l7KmmqQzHL3 CUUyHN2S9eNoYaSSlBlpk3nwMygp7J9WCSoi7F7wWIEW/2JH6mZjSme4P1mk+Q1BpYqE r27w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=jowgYFt7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i29-20020a633c5d000000b003f8a48ed403si118750pgn.580.2022.05.25.15.11.48; Wed, 25 May 2022 15:12:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=jowgYFt7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S235049AbiEYPpN (ORCPT + 99 others); Wed, 25 May 2022 11:45:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243170AbiEYPo6 (ORCPT ); Wed, 25 May 2022 11:44:58 -0400 Received: from mail-pj1-x1049.google.com (mail-pj1-x1049.google.com [IPv6:2607:f8b0:4864:20::1049]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0AAA5D1B7 for ; Wed, 25 May 2022 08:44:56 -0700 (PDT) Received: by mail-pj1-x1049.google.com with SMTP id nn14-20020a17090b38ce00b001e00df82de8so1460613pjb.1 for ; Wed, 25 May 2022 08:44:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:message-id:mime-version:subject:from:to:cc; bh=GgY7NSiX6uiGDtMHlohDtQsx1OJlx0SAIigzyTay35s=; b=jowgYFt7SEavOK8Pjjl0zBdyPggQe+XS6DE8u89llg5eDqiCPe3JleZudMhvvt60Tx KUrtmfXVebiCd4AudyFe5/7URbeh3YLBqpZsFGhazkj4rewAPV3pPdlvshEi+2gezxEH mUCy9kHiaL+UHJfSyXq7u34pU5RUrFK90yNOEMZNCllIi+pfkZE6X4qm79Dbbp43dEbH zu3eKe7pzRlHpv61tz2wvEjFc3VHhVpP3WI399rkB44ERWn0kHIDMkzoJZfdkgfUt5m5 GdJkcOsLABE6Z3vQprG6bFgxefZJ8FWtiR+cKBLd4ZZf8c7N00hAdGCNokw8ZxfwGHmO 8iTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=GgY7NSiX6uiGDtMHlohDtQsx1OJlx0SAIigzyTay35s=; b=ymS1ZyqcTf6RROhpTMTPyF6Jc76g1x5DGqlPwe64PsHEt1QfmGMSPT/+b+JxPudbqx /VRApypDnVt/YYbf6VuUJBPf194SYyWuWhURUFPd977jLknQdU5RPtlfybcW59Hf4TD+ SUMw6RZCnp7ajvwOkXuJb18cagqCoR8LG2Fu/YWKAQ0l8InKQVp/5sD6jkmtUgqxxRUP myRaibj/aR8Hm6sNr4NG3lcKA2Ju/WrkfxIRUFmkYgcFfXg871BLDobrNwSGjsHbooSf +Ihu9mlyi8MPDays/XsycR52WrvUWJTfKzEz2Y571ifVvy546OU25ZFOcxxUWRIF+3oc E+/Q== X-Gm-Message-State: AOAM533t4BofTUP8R8hTKg1RdBaLfX1ZaNXUlSTZkUeacmryjuQmhQ+T ef15updaXib0UEnIh0zE/SK6Caq5zez8nw== X-Received: from dlatypov.svl.corp.google.com ([2620:15c:2cd:202:5bba:b161:2a8a:2ddd]) (user=dlatypov job=sendgmr) by 2002:a17:90a:9318:b0:1e0:b957:ffda with SMTP id p24-20020a17090a931800b001e0b957ffdamr2678266pjo.199.1653493496291; Wed, 25 May 2022 08:44:56 -0700 (PDT) Date: Wed, 25 May 2022 08:44:38 -0700 Message-Id: <20220525154442.1438081-1-dlatypov@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.36.1.124.g0e6072fb45-goog Subject: [RFC PATCH 0/4] kunit: more assertion reworking From: Daniel Latypov To: brendanhiggins@google.com, davidgow@google.com Cc: ojeda@kernel.org, linux-kernel@vger.kernel.org, kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org, Daniel Latypov Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a follow up to these three series: https://lore.kernel.org/all/20220113165931.451305-1-dlatypov@google.com/ https://lore.kernel.org/all/20220118223506.1701553-1-dlatypov@google.com/ https://lore.kernel.org/all/20220125210011.3817742-1-dlatypov@google.com/ The two goals of those series were a) reduce the size of struct kunit_assert and friends. (struct kunit_assert went from 48 => 8 bytes on UML.) b) simplify the internal code, mostly by deleting macros This series goes further a) sizeof(struct kunit_assert) = 0 now b) e.g. we delete another class of macros (KUNIT_INIT_*_ASSERT_STRUCT) Note: this does change the function signature of kunit_do_failed_assertion, so we'd need to update the rust wrapper in https://github.com/Rust-for-Linux/linux/blob/rust/rust/kernel/kunit.rs But otherwise, I don't think this series changes anything on the rust-side. Daniel Latypov (4): rfc: kunit: remove format func from struct kunit_assert, get it to 0 bytes rfc: kunit: rename base KUNIT_ASSERTION macro to _KUNIT_FAILED rfc: kunit: eliminate KUNIT_INIT_*_ASSERT_STRUCT macros kunit: delcare kunit_assert structs as const include/kunit/assert.h | 74 ++----------------------- include/kunit/test.h | 123 ++++++++++++++++++++++------------------- lib/kunit/test.c | 7 ++- 3 files changed, 76 insertions(+), 128 deletions(-) base-commit: e7eaffce47b7db72b077630dbe836f0c4132496d -- 2.36.1.124.g0e6072fb45-goog