mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 14:06:33 +00:00
Fix ScopedFD usage in unit test
Fixes a minor detail in the CrashReportDatabaseTest.CleanBrokenDatabase test wherein a ScopedFD is explicitly closed before being released. Despite being technically safe in this instance, an impending upstream Chromium change to track and enforce ScopedFD ownership will catch this as a potential bug and intentionally crash the test. Change-Id: Ie5c2c84d7501036d16f990bb6093fcd406fa598d Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2898048 Reviewed-by: Robert Sesek <rsesek@chromium.org> Commit-Queue: Ken Rockot <rockot@google.com>
This commit is contained in:
parent
e841b92e18
commit
a6494f9df6
@ -828,8 +828,7 @@ TEST_F(CrashReportDatabaseTest, CleanBrokenDatabase) {
|
||||
|
||||
ASSERT_TRUE(LoggingWriteFile(
|
||||
handle.get(), &expired_timestamp, sizeof(expired_timestamp)));
|
||||
ASSERT_TRUE(LoggingCloseFile(handle.get()));
|
||||
ignore_result(handle.release());
|
||||
ASSERT_TRUE(LoggingCloseFile(handle.release()));
|
||||
|
||||
EXPECT_EQ(db()->CleanDatabase(0), 1);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user