Fix spurious output when testing dmesg flags on Ubuntu.