Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/132263/?format=api
http://patches.dpdk.org/api/patches/132263/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20231002124459.452527-1-bruce.richardson@intel.com/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20231002124459.452527-1-bruce.richardson@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20231002124459.452527-1-bruce.richardson@intel.com", "date": "2023-10-02T12:44:59", "name": "doc/contributing: update test guidelines for meson changes", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "bb6ae9138b0b31da7db2c20187ced00e0a533253", "submitter": { "id": 20, "url": "http://patches.dpdk.org/api/people/20/?format=api", "name": "Bruce Richardson", "email": "bruce.richardson@intel.com" }, "delegate": { "id": 1, "url": "http://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20231002124459.452527-1-bruce.richardson@intel.com/mbox/", "series": [ { "id": 29713, "url": "http://patches.dpdk.org/api/series/29713/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=29713", "date": "2023-10-02T12:44:59", "name": "doc/contributing: update test guidelines for meson changes", "version": 1, "mbox": "http://patches.dpdk.org/series/29713/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/132263/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/132263/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 7E12B426A2;\n\tMon, 2 Oct 2023 14:45:10 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 5556440294;\n\tMon, 2 Oct 2023 14:45:10 +0200 (CEST)", "from mgamail.intel.com (mgamail.intel.com [134.134.136.65])\n by mails.dpdk.org (Postfix) with ESMTP id 2B5164003C\n for <dev@dpdk.org>; Mon, 2 Oct 2023 14:45:09 +0200 (CEST)", "from orsmga008.jf.intel.com ([10.7.209.65])\n by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 02 Oct 2023 05:45:07 -0700", "from silpixa00401385.ir.intel.com ([10.237.214.41])\n by orsmga008.jf.intel.com with ESMTP; 02 Oct 2023 05:45:06 -0700" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1696250709; x=1727786709;\n h=from:to:cc:subject:date:message-id:mime-version:\n content-transfer-encoding;\n bh=pIjWbabt3dx9jdNMfGBtjBhFqjiJBZ++fRsTr9I+I2E=;\n b=J6/mTDpgs37I54eVrcYJFvfdxNaaVLby4TA8ujQSW3Ga/020/VjqYMq4\n iQ4/DdnKbUVBMRR8Rl60VcqNeMYMWRB+t46kgNxW3h/X/urmRVEWrBy8E\n kOz0Xs1LYcF4ZIOmQNHNUQLEmkA/vmmTkby225yWcoM6JM+bRLKbGbKf2\n xYriLjKcLDG+1w8ZRnd7C1aReTVcnwWSVyIe5bvo2/k1FTU6ERl0XM2dt\n bOiYiE2iJoE4sw6+y1yNVcXhs5MtYaxEO5kSoODDdHKbvubDZk1jyz4cA\n EiB0owPN2fAwXO+dLiQr9elIHr6a0BgoPalJJnVOnVikGD+Bs1rxwrSMU w==;", "X-IronPort-AV": [ "E=McAfee;i=\"6600,9927,10851\"; a=\"386505094\"", "E=Sophos;i=\"6.03,194,1694761200\"; d=\"scan'208\";a=\"386505094\"", "E=McAfee;i=\"6600,9927,10851\"; a=\"779920902\"", "E=Sophos;i=\"6.03,194,1694761200\"; d=\"scan'208\";a=\"779920902\"" ], "X-ExtLoop1": "1", "From": "Bruce Richardson <bruce.richardson@intel.com>", "To": "dev@dpdk.org", "Cc": "aconole@redhat.com,\n\tBruce Richardson <bruce.richardson@intel.com>", "Subject": "[PATCH] doc/contributing: update test guidelines for meson changes", "Date": "Mon, 2 Oct 2023 13:44:59 +0100", "Message-Id": "<20231002124459.452527-1-bruce.richardson@intel.com>", "X-Mailer": "git-send-email 2.39.2", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org" }, "content": "With the meson test suites being reworked to be automatically generated,\nrather than having to be hard-coded in the meson.build file, we need to\nupdate our contributing guidelines to take account of this change.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n\nNOTE: this patch contains only changes needed to bring the doc\nup-to-date with the meson suite registration changes. I believe the doc\nneeds further general updates beyond this, but that is out of scope for\nthis patch.\n---\n doc/guides/contributing/unit_test.rst | 34 +++++++++++++++------------\n 1 file changed, 19 insertions(+), 15 deletions(-)", "diff": "diff --git a/doc/guides/contributing/unit_test.rst b/doc/guides/contributing/unit_test.rst\nindex 1b2eb0da03..382eaf9667 100644\n--- a/doc/guides/contributing/unit_test.rst\n+++ b/doc/guides/contributing/unit_test.rst\n@@ -126,16 +126,15 @@ the build system includes a standard way of executing the Meson test suites.\n After building via ``ninja``, the ``meson test`` command\n with no arguments will execute the Meson test suites.\n \n-There are five pre-configured Meson test suites.\n+There are a number of pre-configured Meson test suites.\n The first is the **fast** test suite, which is the largest group of test cases.\n These are the bulk of the unit tests to validate functional blocks.\n The second is the **perf** tests.\n These test suites can take longer to run and do performance evaluations.\n The third is the **driver** test suite,\n which is mostly for special hardware related testing (such as `cryptodev`).\n-The fourth suite is the **debug** suite.\n+The fourth, and currently the last, suite is the **debug** suite.\n These tests mostly are used to dump system information.\n-The last suite is the **extra** suite for tests having some known issues.\n \n The Meson test suites can be selected by adding the ``--suite`` option\n to the ``meson test`` command.\n@@ -184,10 +183,15 @@ create a new test file for that suite\n (ex: see *app/test/test_version.c* for the ``version_autotest`` test suite).\n There are two important functions for interacting with the test harness:\n \n- ``REGISTER_TEST_COMMAND(command_name, function_to_execute)``\n+ ``REGISTER_<MESON_SUITE>_TEST(command_name, function_to_execute)``\n Registers a test command with the name `command_name`\n- and which runs the function `function_to_execute`\n- when `command_name` is invoked.\n+ and which runs the function `function_to_execute` when `command_name` is invoked.\n+ The test is automatically added to the meson test suite `<MESON_SUITE>` by this macro.\n+ Examples would be ``REGISTER_DRIVER_TEST``, or ``REGISTER_PERF_TEST``.\n+ **NOTE:** The ``REGISTER_FAST_TEST`` macro is slightly different,\n+ in that it takes two additional parameters,\n+ specifying whether the test can be run using ``--no-huge``,\n+ and whether the test can be run using Address Sanitization (ASAN)\n \n ``unit_test_suite_runner(struct unit_test_suite *)``\n Returns a runner for a full test suite object,\n@@ -248,7 +252,7 @@ An example of both a test suite and a case:\n return unit_test_suite_runner(&example_testsuite);\n }\n \n- REGISTER_TEST_COMMAND(example_autotest, example_tests);\n+ REGISTER_PERF_TEST(example_autotest, example_tests);\n \n The above code block is a small example\n that can be used to create a complete test suite with test case.\n@@ -315,7 +319,7 @@ of the unit test suite structure, for example:\n return ret;\n }\n \n- REGISTER_TEST_COMMAND(example_autotest, example_tests);\n+ REGISTER_FAST_TEST(example_autotest, true /*no-huge*/, false /*ASan*/, example_tests);\n \n \n Designing a test\n@@ -392,9 +396,10 @@ This can be used to assist in test development.\n Adding a suite or test case to Meson\n ------------------------------------\n \n-Adding to one of the Meson test suites involves\n-editing the appropriate Meson build file `app/test/meson.build`\n-and adding the command to the correct test suite class.\n+Adding to one of the Meson test suites involves using the appropriate macro to register the test in dpdk-test,\n+as described above.\n+For example,\n+defining the test command using ``REGISTER_PERF_TEST`` automatically adds the test to the perf-test meson suite.\n Once added, the new test will be run\n as part of the appropriate class (fast, perf, driver, etc.).\n \n@@ -409,11 +414,10 @@ by using the ``--list`` option::\n Some of these test suites are run during continuous integration tests,\n making regression checking automatic for new patches submitted to the project.\n \n-In general, when a test is added to the `dpdk-test` application,\n-it probably should be added to a Meson test suite,\n-but the choice is left to maintainers and individual developers.\n-Preference is to add tests to the Meson test suites.\n+.. note::\n \n+ The use of the old ``REGISTER_TEST_COMMAND`` macro to add a command without adding it to a meson test suite is deprecated.\n+ All new tests must be added to a test suite using the appropriate ``REGISTER_<SUITE>_TEST`` macro\n \n Running cryptodev tests\n -----------------------\n", "prefixes": [] }{ "id": 132263, "url": "