Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Applications
Tor Browser
Commits
37236ba0
Commit
37236ba0
authored
Sep 25, 2020
by
Ryan VanderMeulen
Browse files
Bug 1660901 - Fix debug nsCString bustage. a=bustage
parent
f959b720
Changes
1
Hide whitespace changes
Inline
Side-by-side
security/sandbox/common/test/SandboxTestingChild.cpp
View file @
37236ba0
...
...
@@ -65,20 +65,22 @@ void SandboxTestingChild::Bind(Endpoint<PSandboxTestingChild>&& aEndpoint) {
struct
stat
st
;
static
const
char
kAllowedPath
[]
=
"/usr/lib"
;
ErrnoTest
(
"fstatat_as_stat"
_ns
,
true
,
ErrnoTest
(
NS_LITERAL_CSTRING
(
"fstatat_as_stat"
)
,
true
,
[
&
]
{
return
fstatat
(
AT_FDCWD
,
kAllowedPath
,
&
st
,
0
);
});
ErrnoTest
(
"fstatat_as_lstat"
_ns
,
true
,
[
&
]
{
ErrnoTest
(
NS_LITERAL_CSTRING
(
"fstatat_as_lstat"
)
,
true
,
[
&
]
{
return
fstatat
(
AT_FDCWD
,
kAllowedPath
,
&
st
,
AT_SYMLINK_NOFOLLOW
);
});
# ifdef XP_LINUX
ErrnoTest
(
"fstatat_as_fstat"
_ns
,
true
,
ErrnoTest
(
NS_LITERAL_CSTRING
(
"fstatat_as_fstat"
)
,
true
,
[
&
]
{
return
fstatat
(
0
,
""
,
&
st
,
AT_EMPTY_PATH
);
});
# endif // XP_LINUX
#else // XP_UNIX
SendReportTestResults
(
"dummy_test"
_ns
,
SendReportTestResults
(
NS_LITERAL_CSTRING
(
"dummy_test"
)
,
/* shouldSucceed */
true
,
/* didSucceed */
true
,
"The test framework fails if there are no cases."
_ns
);
NS_LITERAL_CSTRING
(
"The test framework fails if there are no cases."
));
#endif // XP_UNIX
}
...
...
@@ -117,7 +119,7 @@ void SandboxTestingChild::PosixTest(const nsCString& aName, bool aExpectSuccess,
bool
succeeded
=
aStatus
==
0
;
nsAutoCString
message
;
if
(
succeeded
)
{
message
=
"Succeeded"
_ns
;
message
=
NS_LITERAL_CSTRING
(
"Succeeded"
)
;
}
else
{
message
.
AppendPrintf
(
"Error: %s"
,
strerror
(
aStatus
));
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment