~snappy-dev/snapd/+git/snapd-pawel:snapstate-tests-use-ptr

Last commit made on 2020-07-09
Get this branch:
git clone -b snapstate-tests-use-ptr https://git.launchpad.net/~snappy-dev/snapd/+git/snapd-pawel

Branch merges

Branch information

Name:
snapstate-tests-use-ptr
Repository:
lp:~snappy-dev/snapd/+git/snapd-pawel

Recent commits

b32bc4e... by Paweł Stołowski

Fix some snapstate tests to use pointers for snapmgrTestSuite.

434cfcb... by Claudio Matsuoka

Merge pull request #8992 from bboozzoo/bboozzoo/uc20-tweak-boot-naming

boot: better naming of helpers for obtaining kernel command line

248992f... by Maciej Borzecki

boot: better naming of helpers for obtaining kernel command line

Tweak the naming of boot helpers. The command line is actually composed of the
input arguments.

Signed-off-by: Maciej Borzecki <email address hidden>

12b2085... by Maciej Borzecki

Merge pull request #8988 from anonymouse64/bugfix/lp-1886786

many: use more specific check for unit test mocking

58578b3... by Michael Vogt

Merge pull request #8990 from anonymouse64/feature/uc20-snap-bootstrap-does-all-the-things-1

systemd/escape: fix issues with "" and "\t" handling

d75008a... by Ian Johnson

systemd/escape: add additional invalid unit test case, fix comment

The invalid case here causes systemd-escape(1) to fail thusly:

$ systemd-escape -p /a/../b/
Failed to escape string: Invalid argument
$ echo $?
1

however since it's not documented how or why systemd-escape fails like this,
rather than rely on internal implementation details of why systemd-escape fails
here, we just accept our current implementation while testing that we are
consistent with behavior for this type of path. If systemd-escape(1) official
docs ever explain why this is considered invalid then we can try to deny this
too, but until then leaving it as is probably fine.

Signed-off-by: Ian Johnson <email address hidden>

02714f6... by Ian Johnson

systemd/escape: fix issues with "" and "\t" handling

"" is treated as "/", however filepath.Clean("") gives "." which then gets
escaped and is incorrect.

"\t" needs the prefixing 0 in the \x escaping to match systemd-escape(1)
exactly, the easy way to have Go do this automatically is to use %x format spec
with a byte list.

Add many more unit tests here and stop importing the package with "." as it is
slightly confusing.

Signed-off-by: Ian Johnson <email address hidden>

28027b7... by Samuele Pedroni

asserts: small improvements and corrections for sequence-forming assertions' support

Merge pull request #8987 from pedronis/asserts-sequence-forming-small-follow-up

See single commits.

b878294... by Claudio Matsuoka

Merge pull request #8981 from bboozzoo/bboozzoo/uc20-managed-boot-kernel-cmdline

boot, bootloader: query kernel command line of run mod and recovery mode systems

588875e... by Ian Johnson

many: use more specific check for unit test mocking

Currently, if you try to use a snap with an app named "test", os.Args will also
end in ".test", making numerous places in the codebase think that it is being
run in a test environment and behave differently. In the case of the reported
bug, the code panics from `snap run` as it seems to the mountinfo code that we
are not mocking something that we should always be mocking in unit tests.

The bug could still hypothetically happen if someone made a symlink from
somewhere with "go-build" in the path (but not as part of the app name in the
snap) and a .test suffix on the executable, but this is sufficiently specific
that it is highly unlikely we would ever actually run into that problem "in the
wild".

Fixes: https://bugs.launchpad.net/snapd/+bug/1886786

Signed-off-by: Ian Johnson <email address hidden>