plainbox:providers:stubbox: disable strict validation

Strict validation will never work on stubbox, because it's full of
representative data, including deprecated constructs.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
plainbox:providers:stubbox: add test attachment jobs

This patch adds a collection of stubbox jobs for testing attachments.

    stub/text-attachment: prints (and captures) a small UTF-8 encoded
    piece of text. It can catch errors in handling output encoding

    stub/large-text-attachment: prints (and captures) a large UTF-8
    encoded piece of text. It can catch errors related to buffering.

    stub/binary-attachment: prints (and captures) a
    specifically-difficult-to-handle binary data consisting of all 256
    bytes

    stub/large-binary-attachment: prints (and captures) a large binary
    blob to test handling of memory efficiency.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
plainbox:excmd: don't expose non-blocking pipes to children

This patch fixes a bug in the glibc-based extcmd implementation.

The communication pipes that are created to pass stdout and stderr data
were created in non-blocking mode and that non-blocking pipe was exposed
to the child process. A child process writing fast enough could fill the
pipe and get EAGAIN. Since applications are not generally designed to
handle that it would cause random failures.

The fix based on creating normal (blocking) pipes and only set the
non-blocking mode in the parent process that has an event loop.

Fixes: https://bugs.launchpad.net/plainbox/+bug/1401886

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
plainbox:commands:session: add global default for --only-ids

This patch adds a gobal default value for the 'only_ids' attribute of
the 'plainbox session' command parser. This works around a bug where
plainbox crashes if 'plainbox session list' is executed as a default
command via 'plainbox session'.

Fixes: https://bugs.launchpad.net/plainbox/+bug/1401927

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
"automatic merge of lp:~zkrynicki/checkbox/attachment-fixes/ by tarmac [r=sylvain-pineau][bug=1401886][author=zkrynicki]"
"automatic merge of lp:~zkrynicki/checkbox/fix-1401927/ by tarmac [r=sylvain-pineau][bug=1401927][author=zkrynicki]"