mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2025-12-26 17:25:04 +01:00
Fixing various compiler warnings and applying minor tweaks to allow running of
the mojority of breakpad unittests in Google. http://breakpad.appspot.com/399002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@978 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
eb3bf49197
commit
5f6e1f0fe7
20 changed files with 292 additions and 120 deletions
|
|
@ -183,7 +183,9 @@ TEST(ElfCoreDumpTest, ValidCoreFile) {
|
|||
size_t num_nt_prpsinfo = 0;
|
||||
size_t num_nt_prstatus = 0;
|
||||
size_t num_nt_fpregset = 0;
|
||||
#if defined(__i386__)
|
||||
size_t num_nt_prxfpreg = 0;
|
||||
#endif
|
||||
set<pid_t> actual_thread_ids;
|
||||
ElfCoreDump::Note note = core.GetFirstNote();
|
||||
while (note.IsValid()) {
|
||||
|
|
@ -211,7 +213,7 @@ TEST(ElfCoreDumpTest, ValidCoreFile) {
|
|||
++num_nt_prstatus;
|
||||
break;
|
||||
}
|
||||
#if defined(__i386) || defined(__x86_64)
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
case NT_FPREGSET: {
|
||||
EXPECT_TRUE(description.data() != NULL);
|
||||
EXPECT_EQ(sizeof(user_fpregs_struct), description.length());
|
||||
|
|
@ -219,7 +221,7 @@ TEST(ElfCoreDumpTest, ValidCoreFile) {
|
|||
break;
|
||||
}
|
||||
#endif
|
||||
#if defined(__i386)
|
||||
#if defined(__i386__)
|
||||
case NT_PRXFPREG: {
|
||||
EXPECT_TRUE(description.data() != NULL);
|
||||
EXPECT_EQ(sizeof(user_fpxregs_struct), description.length());
|
||||
|
|
@ -236,10 +238,10 @@ TEST(ElfCoreDumpTest, ValidCoreFile) {
|
|||
EXPECT_TRUE(expected_thread_ids == actual_thread_ids);
|
||||
EXPECT_EQ(1, num_nt_prpsinfo);
|
||||
EXPECT_EQ(kNumOfThreads, num_nt_prstatus);
|
||||
#if defined(__i386) || defined(__x86_64)
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
EXPECT_EQ(kNumOfThreads, num_nt_fpregset);
|
||||
#endif
|
||||
#if defined(__i386)
|
||||
#if defined(__i386__)
|
||||
EXPECT_EQ(kNumOfThreads, num_nt_prxfpreg);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,9 +73,11 @@ TEST(FileIDStripTest, StripSelf) {
|
|||
string templ = temp_dir.path() + "/file-id-unittest";
|
||||
char cmdline[4096];
|
||||
sprintf(cmdline, "cp \"%s\" \"%s\"", exe_name, templ.c_str());
|
||||
ASSERT_EQ(system(cmdline), 0);
|
||||
ASSERT_EQ(0, system(cmdline)) << "Failed to execute: " << cmdline;
|
||||
sprintf(cmdline, "chmod u+w \"%s\"", templ.c_str());
|
||||
ASSERT_EQ(0, system(cmdline)) << "Failed to execute: " << cmdline;
|
||||
sprintf(cmdline, "strip \"%s\"", templ.c_str());
|
||||
ASSERT_EQ(system(cmdline), 0);
|
||||
ASSERT_EQ(0, system(cmdline)) << "Failed to execute: " << cmdline;
|
||||
|
||||
uint8_t identifier1[sizeof(MDGUID)];
|
||||
uint8_t identifier2[sizeof(MDGUID)];
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@
|
|||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include "breakpad_googletest_includes.h"
|
||||
#include "common/linux/linux_libc_support.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
|
||||
namespace {
|
||||
typedef testing::Test LinuxLibcSupportTest;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue