Description of problem: test -w is returning a wrong return code Version-Release number of selected component (if applicable): 8.32-11.fc33 How reproducible: Steps to Reproduce: 1. mkdir -p /tmp/foo 2. test -w /tmp/foo; echo $? Actual results: 1 Expected results: 0 Additional info:
I guess you are using a shell built-in rather than the program installed by coreutils. Anyway, did you check permissions of the directory? $ ls -dl /tmp/foo
Hi there, I really thought that I have narrowed this thing down to the right component, but after some additional investigations I'm not sure anymore. First of all, maybe this bug should be moved to another component / package. Best guess is bash for now, but stay tuned, it's not easy to find the right one... Scenario: We are running a Fedora 33 docker (docker is really important here...) container hosted on Debian 10 for building some RPM packages. The following happens: docker pull fedora:33 docker run -v $(pwd):/this/:rw --rm -t -i fedora:33 bash [root@0316b /]# mkdir /tmp/pretest [root@0316b /]# test -w /tmp/pretest; echo $? 0 [root@0316b /] [root@0316b /]# ./do-package-building [root@0316b /] [root@0316b /]# test -w /tmp/posttest; echo $? 0 [root@0316b /]# bash [root@0316b /]# test -w /tmp/posttest; echo $? 1 [root@0316b /]# [root@0316b /]# ls -al /tmp/ drwxr-xr-x 2 root root 4096 Aug 18 13:46 posttest drwxr-xr-x 2 root root 4096 Aug 18 13:43 pretest If we skip the ./do-package-building step above, everything works as expected. This is why we are now reviewing them again. Maybe it is related to the Fedora 33 rawhide splitting or something similar. Some packages will be installed during this step. Starting another shell process using "bash" is necessary. The problem can not be reproduced at all when running the container on podman hosted on Fedora 32. It does not matter if our own scripts are involved or not. Maybe we should just wait some days and try again...
Thank you for sharing the context with us! There is a very similar problem reported for bash: bug #1869597 It seems to be caused by a systemd/glibc issue: bug #1869030
*** This bug has been marked as a duplicate of bug 1869030 ***
The problem is back after several weeks / months now. This time Fedora 34 / rawhide is affected only.
Yes, my CI jobs running on Fedora Rawhide were also affected by this bug last week. I had to use my own build of glibc with the problematic change reverted to make my CI jobs green again.