Chromium unit tests run in repeat mode leak temporary files
Reported by
ptwo...@vewd.com,
Feb 22 2018
|
|
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.167 Safari/537.36 Steps to reproduce the problem: 1. Build mojo_system_unittests 2. Create dedicated temporary directory with a limited size, ex: $ mkdir -p /tmp/test_dir $ sudo mount -t tmpfs -o size=8M none /tmp/test_dir 3. Run the test in repeat mode using newly created filesystem as a temp directory: $ TMPDIR=/tmp/test_dir ./out/Debug/mojo_system_unittests --gtest_repeat=-1 --gtest_filter=MessageTest.SerializeSimpleMessageWithHandlesWithContext What is the expected behavior? The test keeps running, the amount of used space in /tmp/test_dir does not keep increasing constantly. What went wrong? Each time the test runs it creates a new temporary file to pass command line parameters to the test runner. The file is not removed after the test has finished running. After the filesystem runs out of space the test runner usually crashes. Did this work before? No Chrome version: 66.0.3353.0 Channel: canary OS Version: 4.14.20 Flash Version:
,
Feb 23 2018
I've also created a patch which should address it. It's being reviewed here: https://chromium-review.googlesource.com/c/chromium/src/+/931341
,
Feb 26 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d5f1046c9a939b00f2451af27690faf455c07ea1 commit d5f1046c9a939b00f2451af27690faf455c07ea1 Author: Piotr Tworek <ptworek@vewd.com> Date: Mon Feb 26 10:38:54 2018 Remove tmp files used to pass command line to tests after they finish Right now the file used to pass command line parameters to test- processes is not removed after the test finished. In cases where tests are run in repeat mode those flag files just keep accumulating until the system runs out of space in it's $TMPDIR. To solve this, the patch makes sure the path to the file containing the flags is stored in UnitTestProcessLifetimeObserver and removed once the OnCompleted method is called. Bug: 814687 Change-Id: Ifb0ba6dba860d9297fbc2c939e0cc10f620907fa Reviewed-on: https://chromium-review.googlesource.com/931341 Commit-Queue: Nico Weber <thakis@chromium.org> Reviewed-by: Nico Weber <thakis@chromium.org> Cr-Commit-Position: refs/heads/master@{#539104} [modify] https://crrev.com/d5f1046c9a939b00f2451af27690faf455c07ea1/base/test/launcher/test_launcher_nacl_nonsfi.cc [modify] https://crrev.com/d5f1046c9a939b00f2451af27690faf455c07ea1/base/test/launcher/unit_test_launcher.cc [modify] https://crrev.com/d5f1046c9a939b00f2451af27690faf455c07ea1/base/test/launcher/unit_test_launcher.h |
|
►
Sign in to add a comment |
|
Comment 1 by krajshree@chromium.org
, Feb 23 2018Labels: Triaged-ET Needs-Triage-M66 TE-NeedsTriageHelp