]> www.infradead.org Git - users/dedekind/aiaiai.git/log
users/dedekind/aiaiai.git
11 years agoemail-lda: use cover letter subject if available
Jacob Keller [Thu, 9 Jan 2014 23:28:32 +0000 (15:28 -0800)]
email-lda: use cover letter subject if available

Often, a patch series will be sent with a cover letter which describes the
series and is given the '0/n' patch number. Rather than dropping these
patches, keep track of them in series. We do this by checking whether the 1/n
patch has an "In-Reply-To" header. This usually means that their will be an
associated cover letter. Once this is found, rather than sending the patch
directly on to the test program, we use the cover letter's subject by using
formail to add a special "Series-Subject". This makes it so that the
aiaiai-email will end up as a reply to the cover letter which is a bit more
aesthetically pleasing to users.

To help this process, a new "series_is_complete" function is added in place of
the original series complete check. This function reports whether the series
is completely queued, for both cases of cover letter and no cover letter.

Artem:

I've modified this patch.

1. Removed a couple of '[[' bash constructs
2. Also preserved the Message ID of the cover letter to make the reply not only
   have the subject of the cover letter, but also refer the cover letter
   properly.
3. Use common prefix for the special cover letter e-mail headers that we add:
   X-Aiaiai-Cover-Letter-Subject
   X-Aiaiai-Cover-Letter-Message-Id
4. Dropped sponge dependency. Generally, this is a nice tool, and I did not
   hear about it before. I'll definitely start using it when constructing pipes
   in the console. But this tool is not that well-known, so it is not typically
   present in systems. E.g., mine do not have it. And I decided to avoid adding
   another dependency, we already require a lot of tools. Instead, I used
   another trick, which is actual just as elegant as using sponge. Well, needs
   more lines of code, but it is really nice trick anyway, I like it.

   I just open the mbox file, then unlink it, which means it won't be visible
   in the file-system, but won't be deleted since we have the file descriptor
   opened. Then I pipe the data from the file descriptor to 'formail', and
   redirect the results to the mbox file. So a new mbox file will be created
   and all the new contents will be there. I think this is elegant, and does
   not add a new dependency.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-test-patchset: clean up comments some more
Artem Bityutskiy [Wed, 5 Feb 2014 14:23:10 +0000 (16:23 +0200)]
email-test-patchset: clean up comments some more

Just fix poor English and a typo.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-lda: improve consistency and readability
Artem Bityutskiy [Wed, 5 Feb 2014 14:20:13 +0000 (16:20 +0200)]
email-lda: improve consistency and readability

Similarly to what we did in 'aiaiai-email-test-patchset', use 'reply_*'
variable to specify the reply recipient, the Cc list, the subject, and the
message ID. This is a bit easier to read and consistent.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-lda: remove a piece of bashism
Artem Bityutskiy [Wed, 5 Feb 2014 14:19:11 +0000 (16:19 +0200)]
email-lda: remove a piece of bashism

Remove the '==' operator and use the '=' instead. Otherwise 'dash' fails.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-sh-functions: fix e-mail addresses processing
Artem Bityutskiy [Wed, 5 Feb 2014 13:39:30 +0000 (15:39 +0200)]
email-sh-functions: fix e-mail addresses processing

This patch is a bug-fix. It fixes the 'strip_address()' and 'merge_addresses()'
which were for some reason removing all the blanks from the list of addresses.
The result was that "Artem Bityutskiy" became "ArtemBityutskiy".

Instead of removing all blanks, it is supposed to make multiple blanks to
become a single white-space.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-test-patchset: alwasy include the "always_cc" list
Artem Bityutskiy [Wed, 5 Feb 2014 13:22:33 +0000 (15:22 +0200)]
email-test-patchset: alwasy include the "always_cc" list

I do not know when we broke this, but some day that worked, and the "always_cc"
list from the configuration file was always Cced to all replies. But now it is
ignored, which is exactly what this patch fixes.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-test-patchset: further improve readability
Artem Bityutskiy [Wed, 5 Feb 2014 13:08:42 +0000 (15:08 +0200)]
email-test-patchset: further improve readability

This script was confusing and difficult to follow because it used 'to', 'cc',
and 'from' variables when composing the reply. E.g., "to" means the "To:"
header of the patch under test, but when used in context of the reply, we used
it for creating the "Cc:" header. Very confusing and easy to mess things up.

This patch cleans that up. Let's leave 'to', 'cc', 'from', 'subj', and 'id'
variables to represent the _original_ "To:", "Cc:", "From:", "Subj:", and
"Id:".

For replies, introduce 'reply_to', 'reply_cc', 'reply_subj', and 'reply_id'
variables.

The code becames a lot easier to follow with this change.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-test-patchset: minor re-structuring
Artem Bityutskiy [Wed, 5 Feb 2014 12:45:46 +0000 (14:45 +0200)]
email-test-patchset: minor re-structuring

This is another minor clean-up. Let's fetch all the headers we need in one
place. Just for better readability.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-test-patchset: remove a useless variable
Artem Bityutskiy [Wed, 5 Feb 2014 12:41:30 +0000 (14:41 +0200)]
email-test-patchset: remove a useless variable

This is another cosmetic clean-up. Just trying to make this script a bit
smaller and more readable. Remove the 'msgname' variable since we only use it
once.

Also, substitute 'echo' with 'printf', since we are trying to not using echo as
a general policy, see this URL for more infor why echo may be dangeros and
printf is safe:

http://unix.stackexchange.com/questions/65803/why-is-printf-better-than-echo

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-sh-functions: rename project configuration variables
Artem Bityutskiy [Wed, 5 Feb 2014 12:30:25 +0000 (14:30 +0200)]
email-sh-functions: rename project configuration variables

This is another cosmetic change which is supposed to improve the readability.
Let's distinguish between global and project parameters by using slightly
differnet variabls prefix: "cfg_" for global parameters and "pcfg_" for
per-project. Then in the contexts where we do not yet know the project, we'd
not use any of the "pcfg_" variables, and possibly avoid introducing bugs.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-sh-functions: rename cfg_descr
Artem Bityutskiy [Wed, 5 Feb 2014 12:19:11 +0000 (14:19 +0200)]
email-sh-functions: rename cfg_descr

All the configuration variables we use internally have the same name as the
corresponding configuration option. The only exception is 'cfg_descr'. Let's
re-name it to 'cfg_description' to match this pattern and be consistent.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoRename 'make_options' to 'kmake_opts'
Artem Bityutskiy [Wed, 5 Feb 2014 12:14:00 +0000 (14:14 +0200)]
Rename 'make_options' to 'kmake_opts'

The command-line option corresponding to the 'make_options' configuration knob
is called '--kmake-opts'. Let's be consistent and use the same names for both,
just to make things be more logical.

Alternatively, if 'kmake_opts' is not the best name, we could rename both to
'make_options' instead, or to something else.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoTODO: add a note about config file for all other scripts
Artem Bityutskiy [Wed, 5 Feb 2014 12:11:03 +0000 (14:11 +0200)]
TODO: add a note about config file for all other scripts

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoTODO: add a note about make options
Artem Bityutskiy [Wed, 5 Feb 2014 12:08:36 +0000 (14:08 +0200)]
TODO: add a note about make options

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoexample-aiaiai.cfg: add the "make_options" parameter
Artem Bityutskiy [Wed, 5 Feb 2014 12:01:45 +0000 (14:01 +0200)]
example-aiaiai.cfg: add the "make_options" parameter

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoRemove email/aiaiai-email.cfg
Artem Bityutskiy [Wed, 5 Feb 2014 11:56:23 +0000 (13:56 +0200)]
Remove email/aiaiai-email.cfg

I did not notice that we have 'email/aiaiai-email.cfg' file, and created the
'doc/email/example-aiaiai.cfg' file instead. This file has more comments and
looks better, so let's delete the old file and leave the new one.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoSwitch to dash when possible
Artem Bityutskiy [Wed, 5 Feb 2014 10:14:03 +0000 (12:14 +0200)]
Switch to dash when possible

Aiaiai is written in a portable manner, meaning that it does not use Bash
features and should work with different shells, like dash and ksh. Actually,
dash is a nice, small, and fast shell implementing only POSIX feature (or may
be mostly), and it is good to use it when it is available. This will ensure
that we do not accidentally break protability.

This patch adds a small code snippet to each script which will check if dash is
installed in the system, and if it is, "re-start" with dash.

People hacking on Aiaiai are encouradge to install the 'dash' package on their
systems.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-test-patchset: add support for Make options.
Jacob Keller [Thu, 9 Jan 2014 23:28:26 +0000 (15:28 -0800)]
email-test-patchset: add support for Make options.

aiaiai-test-patchset has support for kernel make options which allows the
user to have more fine grained control over the compilation process. However,
the email form did not support passing these options to the test program. This
patch adds a configuration (per project) for specifying make options, so that
the user can have this fine grained control over the kernel build process.

Artem: amend commentaries a bit.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoTODO: add a note about separating all internal scripts
Artem Bityutskiy [Wed, 5 Feb 2014 09:47:59 +0000 (11:47 +0200)]
TODO: add a note about separating all internal scripts

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years ago.gitignore: correct pathe for compiled tools
Artem Bityutskiy [Wed, 5 Feb 2014 09:45:14 +0000 (11:45 +0200)]
.gitignore: correct pathe for compiled tools

Paths for 'remap-log' and 'aiaiai-locker' have changed. Reflect this in the
.gitconfig file. This will prevent 'git clean' from removing them.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoTODO: add another entry
Artem Bityutskiy [Wed, 5 Feb 2014 09:38:23 +0000 (11:38 +0200)]
TODO: add another entry

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoTODO: remove a note about own checkpatch.pl copy
Artem Bityutskiy [Tue, 4 Feb 2014 17:23:24 +0000 (19:23 +0200)]
TODO: remove a note about own checkpatch.pl copy

We've removed the copy of checkpatch.pl, so amend the TODO note.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoaiaiai: remove checkpatch.pl from repository
Jacob Keller [Thu, 9 Jan 2014 23:28:21 +0000 (15:28 -0800)]
aiaiai: remove checkpatch.pl from repository

This patch removes the file tracked in this repository, since we now use the
in-kernel checkpatch version, or a user specified location. This enables
better control of what checkpatch.pl is used for those who care, without
having to manually update the file in git every time there is a change
upstream.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agotest-patchset: stop using own copy of checkpatch.pl
Artem Bityutskiy [Tue, 4 Feb 2014 17:18:16 +0000 (19:18 +0200)]
test-patchset: stop using own copy of checkpatch.pl

Own copy of checkpatch.pl tends to be out-of-date. Start using
checkpatch.pl from the tree we test against instead.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agotest-patchset: remove a couple of comments
Artem Bityutskiy [Tue, 4 Feb 2014 16:37:21 +0000 (18:37 +0200)]
test-patchset: remove a couple of comments

Remove a couple of comments containing phrase "screw up". These comments do not
look very useful, and "screw up" may sound a bit harsh.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-test-patchset: be silent
Artem Bityutskiy [Tue, 4 Feb 2014 16:34:28 +0000 (18:34 +0200)]
email-test-patchset: be silent

This patch is rather cosmetic. It basically makes the script stop printing
information to stdout and instead, print only with the verbose messages.

Indeed, this little information is useless anyway, it does not tell enough
about what really goes on. So let's just move it to the verbose output.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-test-patchset: improve readability
Artem Bityutskiy [Tue, 4 Feb 2014 15:54:40 +0000 (17:54 +0200)]
email-test-patchset: improve readability

I've noticed that this script is rather difficult to read because of many
"DocHere" usage, which break indentation. These are used when we send replies
back to the patch submitter.

This patch is an attempt to improve this. It introduces a number of helper
functions which incorporate the e-mail sending. The main script then contains
just a function calls, which improves readability.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoRevert "Remove --check-only option support"
Artem Bityutskiy [Tue, 4 Feb 2014 15:40:25 +0000 (17:40 +0200)]
Revert "Remove --check-only option support"

This reverts commit dbaf970c857e2a6fda9f6fd418bc873e5eb391cb.

The idea to revert was stupid. This option is used internally to optimize
Aiaiai and only check those files which were modified by the patch under test.
Thus, reverting the change.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoexample-aiaiai.cfg: refine the meaning of project description option
Artem Bityutskiy [Tue, 4 Feb 2014 15:25:53 +0000 (17:25 +0200)]
example-aiaiai.cfg: refine the meaning of project description option

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-test-patchset: fix projects list generation
Artem Bityutskiy [Tue, 4 Feb 2014 15:17:49 +0000 (17:17 +0200)]
email-test-patchset: fix projects list generation

This patch fixes the 'list_projects()' which did not work because it was using
the 'cfg_descr' variable which was undefined. Indeed, this function is called
when the user either forgot to specify the project, or specified a non-existing
project.

This patch uses 'ini_config_get_or_die' to get project description. The whole
loop conctruct is cleaned up a bit too to make it more readable.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-sh-functions: "export" __ini_config_get_or_die
Artem Bityutskiy [Tue, 4 Feb 2014 15:07:30 +0000 (17:07 +0200)]
email-sh-functions: "export" __ini_config_get_or_die

In this project we try to mark all internal functions with leading "__". Of
course, we do this only for "shared" files like "aiaiai-email-sh-functions".
Any symbol which is not supposed to be used ouside of the shared function
starts with "__".

Thie patch removes the prefix from the "__ini_config_get_or_die" helper because
we will need it in the next patch.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-test-patchset: fix a typo in the help output
Artem Bityutskiy [Tue, 4 Feb 2014 14:51:40 +0000 (16:51 +0200)]
email-test-patchset: fix a typo in the help output

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-test-patchset: clean-up commentary
Artem Bityutskiy [Tue, 4 Feb 2014 14:27:59 +0000 (16:27 +0200)]
email-test-patchset: clean-up commentary

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-test-patchset: move project configuration parsing down a bit
Artem Bityutskiy [Tue, 4 Feb 2014 14:25:09 +0000 (16:25 +0200)]
email-test-patchset: move project configuration parsing down a bit

This patch is a little clean-up which makes the code a bit more consistent. It
makes sure we first check if the user specified the project, and only then try
to parse project configuration, not vice-versa.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoTODO: add some items more to the wishlist
Artem Bityutskiy [Tue, 4 Feb 2014 13:57:50 +0000 (15:57 +0200)]
TODO: add some items more to the wishlist

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agochecker: fix a typo
Artem Bityutskiy [Mon, 3 Feb 2014 16:03:25 +0000 (18:03 +0200)]
checker: fix a typo

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoRemove --check-only option support
Artem Bityutskiy [Mon, 3 Feb 2014 16:00:04 +0000 (18:00 +0200)]
Remove --check-only option support

This patch removes the --check-only option because it is useless. I never used
it, and I did not see anyone using it.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoRemove URLs with old cross-compilers
Artem Bityutskiy [Mon, 3 Feb 2014 15:35:49 +0000 (17:35 +0200)]
Remove URLs with old cross-compilers

Cross-compilers at https://www.kernel.org/pub/tools/crosstool/ are old and not
maintained up-to-date anymore. Lets not recommend it to the users.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agodoc: refresh the Aiaiai overview text
Artem Bityutskiy [Mon, 3 Feb 2014 15:17:03 +0000 (17:17 +0200)]
doc: refresh the Aiaiai overview text

Rename the 'README.announcement' file to descriptive 'Overview.txt'. Refresh
its contents too. This file is supposed to give general information about what
Aiaiai is.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-sh-functions: add local variables to parse_prj_config
Jacob Keller [Thu, 9 Jan 2014 23:28:10 +0000 (15:28 -0800)]
email-sh-functions: add local variables to parse_prj_config

Rather than assuming that the $cfgfile and $prj will be correctly defined, use
the passed parameters. Use local to create local variables to use, just like
in the regular config parsing.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-test-patchset: fix a bug when project is unknown
Jacob Keller [Thu, 9 Jan 2014 23:28:05 +0000 (15:28 -0800)]
email-test-patchset: fix a bug when project is unknown

This patch corrects an issue due to attempting to use cfg_reply_to_all (a
per-project configuration option) before we have checked whether the project
is valid. This causes the whole aiaiai-email service to die. To fix this, move
the checks for no project and unknown project above the cfg_reply_to_all use.
Also unassign the to variable when sending these emails so that we don't spam
everyone, (regardless of the reply_to_all setting). This restores the behavior
to the previous default.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoaiaiai-email-lda: help output clean-up
Artem Bityutskiy [Mon, 3 Feb 2014 09:08:04 +0000 (11:08 +0200)]
aiaiai-email-lda: help output clean-up

Clean-up the help output a bit:
  * use <config.ini> consistently
  * mention <config.ini> at the first "usage" line.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agodoc: add the TODO list
Artem Bityutskiy [Mon, 3 Feb 2014 08:04:45 +0000 (10:04 +0200)]
doc: add the TODO list

Add the TODO file. I've added some of my current wishes there. This does not
mean that I am going to implement this. But may be some time, when I have time
or if users request. Or may be someone else implements one of those.

Others are welcome to add more wishes there too.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agodoc: add example-aiaiai.cfg
Artem Bityutskiy [Mon, 3 Feb 2014 08:04:11 +0000 (10:04 +0200)]
doc: add example-aiaiai.cfg

Add an example configuration file for the Aiaiai e-mail front-end.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agotest-patchset: remove junk comma
Artem Bityutskiy [Wed, 11 Dec 2013 08:52:24 +0000 (10:52 +0200)]
test-patchset: remove junk comma

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agotest-bisectability: print full config name
Artem Bityutskiy [Wed, 4 Dec 2013 15:44:11 +0000 (17:44 +0200)]
test-bisectability: print full config name

Print full configration name, not just the defconfig name.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agotest-bisectability: do not print base commit failure details
Artem Bityutskiy [Wed, 4 Dec 2013 15:20:25 +0000 (17:20 +0200)]
test-bisectability: do not print base commit failure details

Now, when we allow for the base commit to be broken if the first patch fixes
it, it makes little sense providing the base commit failure details in that
case.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agotest-bisectability: restructure the code a little bit
Artem Bityutskiy [Wed, 4 Dec 2013 12:23:10 +0000 (14:23 +0200)]
test-bisectability: restructure the code a little bit

This commit does not do any functional changing, just some re-structuring and
renaming as a preparation to the next change.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoImprove help output
Artem Bityutskiy [Wed, 4 Dec 2013 09:43:18 +0000 (11:43 +0200)]
Improve help output

This is a cosmetic patch. It changes globally:

s/working directory/work directory/

And it fixes the bogus 'aiaiai-diff-log' help output.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agodiff-log-helper: group lines starting with "make:"
Artem Bityutskiy [Wed, 4 Dec 2013 09:38:26 +0000 (11:38 +0200)]
diff-log-helper: group lines starting with "make:"

Thie makes the diff look a tiny bit nice when there is a build failure.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agobisectability: don't fail if base commit can't compile
Jacob Keller [Mon, 25 Nov 2013 18:57:03 +0000 (10:57 -0800)]
bisectability: don't fail if base commit can't compile

This makes the bisectability test only fail when it can't compile
inbetween a patch series. It is perfectly reasonable that the first
patch in the series could fix the compile issue, so we should still
check the patch for bisection issues.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agotest-patchset: improve build failure output
Artem Bityutskiy [Wed, 4 Dec 2013 07:33:10 +0000 (09:33 +0200)]
test-patchset: improve build failure output

The previous patch made it acceptable for the base commit to fail. However, the
e-mail message we generate in this case contained something like:

"Failed to build the following commit for configuration ..."

which is not too readable, because it does not make it clear that this is the
base commit which fails to compile.

This patch improves the output and makes it look like this:

"Failed to build base commit ..."

This is just a bit nicer.

Additionally, when the base commit fails, and the first patch fixes it, the
resulting build diff is rather messy. This patch makes aiaiai-test-patchset
print a short explanation for the messy build diff.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agotest-patchset: don't skip email when pre-patch build fails
Jacob Keller [Mon, 25 Nov 2013 18:56:37 +0000 (10:56 -0800)]
test-patchset: don't skip email when pre-patch build fails

Currently, whenever the pre-patched kernel fails to build, we
don't show the results for the post-patched kernel. This is faulty,
because we could easily be providing a patch which fixes the issue.
Instead, we should show the results for the failed build, but still
continue. If the post-patched kernel fails to build there is little need
to show a complex diff, but we can at least show the results for both
the pre-patched and post-patched kernel.

This patch also additionally adds --keep-going to the pre-patched kernel
in order to obtain more data for comparison.

Artem: add a commentary

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agotest-patchset: add a perl check
Artem Bityutskiy [Tue, 3 Dec 2013 13:30:06 +0000 (15:30 +0200)]
test-patchset: add a perl check

Check that the perl interpreter is available.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoUse a helper for the 'fatal()' function
Artem Bityutskiy [Mon, 2 Dec 2013 12:14:04 +0000 (14:14 +0200)]
Use a helper for the 'fatal()' function

Unfortunately libshell's "fatal()" does not prefix messages with an "Error"
prefix. Introduce a new helper called "die()" which prepends messages with
"Fatal error".

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agosh-functions: protect from double inclusion
Artem Bityutskiy [Mon, 2 Dec 2013 12:10:34 +0000 (14:10 +0200)]
sh-functions: protect from double inclusion

Add simple protection against double inclusion of the shared sh files.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-lda: honor 'always_cc' and 'reply_to_all'
Artem Bityutskiy [Mon, 2 Dec 2013 08:56:31 +0000 (10:56 +0200)]
email-lda: honor 'always_cc' and 'reply_to_all'

When rejecting a patch we should try to honor the 'always_cc' and
'reply_to_all' per-project configuration variables. This patch does exactly
that - parses the 'To' and 'Cc' list, finds out which project the e-mail
belongs to, parses the config file and CCes the 'always_cc' list, as well as
preserves the 'To' and 'Cc' addresses if 'reply_to_all' is true.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-lda: send a reply when chaining was incorrect
Artem Bityutskiy [Mon, 2 Dec 2013 08:28:01 +0000 (10:28 +0200)]
email-lda: send a reply when chaining was incorrect

This patch is based on Jacob Keller's work. It teaches the aiaiai-email-lda
script sending rejection notifications to the patch submitter. Right now it
only sends a reply when the submitter missed the 'In-Reply-To:' e-mail header.
Later more conditions may be added.

At the moment we do not CC the 'always_cc' list, neither honor the
'reply_to_all' flag. This may be changed later, if needed.

I've added several 'program_required's too, I was too lazy to separate them,
again, sorry.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-lda: introduce --test-mode option
Artem Bityutskiy [Mon, 2 Dec 2013 08:00:31 +0000 (10:00 +0200)]
email-lda: introduce --test-mode option

We are going to teach this script sending replies, and this option will disable
the functionality, just like in the aiaia-email-test-patchset script. This
patch is just a preparation.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-lda: start parsing the configuration file
Artem Bityutskiy [Fri, 29 Nov 2013 16:49:19 +0000 (18:49 +0200)]
email-lda: start parsing the configuration file

This is a preparation for the further changes where we teach the email-lda
script sending notifications when it rejects a patch. We'll need to know some
basic information like own e-mail address, and this is stored in the config
file. So parse it.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-sh-functions: rework e-mail sending some more
Artem Bityutskiy [Fri, 29 Nov 2013 16:43:28 +0000 (18:43 +0200)]
email-sh-functions: rework e-mail sending some more

Leave only the email composition stuff in the common code, and move the e-mail
sending stuff to email-test-patchset. This way the common code does not depend
on the "verbose" and "test_mode" variables anymore, which is a bit cleaner.

Plus add an explicit check that mutt is present.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-sh-functions: misc improvements
Artem Bityutskiy [Fri, 29 Nov 2013 14:46:17 +0000 (16:46 +0200)]
email-sh-functions: misc improvements

This is a huge patch and it should really be split. But I am being lazy and
committing all at once. Yes, this is bad, sorry, but I am trying to save time.

Anyway, this patch does 2 big changes:

1. Improves the strip_address function so that it does not anymore depend on
   any global 'cfg_*' variables and gets the e-mail address to strip as a
   parameter.

2. Simplifies the 'compose_email' function interface and teach it to get a
   single list of addresses to CC. This required some an additional function
   for merging 2 lists of e-mails. But the end result is that
   email-test-patchset becomes simpler.

I have tested this patch.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoaiaiai-checker: used printf for printing uncontrolled data
Artem Bityutskiy [Fri, 29 Nov 2013 15:34:35 +0000 (17:34 +0200)]
aiaiai-checker: used printf for printing uncontrolled data

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-test-patchset: move compose_email to email-sh-functions
Artem Bityutskiy [Fri, 29 Nov 2013 13:05:49 +0000 (15:05 +0200)]
email-test-patchset: move compose_email to email-sh-functions

Move the 'compose_email' function to the shared file so that it could be used
by other scripts.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-test-patchset: move config handling to email-sh-functions
Artem Bityutskiy [Fri, 29 Nov 2013 11:04:03 +0000 (13:04 +0200)]
email-test-patchset: move config handling to email-sh-functions

We are going to need configuration file parsing functions in the email-lda
script, so move them to the shared file.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail.cfg: refine the configuration file example
Artem Bityutskiy [Fri, 29 Nov 2013 11:04:03 +0000 (13:04 +0200)]
email.cfg: refine the configuration file example

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-test-patchset: move ini_config_get_or_die
Artem Bityutskiy [Thu, 28 Nov 2013 15:38:51 +0000 (17:38 +0200)]
email-test-patchset: move ini_config_get_or_die

Move the ini_config_get_or_die helper function to the aiaiai-email-sh-functions
file, since it will be used by other components as well soon.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-sh-function: new file for shared e-mail code
Artem Bityutskiy [Thu, 28 Nov 2013 12:44:53 +0000 (14:44 +0200)]
email-sh-function: new file for shared e-mail code

Let's have a separate file for the shared code which is only relevant to
e-mail handling. For now we only have the subject parsing there, but we'll add
more stuff to this file later.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-test-patchset: fix breakage introduced recently
Artem Bityutskiy [Thu, 28 Nov 2013 15:12:15 +0000 (17:12 +0200)]
email-test-patchset: fix breakage introduced recently

Commit '07837a6 email-test-patchset: add cppcheck support' introduced a
breakage by adding an unexisting variable named "commit", which causes the
following error:

aiaiai-email-test-patchset: line 334: commit: unbound variable

The variable should be named 'branch'. This patch fixes the problem.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-dispatcher: verify that inotifywait is present in the system
Artem Bityutskiy [Thu, 28 Nov 2013 15:01:42 +0000 (17:01 +0200)]
email-dispatcher: verify that inotifywait is present in the system

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agodoc: document e-mail setup some more
Artem Bityutskiy [Thu, 28 Nov 2013 14:21:13 +0000 (16:21 +0200)]
doc: document e-mail setup some more

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agolda: amend forgotten fetch_header_or_die call
Artem Bityutskiy [Thu, 28 Nov 2013 12:50:28 +0000 (14:50 +0200)]
lda: amend forgotten fetch_header_or_die call

We changed the interface for the 'fetch_header_or_die()' function, but forgot
to amend one place in aiaia-email-lda. Fix this.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agosh-functions: use ? instead of {0,1}
Artem Bityutskiy [Thu, 28 Nov 2013 08:32:35 +0000 (10:32 +0200)]
sh-functions: use ? instead of {0,1}

... since the former is shorter.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agosh-functions: change subject parsing
Artem Bityutskiy [Wed, 27 Nov 2013 13:30:19 +0000 (15:30 +0200)]
sh-functions: change subject parsing

This patch change subject parsing so that it would allow a prefix before the
PATCH keyword: [Prefix PATCH Suffix m/n], as Jacob Keller requested.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agosh-functions: rename __prfx to __blah
Artem Bityutskiy [Wed, 27 Nov 2013 13:00:24 +0000 (15:00 +0200)]
sh-functions: rename __prfx to __blah

I am going to add support for [Prefix PATCH Suffix n/n] subject, so
the prefix word would be needed, and thus in this patch I use word
"blah" for the [blah] prefixes.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agosh-funcions: introduce another helper variable - __blank
Artem Bityutskiy [Wed, 27 Nov 2013 12:58:43 +0000 (14:58 +0200)]
sh-funcions: introduce another helper variable - __blank

Introduce a helper variable for a single blank, which is supposed to make
the code a bit more readable.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agosh-function: rename __ws to __blanks
Artem Bityutskiy [Wed, 27 Nov 2013 12:46:22 +0000 (14:46 +0200)]
sh-function: rename __ws to __blanks

The internal __ws variable is a short-cut for "zero or reasonable amount of
white-space or tab characters". This patch renames it to "__blanks", which
is a bit more readable. Additionally I make the reasonable amount to be 8
blanks instead of 4.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-lda: use case insensitive match when searching for reply headers
Jacob Keller [Mon, 25 Nov 2013 18:56:47 +0000 (10:56 -0800)]
email-lda: use case insensitive match when searching for reply headers

This patch helps make aiaiai a bit more robust by using case insensitive
search for the in-reply-to header searches.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agotest-subj-parsing: add a test for subject parsing
Artem Bityutskiy [Wed, 27 Nov 2013 11:41:28 +0000 (13:41 +0200)]
test-subj-parsing: add a test for subject parsing

Add a test which verifies that e-mails subject parsing works as expected.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agosh-functions: refine the 'prefix_format' variable
Artem Bityutskiy [Wed, 27 Nov 2013 11:42:21 +0000 (13:42 +0200)]
sh-functions: refine the 'prefix_format' variable

First of all, the whole subject parsing thing belongs to the e-mail stuff, so
it really should be moved to the email sub-directory.

The 'prefix_format' is a variable which is supposed to explain in a short form
what is the format of the subject we expect. Currently we have a confusing
<project> part there, and this patch removes it. I do not think the result is
ideal, since it does not tell that the format is rather flexible, but still
it is a bit better. Later we can change this to something better.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agosh-functions: fix print_separator
Jacob Keller [Tue, 26 Nov 2013 22:35:06 +0000 (14:35 -0800)]
sh-functions: fix print_separator

print_separator needs to be run as a subshell, because we need its output, not
the string itself. This fixes a print display bug where we show
"print_separator" instead of the actual separator.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoaiaiai: don't assume kernel tree will be checked out
Jacob Keller [Tue, 26 Nov 2013 20:02:17 +0000 (12:02 -0800)]
aiaiai: don't assume kernel tree will be checked out

This change addresses a possible issue if someone uses a bare repsitory
as their remote. We handle this by using a new sh-function git_dir()
which will return $path/.git if that is a directly, then path if that is
a directory, or will complain if it's not a valid directory. This
enables us to automatically use the correct directory without issue even
if the repository is bare.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail: fix ini_config_get_or_die
Artem Bityutskiy [Tue, 26 Nov 2013 17:03:33 +0000 (19:03 +0200)]
email: fix ini_config_get_or_die

Similarly to what we did in the previous patch, change ini_config_get_or_die
interface so that the caller would not have to call it in a subshell, which
makes dying impossible.

I did not dest this patch.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoFix fetch_header_or_die
Artem Bityutskiy [Tue, 26 Nov 2013 16:52:44 +0000 (18:52 +0200)]
Fix fetch_header_or_die

The fetch_header_or_die function is suppoed to make the caller exit if the
header is not found. However, this did not happen, because the interface of
this function assumed that it is called in a subshell in order to intercept the
results. And the exiting happened in the subshell, which did not affect the
caller at all.

Fix this issue by changing the interface of fetch_header_or_die() so that the
result is written to the first parameter.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoRevert "aiaiai: make formail allow non-strict mbox format"
Artem Bityutskiy [Tue, 26 Nov 2013 15:53:17 +0000 (17:53 +0200)]
Revert "aiaiai: make formail allow non-strict mbox format"

Unfortunately, -d makes formail split patches at unexpected places.

This reverts commit bdbd0321b40c10a51f4f084809eb26c91dcd4729.

11 years agotest-patchset: check that defconfig exists
Artem Bityutskiy [Tue, 26 Nov 2013 15:23:33 +0000 (17:23 +0200)]
test-patchset: check that defconfig exists

Make sure the defconfig exists before we start building with it.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agodoc: smatch does not install own sparse anymore
Artem Bityutskiy [Tue, 26 Nov 2013 14:24:10 +0000 (16:24 +0200)]
doc: smatch does not install own sparse anymore

... well, actually it does, but it calls it "sparsec".

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agodoc: tell that aiaiai needs the 'patch' tool
Artem Bityutskiy [Tue, 26 Nov 2013 13:03:54 +0000 (15:03 +0200)]
doc: tell that aiaiai needs the 'patch' tool

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agobisectability: fixup comment in compile_test
Jacob Keller [Mon, 25 Nov 2013 18:56:57 +0000 (10:56 -0800)]
bisectability: fixup comment in compile_test

We aren't testing the base commit here, we are patching the kernel and
testing the particular commit.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agotest-patchset: ignore sign-off for the combined patch
Jacob Keller [Mon, 25 Nov 2013 18:56:30 +0000 (10:56 -0800)]
test-patchset: ignore sign-off for the combined patch

We only need to check the sign-off on the individual patches, rather
than on the combined patch, as this patch is created only for our
internal use.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agosh-functions: show merge results when patch fails to apply
Jacob Keller [Mon, 25 Nov 2013 18:56:25 +0000 (10:56 -0800)]
sh-functions: show merge results when patch fails to apply

This patch enables the email notification an attempt at showing you the
result of a merge based on the patch utility. This might enable more
easily debugging why a patch failed to apply.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoaiaiai: make formail allow non-strict mbox format
Jacob Keller [Mon, 25 Nov 2013 18:56:15 +0000 (10:56 -0800)]
aiaiai: make formail allow non-strict mbox format

Sometimes patches are not properly emailed in strict mbox format. This
can result in some bogus issues, which are simply automatically resolved
by just working in non-strict mbox format. This patch makes sure all
executions of formail accept non-strict formats.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-test-patchset: add cppcheck support
Jacob Keller [Mon, 25 Nov 2013 18:56:02 +0000 (10:56 -0800)]
email-test-patchset: add cppcheck support

The aiaiai-email-test-patchset script did not have a cppcheck option,
even though the lower level aiaiai-test-patchset supports this. Add the
option along with the other check options.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-test-patchset: allow a configuration directory
Jacob Keller [Mon, 25 Nov 2013 18:55:57 +0000 (10:55 -0800)]
email-test-patchset: allow a configuration directory

The aiaiai-test-patchset has a configuration directory option, but the
aiaiai-email-test-patchset does not have this option. Update the
email-test-patchset script to support passing this option onto the lower
level aiaiai-test-patchset script.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agomake-kernel: add parameter to enable endian checking
Jacob Keller [Mon, 25 Nov 2013 18:55:52 +0000 (10:55 -0800)]
make-kernel: add parameter to enable endian checking

Endian checking is not turned on by default, and requires a separate
parameter in order to enable it. As it can be quite useful to have, this
patch adds the proper syntax to enable it when the kernel checker is
enabled.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agochecker: use -Wsparse-all to enable more checks
Jacob Keller [Mon, 25 Nov 2013 18:55:47 +0000 (10:55 -0800)]
checker: use -Wsparse-all to enable more checks

sparse does not have all of its warnings on by default. This patch
enables some extra checks which were not being done before.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agosh-functions: rename fetch_all_headers
Jacob Keller [Mon, 25 Nov 2013 18:55:40 +0000 (10:55 -0800)]
sh-functions: rename fetch_all_headers

The fetch_all_headers name is not descriptive, as it actually splits the
mailbox up and processes the first header of each message. It does not
obtain every copy of a given header from the mbox. This patch renames
the function, and updates the comment so that it is clear what the
function does.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoaiaiai: use --shared since we know we will be safe
Jacob Keller [Mon, 25 Nov 2013 18:55:35 +0000 (10:55 -0800)]
aiaiai: use --shared since we know we will be safe

We want to use a shared clone here, because it will prevent duplicate copies
of all the object data, and we know it will be ok, since we won't be mucking
with the tree, and the commits will be tagged.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agomake-kernel: fix --keep-going option
Jacob Keller [Mon, 25 Nov 2013 18:55:30 +0000 (10:55 -0800)]
make-kernel: fix --keep-going option

The make-kernel utility has an option "--keep-going" which can be useful
if you want to continue testing past kernel build failures, in order to try
and find as many issues as you can. However, it previously did not work,
as getopt-long format required a parameter, and the case statement did
not check for the correct long syntax.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-test-patchset: always_cc is not required
Jacob Keller [Mon, 25 Nov 2013 18:55:25 +0000 (10:55 -0800)]
email-test-patchset: always_cc is not required

We do not require always_cc, so we should not die when it is not
available.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>