diff --git a/libcxx/test/support/filesystem_test_helper.h b/libcxx/test/support/filesystem_test_helper.h --- a/libcxx/test/support/filesystem_test_helper.h +++ b/libcxx/test/support/filesystem_test_helper.h @@ -141,7 +141,13 @@ #else std::string cmd = "chmod -R 777 " + test_root.string(); int ret = std::system(cmd.c_str()); +#if !defined(_AIX) + // On AIX the chmod command will return non-zero when trying to set + // the permissions on a directory that contains a bad symlink. This triggers + // the assert, despite being able to delete everything with the following + // `rm -r` command. assert(ret == 0); +#endif cmd = "rm -r " + test_root.string(); ret = std::system(cmd.c_str());