aboutsummaryrefslogtreecommitdiff
path: root/src/common/linux
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/linux')
-rw-r--r--src/common/linux/elf_core_dump_unittest.cc10
-rw-r--r--src/common/linux/file_id_unittest.cc6
-rw-r--r--src/common/linux/linux_libc_support_unittest.cc2
3 files changed, 11 insertions, 7 deletions
diff --git a/src/common/linux/elf_core_dump_unittest.cc b/src/common/linux/elf_core_dump_unittest.cc
index b799d3f0..e872a4fd 100644
--- a/src/common/linux/elf_core_dump_unittest.cc
+++ b/src/common/linux/elf_core_dump_unittest.cc
@@ -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
}
diff --git a/src/common/linux/file_id_unittest.cc b/src/common/linux/file_id_unittest.cc
index 4c803152..daef1e3f 100644
--- a/src/common/linux/file_id_unittest.cc
+++ b/src/common/linux/file_id_unittest.cc
@@ -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)];
diff --git a/src/common/linux/linux_libc_support_unittest.cc b/src/common/linux/linux_libc_support_unittest.cc
index a7c5a26a..6f4b2da6 100644
--- a/src/common/linux/linux_libc_support_unittest.cc
+++ b/src/common/linux/linux_libc_support_unittest.cc
@@ -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;