Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(499)

Side by Side Diff: syzygy/agent/asan/logger_unittest.cc

Issue 2363733003: Make syzyasan_rtl compile in 64 bit (Closed)
Patch Set: Nits. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « syzygy/agent/asan/error_info_unittest.cc ('k') | syzygy/agent/asan/registry_cache.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 Google Inc. All Rights Reserved. 1 // Copyright 2012 Google Inc. All Rights Reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 // Inspect the log file contents. 119 // Inspect the log file contents.
120 std::string content; 120 std::string content;
121 ASSERT_TRUE(base::ReadFileToString(temp_path_, &content)); 121 ASSERT_TRUE(base::ReadFileToString(temp_path_, &content));
122 ASSERT_THAT(content, testing::EndsWith(kMessage)); 122 ASSERT_THAT(content, testing::EndsWith(kMessage));
123 123
124 // We should have exactly one minidump in the temp directory. 124 // We should have exactly one minidump in the temp directory.
125 using base::FileEnumerator; 125 using base::FileEnumerator;
126 FileEnumerator fe(temp_dir_.path(), false, FileEnumerator::FILES, L"*.dmp"); 126 FileEnumerator fe(temp_dir_.path(), false, FileEnumerator::FILES, L"*.dmp");
127 base::FilePath minidump(fe.Next()); 127 base::FilePath minidump(fe.Next());
128 #ifndef _WIN64
128 EXPECT_FALSE(minidump.empty()); 129 EXPECT_FALSE(minidump.empty());
130 #else
131 // The 64 bit version of the logger doesn't support writing minidumps yet
132 // because it relies on Kasko, which hasn't been ported to 64-bit. Make sure
133 // that no PDB get produced until we switch the minidump generation to using
134 // Crashpad.
135 // TODO(sebmarchand): Add support for generating minidumps to the 64-bit
136 // version of the logger.
137 EXPECT_TRUE(minidump.empty());
138 #endif
129 EXPECT_TRUE(fe.Next().empty()); 139 EXPECT_TRUE(fe.Next().empty());
130 140
131 // TODO(rogerm): Inspect the contents of the minidump. 141 // TODO(rogerm): Inspect the contents of the minidump.
132 } 142 }
133 143
134 TEST_F(AsanLoggerTest, Stop) { 144 TEST_F(AsanLoggerTest, Stop) {
135 // Setup a log file destination. 145 // Setup a log file destination.
136 base::ScopedFILE destination(base::OpenFile(temp_path_, "wb")); 146 base::ScopedFILE destination(base::OpenFile(temp_path_, "wb"));
137 147
138 // Start up the logging service. 148 // Start up the logging service.
(...skipping 15 matching lines...) Expand all
154 trace::common::Service* server_base = static_cast<trace::common::Service*>( 164 trace::common::Service* server_base = static_cast<trace::common::Service*>(
155 &server); 165 &server);
156 EXPECT_CALL(*this, LoggerStoppedCallback(server_base)).Times(1). 166 EXPECT_CALL(*this, LoggerStoppedCallback(server_base)).Times(1).
157 WillOnce(Return(true)); 167 WillOnce(Return(true));
158 client_.Stop(); 168 client_.Stop();
159 ASSERT_TRUE(server.Join()); 169 ASSERT_TRUE(server.Join());
160 } 170 }
161 171
162 } // namespace asan 172 } // namespace asan
163 } // namespace agent 173 } // namespace agent
OLDNEW
« no previous file with comments | « syzygy/agent/asan/error_info_unittest.cc ('k') | syzygy/agent/asan/registry_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698