Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65D3BC6379F for ; Wed, 22 Feb 2023 01:51:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229998AbjBVBvF (ORCPT ); Tue, 21 Feb 2023 20:51:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229739AbjBVBvD (ORCPT ); Tue, 21 Feb 2023 20:51:03 -0500 Received: from mail-il1-x134.google.com (mail-il1-x134.google.com [IPv6:2607:f8b0:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9AAC32A14E for ; Tue, 21 Feb 2023 17:50:58 -0800 (PST) Received: by mail-il1-x134.google.com with SMTP id u6so2693297ilk.12 for ; Tue, 21 Feb 2023 17:50:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1677030658; h=subject:from:cc:to:content-language:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=G28KTOp1NyMF/qwe4IiT/9bM96WSpHKrPUm+vPd+Gd4=; b=OGTKHRtFrzVpcYnA5dba1ijiX7z1fNiLFijZCOHXVaDRVnu5Mbp1h0OHvGGfbsr0RP 9aEJLfV+LUA7R7kjMcQRMEqS+iAxLreKDGnFG6XtxP8cEkMME5z8WFKu4543bL3ibNBK /XM4/42UrN7Aolx2kXBuuOreQtqBjzbHL7lDE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677030658; 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=G28KTOp1NyMF/qwe4IiT/9bM96WSpHKrPUm+vPd+Gd4=; b=apVsyi/Cix3D5Wvv86TkoYrnpjgMwDtDHB7XVa8VGXYTR7Eb+ZjJqYgp0cIbQQnT0J rNTI0D86cITlVeHqtI2IzQBLm2W6vNESCLAb6eaPudZUcVx2qY8f0txhvLi4xUZFwrp8 RxeNSk4LceIl7xLf1ElwDNxSiyKM9Nz5sUu7AGWoJ2fswW1o7wyeLLdDVhWMMOZ39aeC w5NueuIMVKX4WG6H9oZPoZ2jH7GFO8rXNaxdF/v+moeWG6oDricUXbVYQLbbTTfofPOK Cy2VTOEl53dhSk9nY1cqbicWb8YTfGsFeU8RA+mPhDPIjkkPAsa9pIVSBnigHM9qA89m fsiA== X-Gm-Message-State: AO0yUKW3TuxEVUC1wZc75yEw0QxdZIxIsG/rKkOoPzy9i4KAcC2zs65d 9DImhXglfRuC03t89jhZeSAT7w== X-Google-Smtp-Source: AK7set9OB/3lNQiGC6sHPesrp0LUB1H5t5ckBhb6pICczaCEwzl5v0tLvCOlVsDnt2dxADKeLq0VQg== X-Received: by 2002:a92:d186:0:b0:316:67be:1b99 with SMTP id z6-20020a92d186000000b0031667be1b99mr3262811ilz.0.1677030657844; Tue, 21 Feb 2023 17:50:57 -0800 (PST) Received: from [192.168.1.128] ([38.15.45.1]) by smtp.gmail.com with ESMTPSA id z3-20020a056638000300b003aa9ddab101sm1093496jao.19.2023.02.21.17.50.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Feb 2023 17:50:56 -0800 (PST) Content-Type: multipart/mixed; boundary="------------XY8bUBmlCTZa0DuNLCBsMGDn" Message-ID: <02cf36b9-6526-576b-1fd3-a59b67c8c123@linuxfoundation.org> Date: Tue, 21 Feb 2023 18:50:56 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Content-Language: en-US To: Linus Torvalds Cc: Shuah Khan , shuah , David Gow , Brendan Higgins , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org From: Shuah Khan Subject: [GIT PULL] KUnit next update for Linux 6.3-rc1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a multi-part message in MIME format. --------------XY8bUBmlCTZa0DuNLCBsMGDn 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.3-rc1. This KUnit update for Linux 6.3-rc1 consists of cleanups, new features, and documentation updates: -- adds Function Redirection API to isolate the code being tested from other parts of the kernel. functionredirection.rst has the details. diff is attached. thanks, -- Shuah ---------------------------------------------------------------- The following changes since commit 4ec5183ec48656cec489c49f989c508b68b518e3: Linux 6.2-rc7 (2023-02-05 13:13:28 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux-kselftest-kunit-6.3-rc1 for you to fetch changes up to 82649c7c0da431d147a75c6ae768ee42c1053f53: kunit: Add printf attribute to fail_current_test_impl (2023-02-08 18:08:14 -0700) ---------------------------------------------------------------- linux-kselftest-kunit-6.3-rc1 This KUnit update for Linux 6.3-rc1 consists of cleanups, new features, and documentation updates: -- adds Function Redirection API to isolate the code being tested from other parts of the kernel. functionredirection.rst has the details. ---------------------------------------------------------------- Alexander Pantyukhin (2): tools/testing/kunit/kunit.py: remove redundant double check kunit: kunit.py extract handlers David Gow (3): kunit: Add "hooks" to call into KUnit when it's built as a module kunit: Expose 'static stub' API to redirect functions kunit: Add printf attribute to fail_current_test_impl Rae Moar (1): lib/hashtable_test.c: add test for the hashtable structure Sadiya Kazi (1): Documentation: Add Function Redirection API docs .../dev-tools/kunit/api/functionredirection.rst | 162 +++++++++++ Documentation/dev-tools/kunit/api/index.rst | 13 +- Documentation/dev-tools/kunit/usage.rst | 15 +- include/kunit/static_stub.h | 113 ++++++++ include/kunit/test-bug.h | 29 +- lib/Kconfig.debug | 13 + lib/Makefile | 9 + lib/hashtable_test.c | 317 +++++++++++++++++++++ lib/kunit/Makefile | 4 + lib/kunit/hooks-impl.h | 31 ++ lib/kunit/hooks.c | 21 ++ lib/kunit/kunit-example-test.c | 38 +++ lib/kunit/static_stub.c | 123 ++++++++ lib/kunit/test.c | 15 +- tools/testing/kunit/kunit.py | 186 ++++++------ 15 files changed, 966 insertions(+), 123 deletions(-) create mode 100644 Documentation/dev-tools/kunit/api/functionredirection.rst create mode 100644 include/kunit/static_stub.h create mode 100644 lib/hashtable_test.c create mode 100644 lib/kunit/hooks-impl.h create mode 100644 lib/kunit/hooks.c create mode 100644 lib/kunit/static_stub.c ---------------------------------------------------------------- --------------XY8bUBmlCTZa0DuNLCBsMGDn Content-Type: text/x-patch; charset=UTF-8; name="linux-kselftest-kunit-6.3-rc1.diff" Content-Disposition: attachment; filename="linux-kselftest-kunit-6.3-rc1.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL0RvY3VtZW50YXRpb24vZGV2LXRvb2xzL2t1bml0L2FwaS9mdW5jdGlv bnJlZGlyZWN0aW9uLnJzdCBiL0RvY3VtZW50YXRpb24vZGV2LXRvb2xzL2t1bml0L2FwaS9m dW5jdGlvbnJlZGlyZWN0aW9uLnJzdApuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAw MDAwMDAwMDAuLjM3OTFlZmMyZmNjYQotLS0gL2Rldi9udWxsCisrKyBiL0RvY3VtZW50YXRp b24vZGV2LXRvb2xzL2t1bml0L2FwaS9mdW5jdGlvbnJlZGlyZWN0aW9uLnJzdApAQCAtMCww ICsxLDE2MiBAQAorLi4gU1BEWC1MaWNlbnNlLUlkZW50aWZpZXI6IEdQTC0yLjAKKworPT09 PT09PT09PT09PT09PT09PT09PT09CitGdW5jdGlvbiBSZWRpcmVjdGlvbiBBUEkKKz09PT09 PT09PT09PT09PT09PT09PT09PQorCitPdmVydmlldworPT09PT09PT0KKworV2hlbiB3cml0 aW5nIHVuaXQgdGVzdHMsIGl0J3MgaW1wb3J0YW50IHRvIGJ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