mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-26 23:01:05 +08:00
linux: Get exe name from main arguments
When building in chromium, the test is linked into the crashpad_tests target instead of crashpad_util_test. Change-Id: I4e0f6b9956f191ebac10f0aaa3812e30885a4e0a Reviewed-on: https://chromium-review.googlesource.com/1131688 Commit-Queue: Joshua Peraza <jperaza@chromium.org> Reviewed-by: Robert Sesek <rsesek@chromium.org>
This commit is contained in:
parent
cb41ba7471
commit
1e504474a0
@ -26,6 +26,7 @@
|
||||
#include "gtest/gtest.h"
|
||||
#include "test/errors.h"
|
||||
#include "test/linux/fake_ptrace_connection.h"
|
||||
#include "test/main_arguments.h"
|
||||
#include "test/multiprocess.h"
|
||||
#include "util/linux/address_types.h"
|
||||
#include "util/linux/memory_map.h"
|
||||
@ -128,7 +129,7 @@ void TestAgainstCloneOrSelf(pid_t pid) {
|
||||
ASSERT_TRUE(aux.GetValue(AT_EXECFN, &filename_addr));
|
||||
std::string filename;
|
||||
ASSERT_TRUE(memory.ReadCStringSizeLimited(filename_addr, 4096, &filename));
|
||||
EXPECT_TRUE(filename.find("crashpad_util_test") != std::string::npos);
|
||||
EXPECT_TRUE(filename.find(GetMainArguments()[0]) != std::string::npos);
|
||||
#endif // AT_EXECFN
|
||||
|
||||
int ignore;
|
||||
|
Loading…
x
Reference in New Issue
Block a user