This is an archive of the discontinued LLVM Phabricator instance.

[libc++][AIX] Do not assert chmod return value is non-zero.
ClosedPublic

Authored by sfertile on Oct 19 2021, 11:04 AM.

Details

Summary

A number of the filesystem tests create a directory that contains a bad symlink. On AIX recursively setting permissions on said directory will return a non-zero value because of the bad symlink, however the following rm -r still completes successfully. Avoid the assertion on AIX, and rely on the return value of the remove command to detect problems.

Diff Detail

Event Timeline

sfertile requested review of this revision.Oct 19 2021, 11:04 AM
sfertile created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptOct 19 2021, 11:04 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
sfertile updated this revision to Diff 381249.Oct 21 2021, 7:01 AM

Rebase on https://reviews.llvm.org/D111359 and remove XFAIL from now passing tests.

ldionne accepted this revision.Oct 21 2021, 8:34 AM
ldionne added inline comments.
libcxx/test/support/filesystem_test_helper.h
152–155

Please align the comment with the code. Also, we always indent with spaces, not tabs (in case that's the issue).

This revision is now accepted and ready to land.Oct 21 2021, 8:34 AM
sfertile updated this revision to Diff 402056.EditedJan 21 2022, 11:38 AM

Rebase to trigger ci before committing, since I let this sit so long.

I think these tests are still failing, I'm seeing a bunch of failures in recent builds since this was checked in. Can you please take a look and either fix or revert this quickly to avoid blocking the CI pipeline?

Here is an example of a build that's failing: https://buildkite.com/llvm-project/libcxx-ci/builds/8104#3fcf3f17-bdfe-476b-85f7-314c82a378ff. D117512 is completely unrelated to filesystem, so I can't imagine it's an actual issue with D117512.

Here is an example of a build that's failing: https://buildkite.com/llvm-project/libcxx-ci/builds/8104#3fcf3f17-bdfe-476b-85f7-314c82a378ff. D117512 is completely unrelated to filesystem, so I can't imagine it's an actual issue with D117512.

Yeah, I had noticed that and am looking into it. It seems to be failing at one of the other assertions, before the one modified by this patch.

# command stderr:
mkdir: cannot create /tmp/remove.pass.cpp.dir-static_env.6885170422568648249.
/tmp/remove.pass.cpp.dir-static_env.6885170422568648249: Too many links
Assertion failed: ret == 0, file  /scratch/powerllvm/cpap8008/llvm-project/libcxx-ci/libcxx/test/support/filesystem_test_helper.h, line 128
 
error: command failed with exit status: 250

Here is an example of a build that's failing: https://buildkite.com/llvm-project/libcxx-ci/builds/8104#3fcf3f17-bdfe-476b-85f7-314c82a378ff. D117512 is completely unrelated to filesystem, so I can't imagine it's an actual issue with D117512.

Yeah, I had noticed that and am looking into it. It seems to be failing at one of the other assertions, before the one modified by this patch.

Looks like this is actually caused by /tmp hitting some filesystem limits on the bots. We've cleaned up and re-dispatched the test run which looks clean. Sorry for the noise.