contributor-guide: add patchtest section
PATCH 1/1 contributor-guide: add patchtest section
--- .../contributor-guide/submit-changes.rst | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+)
documentation/contributor-guide/submit-changes.rst +37 -0
@@ -401,6 +401,43 @@ Anyway, you'll also be able to access the new messages on mailing list archives, either through a web browser, or for the lists archived on https://lore.kernelorg, through an individual newsgroup feed or a git repository. +Validating Patches with Patchtest +================================= + +Patchtest is available in ``openembedded-core`` as a tool for making sure +that your patches are well-formatted and contain important info for +maintenance purposes, such as ``Signed-off-by`` and ``Upstream-Status`` +tags. Once you have generated the patch files and run ``source +oe-init-build-env`` to initialize your workspace, you can run patchtest +like so:: + + patchtest --patch <patch_name> + +Where ``/path/to/target/repo`` may (for example) be openembedded-core, +with the actual patchtest tests being kept in +``openembedded-core/meta/lib/patchtest/tests``. Alternatively, if you +want patchtest to iterate over and test multiple patches stored in a +directory, you can use:: + + patchtest --directory <directory_name> + +By default, patchtest uses its own modules' file paths to determine what +repository and test suite to check patches against. If you wish to test +patches against a repository other than ``openembedded-core`` and/or use +a different set of tests, you can use the --repodir and --testdir +flags:: + + patchtest --patch <patch_name> --repodir <path/to/repo> --testdir <path/to/testdir> + +Finally, note that patchtest is designed to test patches in a standalone +way, so if your patches are meant to apply on top of changes made by +previous patches in a series, it is possible that patchtest will report +false failures regarding the "merge on head" test. + +Using patchtest in this manner provides a final check for the overall +quality of your changes before they are submitted for review by the +maintainers. + Sending Patches via Email -------------------------
Signature · 1 line
2.41.0
Hi Trevor,
Many thanks for the patch!
I have a few quick tweaks to suggest, see below...
Quoted 10 lines · Trevor Gamblin
Signed-off-by Trevor Gamblin <[email protected]>--- .../contributor-guide/submit-changes.rst | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+)documentation/contributor-guide/submit-changes.rst +0
-0
documentation/contributor-guide/submit-changes.rst Anyway, you'll also be able to access the new messages on mailing list archives, · line 405
Quoted 5 lines
documentation/contributor-guide/submit-changes.rst +2
-0@@ -401,6 +401,43 @@ Anyway, you'll also be able to access the new messages on mailing list archives, either through a web browser, or for the lists archived on https://lore.kernelorg, through an individual newsgroup feed or a git repository. +Validating Patches with Patchtest +=================================
Hey, what about having this section right after the "Creating Patches" and before "Sending the Patches via Email"? This would make more sense IMHO.
documentation/contributor-guide/submit-changes.rst Anyway, you'll also be able to access the new messages on mailing list archives, · line 412
Quoted 7 lines
documentation/contributor-guide/submit-changes.rst +7
-0+ +Patchtest is available in ``openembedded-core`` as a tool for making sure +that your patches are well-formatted and contain important info for +maintenance purposes, such as ``Signed-off-by`` and ``Upstream-Status`` +tags. Once you have generated the patch files and run ``source +oe-init-build-env`` to initialize your workspace, you can run patchtest +like so::
Here and in the rest of the patch, could you use "``patchtest``" instead of "Patchtest" or "patchtest"? This would be aligned with the way we refer to other tools such as devtool (see https://git.yoctoproject.org/yocto-docs/tree/documentation/standards.md#n74)
documentation/contributor-guide/submit-changes.rst Anyway, you'll also be able to access the new messages on mailing list archives,
Quoted 6 lines
documentation/contributor-guide/submit-changes.rst +6
-0+ + patchtest --patch <patch_name> + +Where ``/path/to/target/repo`` may (for example) be openembedded-core, +with the actual patchtest tests being kept in +``openembedded-core/meta/lib/patchtest/tests``.
Is this sentence relevant here, as "/path/to/target/repo" is not part of the above command line?
documentation/contributor-guide/submit-changes.rst Anyway, you'll also be able to access the new messages on mailing list archives, · line 427
Quoted 10 lines
Alternatively, if you
documentation/contributor-guide/submit-changes.rst +9
-0+want patchtest to iterate over and test multiple patches stored in a +directory, you can use:: + + patchtest --directory <directory_name> + +By default, patchtest uses its own modules' file paths to determine what +repository and test suite to check patches against. If you wish to test +patches against a repository other than ``openembedded-core`` and/or use +a different set of tests, you can use the --repodir and --testdir
Use ``--repodir`` and ``--testdir``.
documentation/contributor-guide/submit-changes.rst Anyway, you'll also be able to access the new messages on mailing list archives, · line 439
Quoted 12 lines
documentation/contributor-guide/submit-changes.rst +12
-0+flags:: + + patchtest --patch <patch_name> --repodir <path/to/repo> --testdir <path/to/testdir> + +Finally, note that patchtest is designed to test patches in a standalone +way, so if your patches are meant to apply on top of changes made by +previous patches in a series, it is possible that patchtest will report +false failures regarding the "merge on head" test. + +Using patchtest in this manner provides a final check for the overall +quality of your changes before they are submitted for review by the +maintainers.
Very cool, I'm excited to use this tool, including for documentation patches ;-)
Of course, I'll apply your patch when patchtest makes it to oe-core.
Cheers
Michael.
Signature · 3 lines
Michael Opdenacker, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Quoted 5 lines · Michael Opdenacker
Hi Trevor,
Many thanks for the patch!
I have a few quick tweaks to suggest, see below...
Hi Michael,
I'll send some revisions shortly.
- Trevor
Quoted 81 lines · Trevor Gamblin
Quoted 12 lines
Signed-off-by Trevor Gamblin <[email protected]>---
.../contributor-guide/submit-changes.rst | 37 +++++++++++++++++++1 file changed, 37 insertions(+)documentation/contributor-guide/submit-changes.rst +0
-0@@ -401,6 +401,43 @@ Anyway, you'll also be able to access the new messages on mailing list archives, either through a web browser, or for the lists archived on https://lore.kernelorg,Quoted 3 lines
through an individual newsgroup feed or a git repository. +Validating Patches with Patchtest
+=================================Hey, what about having this section right after the "Creating Patches" and before "Sending the Patches via Email"? This would make more sense IMHO.
documentation/contributor-guide/submit-changes.rst Anyway, you'll also be able to access the new messages on mailing list archives, · line 412
Quoted 8 lines
documentation/contributor-guide/submit-changes.rst +2
-0+ +Patchtest is available in ``openembedded-core`` as a tool for makingsure
documentation/contributor-guide/submit-changes.rst +5
-0+that your patches are well-formatted and contain important info for +maintenance purposes, such as ``Signed-off-by`` and ``Upstream-Status`` +tags. Once you have generated the patch files and run ``source +oe-init-build-env`` to initialize your workspace, you can run patchtest +like so::Here and in the rest of the patch, could you use "``patchtest``" instead of "Patchtest" or "patchtest"? This would be aligned with the way we refer to other tools such as devtool (see https://git.yoctoproject.org/yocto-docs/tree/documentation/standards.md#n74)
documentation/contributor-guide/submit-changes.rst Anyway, you'll also be able to access the new messages on mailing list archives,
Quoted 6 lines
documentation/contributor-guide/submit-changes.rst +6
-0+ + patchtest --patch <patch_name> + +Where ``/path/to/target/repo`` may (for example) be openembedded-core, +with the actual patchtest tests being kept in +``openembedded-core/meta/lib/patchtest/tests``.Is this sentence relevant here, as "/path/to/target/repo" is not part of the above command line?
Quoted 10 lines
Alternatively, if you
documentation/contributor-guide/submit-changes.rst +6
-0+want patchtest to iterate over and test multiple patches stored in a +directory, you can use:: + + patchtest --directory <directory_name> + +By default, patchtest uses its own modules' file paths to determinewhat
documentation/contributor-guide/submit-changes.rst +2
-0+repository and test suite to check patches against. If you wish to test +patches against a repository other than ``openembedded-core`` and/orQuoted 2 lines
use
+a different set of tests, you can use the --repodir and --testdirUse ``--repodir`` and ``--testdir``.
Quoted 7 lines
documentation/contributor-guide/submit-changes.rst +5
-1+flags:: + + patchtest --patch <patch_name> --repodir <path/to/repo> --testdir <path/to/testdir> + +Finally, note that patchtest is designed to test patches in astandalone
documentation/contributor-guide/submit-changes.rst Anyway, you'll also be able to access the new messages on mailing list archives, · line 439
Quoted 7 lines
documentation/contributor-guide/submit-changes.rst +7
-0+way, so if your patches are meant to apply on top of changes made by +previous patches in a series, it is possible that patchtest will report +false failures regarding the "merge on head" test. + +Using patchtest in this manner provides a final check for the overall +quality of your changes before they are submitted for review by the +maintainers.Very cool, I'm excited to use this tool, including for documentation patches ;-)
Of course, I'll apply your patch when patchtest makes it to oe-core.
Cheers
Michael.