test: use journalctl -n option instead of piping to head
On Ubuntu's test infrastructure for the development series, this test
often fails when piping the journal output to head. The cause is
unclear, but possibly related to Ubuntu's use of uutils coreutils.
Workaround this by just using journalctl's -n flag, which removes the
need for piping output to head.
(cherry picked from commit
a8efad14f878a5ea0d566fd61bda8e0bb332ae7d)
(cherry picked from commit
2c661e5f0d54c59a796423c1b8c785ce94dcc026)
(cherry picked from commit
ab3e570ede7c5e41b2e2cb664e2c1e1ea6cfe4c8)