bend over backwards for testing file access, something is weird on debian

pull/431/head
bradh352 3 years ago
parent f4b9a43fc8
commit acb66087a5
  1. 5
      test/ares-test-mock.cc

@ -1036,6 +1036,11 @@ TEST_P(MockChannelTest, HostAliasMissingFile) {
TEST_P(MockChannelTest, HostAliasUnreadable) {
TempFile aliases("www www.google.com\n");
EXPECT_EQ(chmod(aliases.filename(), S_IWUSR), 0);
struct stat st;
EXPECT_EQ(stat(aliases.filename(), &st), 0);
EXPECT_EQ(st.st_mode & (S_IRWXU|S_IRWXG|S_IRWXO), S_IWUSR);
EXPECT_EQ(fopen(aliases.filename(), "r"), nullptr);
EnvValue with_env("HOSTALIASES", aliases.filename());
HostResult result;

Loading…
Cancel
Save