Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp1114518rdb; Wed, 1 Nov 2023 11:39:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHRWvg4FnyI5ngmEnbdqwNCgFnB1Ux/D20/MaX3s4WgrnXzlO0KUCZ900vqHoAwwICJO9gd X-Received: by 2002:a05:6a20:914a:b0:15d:e68d:a850 with SMTP id x10-20020a056a20914a00b0015de68da850mr19907345pzc.29.1698863940965; Wed, 01 Nov 2023 11:39:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698863940; cv=none; d=google.com; s=arc-20160816; b=OPio6vijqq2oaJy6JP7ovFEALxC9RxOGA32zztWSBpGrPJrGnDdWyVowB2/ljUAaf4 RI3K2hK6EluvDWNfGWCZQntCrZUOI+SA1qpR64fjJo0DShuZVIOkU46cPeXdVDiJjbmV 06H8ZFR9HhMNBEMh84oA5o5dYRXBc/TSMPCTxKAGEItseejUkJpz4XYx6tZjyhdhG7bH JLH5atJO8hhu3vXAnpnpBihbUgu16JVOtNh09Yf6KkFm7F7uTg30NUPdoCT9wpo5bV4S VAcspDGslUEHYCY8ndFh77nwag0pBAokPTIk/5GUAOpp7ZvP36yD8Ol63At+NBHouTHx Ek7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:from:cc:to:content-language:user-agent :mime-version:date:message-id:dkim-signature; bh=I7+S249lVki1vZbo2TuLSMM3jL8p0CFgHFwLCbnep2k=; fh=xoRzzEKlnAhrmsW6VphTgBP0+RR00teEf0ielxB6zkQ=; b=XdNUHWbjN5a2shVYknaddaF0X600lsVCmqLuB+5dBnIplFZ3DQmcYowognQqVct3od cTbjVloDecfkHH62D3JxmnamoSvK9pgWb1PGCxVR8Y9P4RsbvgBU1IJupz9y+rBUfPex 1INVBGqZxNOTVzRfo9SB1HgR5bIhG7uPhJc7/Od2TtrZvUu3G+WrpkCwfEhqLmfXWrFY JLc3nM1kZX0KZZKvrKesUfEqVb8IxaXf7TJMg+qLg8lxMpq+attRSz6mdKHibLuLBRlO Wn5Oh/TAyjLmRsEM6sdo0j0tBW+1/i3rOpc8IhmrMztqpdzXVU9ROAcvF9hbdV2/JETq zsEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=OlaQXbaE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id g23-20020a635657000000b005bd043711cbsi419997pgm.216.2023.11.01.11.38.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 11:39:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=OlaQXbaE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 5CFA18068229; Wed, 1 Nov 2023 11:38:31 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344562AbjKAShx (ORCPT + 99 others); Wed, 1 Nov 2023 14:37:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231969AbjKAShv (ORCPT ); Wed, 1 Nov 2023 14:37:51 -0400 Received: from mail-il1-x12b.google.com (mail-il1-x12b.google.com [IPv6:2607:f8b0:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5410F13E for ; Wed, 1 Nov 2023 11:37:39 -0700 (PDT) Received: by mail-il1-x12b.google.com with SMTP id e9e14a558f8ab-3574c225c14so161075ab.0 for ; Wed, 01 Nov 2023 11:37:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1698863858; x=1699468658; darn=vger.kernel.org; h=subject:from:cc:to:content-language:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=I7+S249lVki1vZbo2TuLSMM3jL8p0CFgHFwLCbnep2k=; b=OlaQXbaExy8Eh4nltQMTFusOxxv9fhDDjHscmz2KYimq+SHBWdGyLsTRtnjCcYpPut gps9GOGs5p7kZvf7Iwgt2pD66/es328aSS8g5BY6K849irlmWHOnnGP5I1X4Vj5xVxwB Mm/e9NKzXw+fkyrxydDmfRT15vOg4+1fRSDbw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698863858; x=1699468658; h=subject:from:cc:to:content-language:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=I7+S249lVki1vZbo2TuLSMM3jL8p0CFgHFwLCbnep2k=; b=FHTyoe6wvKrea3uk0nGfuK5xXLB2h8A/NH92lzYTt4BDu2treGqYeooGGw+8DPhO1R fwqEtLDiKwxUzejTWWxFER5prGw2K0C70yo/cyq2aRqV8Zr/Fwz+MbrGwC7HYFoGhP8w HPF/IAuVEQSKvMMkAFOzssfszcLJlcffoPcKhVF7pCz69iJ4h9j9e8H6c9/2TO+poB/a FVU+UEmf39mvKSZmLsOHX5E81tuUHnC12OzxHfamVvDyg0I8t60jD55K0c0vL/ZqiP0Q Iagg8OXGnBGDAAYHQ/KQ1oatUAshJIN0aw0H6QGz8XbjstIMPRFrAbKRjs1J2e6vs0aq QCUA== X-Gm-Message-State: AOJu0YxwexOK2OU6yqTL8GnQocBxbR3N4bIga6tRg/nvEcbmetHI5+dI vw3X3tocqjNr6lHsS01BOW8TLQ== X-Received: by 2002:a05:6602:1c6:b0:79f:8cd3:fd0e with SMTP id w6-20020a05660201c600b0079f8cd3fd0emr16039035iot.1.1698863858613; Wed, 01 Nov 2023 11:37:38 -0700 (PDT) Received: from [192.168.1.128] ([38.175.170.29]) by smtp.gmail.com with ESMTPSA id dl31-20020a056638279f00b0042036f06b24sm1091288jab.163.2023.11.01.11.37.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Nov 2023 11:37:37 -0700 (PDT) Content-Type: multipart/mixed; boundary="------------OC0QI1aFbk4tnTL5TPWm2ttt" Message-ID: Date: Wed, 1 Nov 2023 12:37:36 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Linus Torvalds Cc: shuah , Shuah Khan , Brendan Higgins , David Gow , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org From: Shuah Khan Subject: [GIT PULL] KUnit next update for Linux 6.7-rc1 X-Spam-Status: No, score=-1.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 01 Nov 2023 11:38:31 -0700 (PDT) This is a multi-part message in MIME format. --------------OC0QI1aFbk4tnTL5TPWm2ttt Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Linus, Please pull the following KUnit next update for Linux 6.7-rc1. This kunit update for Linux 6.7-rc1 consists of: -- string-stream testing enhancements -- several fixes memory leaks -- fix to reset status during parameter handling diff is attached. thanks, -- Shuah ---------------------------------------------------------------- The following changes since commit ce9ecca0238b140b88f43859b211c9fdfd8e5b70: Linux 6.6-rc2 (2023-09-17 14:40:24 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux_kselftest-kunit-6.7-rc1 for you to fetch changes up to 8040345fdae4cb256c5d981f91ae0f22bea8adcc: kunit: test: Fix the possible memory leak in executor_test (2023-09-28 08:51:07 -0600) ---------------------------------------------------------------- linux_kselftest-kunit-6.7-rc1 This kunit update for Linux 6.7-rc1 consists of: -- string-stream testing enhancements -- several fixes memory leaks -- fix to reset status during parameter handling ---------------------------------------------------------------- Jinjie Ruan (4): kunit: Fix missed memory release in kunit_free_suite_set() kunit: Fix the wrong kfree of copy for kunit_filter_suites() kunit: Fix possible memory leak in kunit_filter_suites() kunit: test: Fix the possible memory leak in executor_test Michal Wajdeczko (1): kunit: Reset test status on each param iteration Richard Fitzgerald (10): kunit: string-stream: Don't create a fragment for empty strings kunit: string-stream: Improve testing of string_stream kunit: string-stream: Add option to make all lines end with newline kunit: string-stream-test: Add cases for string_stream newline appending kunit: Don't use a managed alloc in is_literal() kunit: string-stream: Add kunit_alloc_string_stream() kunit: string-stream: Decouple string_stream from kunit kunit: string-stream: Add tests for freeing resource-managed string_stream kunit: Use string_stream for test log kunit: string-stream: Test performance of string_stream include/kunit/test.h | 14 +- lib/kunit/assert.c | 14 +- lib/kunit/debugfs.c | 36 ++- lib/kunit/executor.c | 23 +- lib/kunit/executor_test.c | 36 +-- lib/kunit/kunit-example-test.c | 5 +- lib/kunit/kunit-test.c | 56 ++++- lib/kunit/string-stream-test.c | 525 +++++++++++++++++++++++++++++++++++++++-- lib/kunit/string-stream.c | 100 ++++++-- lib/kunit/string-stream.h | 16 +- lib/kunit/test.c | 56 +---- 11 files changed, 734 insertions(+), 147 deletions(-) ---------------------------------------------------------------- --------------OC0QI1aFbk4tnTL5TPWm2ttt Content-Type: text/x-patch; charset=UTF-8; name="linux_kselftest-kunit-6.7-rc1.diff" Content-Disposition: attachment; filename="linux_kselftest-kunit-6.7-rc1.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL2luY2x1ZGUva3VuaXQvdGVzdC5oIGIvaW5jbHVkZS9rdW5pdC90ZXN0 LmgKaW5kZXggNjhmZjAxYWVlMjQ0Li4yMGVkOWY5Mjc1YzkgMTAwNjQ0Ci0tLSBhL2luY2x1 ZGUva3VuaXQvdGVzdC5oCisrKyBiL2luY2x1ZGUva3VuaXQvdGVzdC5oCkBAIC0zMyw5ICsz Myw3IEBACiBERUNMQVJFX1NUQVRJQ19LRVlfRkFMU0Uoa3VuaXRfcnVubmluZyk7CiAKIHN0 cnVjdCBrdW5pdDsKLQotLyogU2l6ZSBvZiBsb2cgYXNzb2NpYXRlZCB3aXRoIHRlc3QuICov Ci0jZGVmaW5lIEtVTklUX0xPR19TSVpFIDIwNDgKK3N0cnVjdCBzdHJpbmdfc3RyZWFtOwog CiAvKiBNYXhpbXVtIHNpemUgb2YgcGFyYW1ldGVyIGRlc2NyaXB0aW9uIHN0cmluZy4gKi8K ICNkZWZpbmUgS1VOSVRfUEFSQU1fREVTQ19TSVpFIDEyOApAQCAtMTMzLDcgKzEzMSw3IEBA IHN0cnVjdCBrdW5pdF9jYXNlIHsKIAkvKiBwcml2YXRlOiBpbnRlcm5hbCB1c2Ugb25seS4g Ki8KIAllbnVtIGt1bml0X3N0YXR1cyBzdGF0dXM7CiAJY2hhciAqbW9kdWxlX25hbWU7Ci0J Y2hhciAqbG9nOworCXN0cnVjdCBzdHJpbmdfc3RyZWFtICpsb2c7CiB9OwogCiBzdGF0aWMg aW5saW5lIGNoYXIgKmt1bml0X3N0YXR1c190b19va19ub3Rfb2soZW51bSBrdW5pdF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