Make fd_count function static in test_fd_tracker.c
[lttng-tools.git] /
1 # LTTng-tools contributor's guide
3 Being an open source project, the LTTng-tools project welcomes
4 contributions from anyone. This guide walks you through the process
5 of contributing a patch to LTTng-tools.
8 ## Getting the source code
10 The LTTng-tools project uses [Git]( for version
11 control. The upstream Git repository URL is:
13 git://
16 ## Coding standard
18 LTTng-tools uses the
19 [Linux kernel coding style](
20 with one addition: single-line `if`/`for`/`while` statements must be
21 wrapped in braces.
23 Example:
25 ~~~ c
26 /* not good */
27 if (this == that)
28 goto fail;
30 /* good */
31 if (this == that) {
32 goto fail;
33 }
34 ~~~
36 Although the LTTng-tools code base is primarily written in C, it does
37 contain shell, Perl, and Python code as well. There is no official coding
38 standard for these languages. However, using a style consistent with the
39 rest of the code written in that language is strongly encouraged.
42 ## Creating and sending a patch
44 LTTng-tools's development flow is primarily email-based, although we
45 also accept pull requests on our
46 [GitHub mirror]( If you're going
47 to create GitHub pull requests, make sure you still follow the
48 guidelines below.
50 Like a lot of open source projects, patches are submitted and reviewed
51 on its development mailing list,
52 [`lttng-dev`](
53 (``). The mailing list is also used to share
54 and comment on <abbr title="Request for Comments">RFC</abbr>s and answer
55 user questions.
57 Once your changes have been committed to your local branch, you may use
58 Git's [`format-patch`]( command
59 to generate a patch file. The following command line generates a
60 patch from the latest commit:
62 git format-patch -N1 -s --subject-prefix="PATCH lttng-tools"
64 The custom `PATCH lttng-tools` subject prefix is mandatory when
65 submitting patches that apply to the LTTng-tools project.
67 The patch's subject (the commit message's first line) should:
69 * begin with an uppercase letter
70 * be written in the present tense
71 * _not_ exceed 72 characters in length
72 * _not_ end with a period
73 * be prefixed with `Fix:` if the commit fixes a bug
75 The commit message's body should be as detailed as possible and explain
76 the reasons behind the proposed change. Any related
77 [bug report(s)](
78 should be mentioned at the end of the message using the `#123` format,
79 where `123` is the bug number:
81 * Use `Refs: #123` if the patch is related to bug 123, but does not
82 fix it yet.
83 * Use `Fixes: #123` to signify that this patch fixes the bug.
85 Make sure to **sign-off** your submitted patches (the `-s` argument to
86 Git's `commit` and `format-patch` commands).
88 Here's a complete example:
90 ~~~ text
91 Fix: use this instead of that in some context
93 Ball tip jowl beef ribs shankle, leberkas venison turducken tail pork
94 chop t-bone meatball tri-tip. Tongue beef ribs corned beef ball tip
95 kevin ground round sausage rump meatloaf pig meatball prosciutto
96 landjaeger strip steak. Pork pork belly beef.
98 Biltong turkey porchetta filet mignon corned beef. T-bone bresaola
99 shoulder meatloaf tongue kielbasa.
101 Fixes: #321
102 Refs: #456
103 Refs: #1987
105 Signed-off-by: Jeanne Mance <>
106 ~~~
108 Please note that patches should be **as focused as possible**. Do not,
109 for instance, fix a bug and correct the indentation of an unrelated
110 block of code as part of the same patch.
112 The project contains a script, [`extras/`](extras/,
113 that performs a number of checks on a patch to ensure it is ready for
114 submission. Run this script on your patch and correct any reported
115 errors before posting it to the mailing list:
117 extras/ --no-tree 0001-Fix...patch
119 Once you are confident your patch meets the required guidelines,
120 you may use Git's [`send-email`](
121 command to send your patch to the mailing list:
123 git send-email --suppress-cc=self --to *.patch
125 Make sure you are
126 [subscribed](
127 to the mailing list to follow and take part in discussions about your
128 changes. You may join the file to an email as an attachment if you can't
129 send the patch directly using <code>git&nbsp;send&#8209;email</code>.
132 ## Reviews
134 Once your patch has been posted to the mailing list or as a GitHub
135 pull request, other contributors may propose modifications.
136 This is completely normal. This collaborative code review is an integral
137 part of the open source development process in general and LTTng-tools
138 makes no exception.
140 Keep in mind that reviewing patches is a time-consuming process and,
141 as such, may not be done right away. The delays may be affected by the
142 current release cycle phase and the complexity of the proposed changes.
143 If you think your patch might have been forgotten, please mention it on
144 the [`#lttng`](irc:// IRC channel rather than
145 resubmitting.
148 ## Release cycle
150 The LTTng-tools project follows a release cycle that alternates between
151 development and release candidate (RC) phases. The master branch is
152 feature-frozen during RC phases: only bug fixes are accepted during
153 this period. However, patches adding new functionality may still be
154 submitted and reviewed during the RC. The upcoming features and release
155 dates are posted in a monthly digest on the mailing list.
This page took 0.044934 seconds and 4 git commands to generate.