Recent activity

[PATCH] CI: add wine on Linux for the Windows e2e test 22 days ago

From Daniel Martí to ~eliasnaur/gio-patches

Installing it on Debian was enough, with the only wrinkle that
propagating -race won't work when we're cross-compiling, since
cross-compilation disables CGo by default.

For now, just skip the test in that edge case. If we want to use the
race detector on Windows in the future, we need to get a Windows CI
builder somehow.

Tested on my fork; see https://builds.sr.ht/~mvdan/job/164899.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
---
 .builds/linux.yml         | 1 +
 cmd/gogio/windows_test.go | 5 +++++
[message trimmed]

[PATCH] cmd/gogio: add the first Windows e2e test via Wine 25 days ago

From Daniel Martí to ~eliasnaur/gio-patches

Since Wine is heavily tied to X11, we build its end-to-end test driver
on top of X11's. We use the same mechanism to start an X server, take
screenshots, and issue clicks.

Its only quirk is that it was difficult to get the screenshots to line
up with Gio's window. The comments cover what we ended up with. The
display dimensions are now part of driverBase, so that methods other
than Start can also use them - this is necessary for the wine driver to
crop screenshots.

We also use a sleep for now; a comment explains why, and a TODO is left
for future Dan to deal with. What we have now works, and I've spent
enough hours on this patch as it is.
[message trimmed]

[PATCH] cmd/gogio: reuse the test binary to call gogio in the e2e tests 27 days ago

From Daniel Martí to ~eliasnaur/gio-patches

We were using 'go run . <args>' before, which works fine, but does mean
re-linking a new binary and throwing it away at each invocation. Given
that the end-to-end tests don't do all that much work besides building
the tiny red.go app, this amount of extra work was noticeable.

We can obtain statistics for the JS sub-test, which used 'go run', via
the perflock and benchcmd tools:

	$ go test -c
	$ perflock -governor=70% benchcmd EndToEnd/JS ./gogio.test -test.run=EndToEnd/JS

After capturing those numbers before and after the change, we can then
compare them with benchstat. The CPU cost of the subtest is halved:
[message trimmed]

[PATCH] cmd/gogio: groundwork for Windows e2e tests on Wine 28 days ago

From Daniel Martí to ~eliasnaur/gio-patches

First, move from debian unstable to testing, since sway was promoted to
testing as of earlier this week.

Second, use the --sync option when using xdotool to move an X11 mouse.
This makes the command block until the mouse has finished moving to the
specified location, removing a potential race with the following
'xdotool click' command.

Third, deduplicate some logic into driverBase: tempDir to create a
temporary directory within a test, and needPrograms to skip a test if
the required programs aren't available.

Lastly, split the code that starts the X11 server into a method, so that
the future Wine e2e driver can reuse it. Since Wine is tightly coupled
[message trimmed]

[PATCH] .builds: re-add sway on Debian a month ago

From Daniel Martí to ~eliasnaur/gio-patches

It passes now, thanks to the recent work to add retries to screenshots.

If it turns out to still not be reliable enough, we can look at this
again.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
---
 .builds/linux.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.builds/linux.yml b/.builds/linux.yml
index 4d25802..878410d 100644
--- a/.builds/linux.yml
+++ b/.builds/linux.yml
[message trimmed]

[PATCH v2] lib: fix an out of bounds panic in the server a month ago

From Daniel Martí to ~sircmpwn/aerc

If the message doesn't contain ':', we don't properly discard the
message, so we end up slicing it like msg[:-1].

This can be reproduced if one runs 'aerc foo', as the server receives
'foo' as the message.

'aerc foo' still doesn't do anything very user friendly, but at least it
doesn't panic horribly.

While at it, do the 'got message' log at the very beginning, so that the
user can see what message the server got before reporting the command as
invalid.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
[message trimmed]

Re: [PATCH] lib: fix an out of bounds panic in the server a month ago

From Daniel Martí to ~sircmpwn/aerc

On Wed, Feb 12, 2020 at 22:15:52 +0100, Reto wrote:
> Can you put the logging above the continue please? That way the user
> at least sees what was going on instead of just "invalid command"

Sure, good idea. I'll send a v2.

git-send-email noob here, btw - is there a way to reply to this, plus
send a v2 patch, in a single email? Without having to copy-paste your
quote above, or otherwise do manual steps.

https://git-send-email.io/#step-4 does cover this scenario, but as far
as I can tell it's going to be a new email thread.

[PATCH] lib: fix an out of bounds panic in the server a month ago

From Daniel Martí to ~sircmpwn/aerc

If the message doesn't contain ':', we don't properly discard the
message, so we end up slicing it like msg[:-1].

This can be reproduced if one runs 'aerc foo', as the server receives
'foo' as the message.

'aerc foo' still doesn't do anything very user friendly, but at least it
doesn't panic horribly.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
---
 lib/socket.go | 1 +
 1 file changed, 1 insertion(+)
[message trimmed]

[PATCH] cmd/gogio: introduce retries with backoff to the e2e tests a month ago

From Daniel Martí to ~eliasnaur/gio-patches

Right now, this was badly needed for the wayland subtest, as it seems
like waiting for a frame to be ready wasn't enough for the screenshot to
show what we want. In practice, even if the machine was idle, it could
sometimes take a few extra milliseconds for the app to first appear on
the display.

This was worse when the machine is under stress, which is often the case
with CI. For example, the command below showed a ~20% failure rate on my
laptop with four cores:

	go test -c -o test && stress ./test -test.run EndToEnd/Wayland

Add a generic withRetries helper function, which allows us to keep
trying some action up to a timeout, with sleeps in between that start at
[message trimmed]

[PATCH] .builds: switch to Go 1.14rc1 release downloads a month ago

From Daniel Martí to ~eliasnaur/gio-patches

On Linux and FreeBSD, this means we no longer need to install Go twice,
since we don't need to bootstrap a Go build. This reduces the "install
go" step by over half a minute, and avoids installing a number of distro
packages.

Debian requires the pkg-config package to be explicit, as it's not part
of the build-essential metapackage, and we need it. It was being pulled
as a dependency from the golang package before.

OpenBSD is nearly the same change, modulo the fact that Go doesn't have
a binary release for it. So instead, we keep installing Go via the
system's package, and we download and build a source archive.

Finally, switch from Debian testing+experimental to simply unstable.
[message trimmed]