On 11/04/2022 02:44, Bruno Haible wrote:
Pádraig Brady wrote:
FAIL: tests/install/basic-1 =========================== FAIL: tests/mv/diag ===================These two are the same issue I think ... diff --git a/src/system.h b/src/system.h index c24cb4dc3..d2c473a59 100644 --- a/src/system.h +++ b/src/system.h @@ -140,9 +140,12 @@ target_directory_operand (char const *file) bool is_a_dir = false; struct stat st; - /* On old systems like Solaris 10, check with stat first - lest we try to open a fifo for example and hang. */ - if (!O_DIRECTORY && stat (file, &st) == 0) + /* On old systems without O_DIRECTORY, like Solaris 10, + check with stat first lest we try to open a fifo for example and hang. + Also check on systems with O_PATHSEARCH == O_SEARCH, like Solaris 11, + where open was seen to return EPERM for non directories. */ + if (!O_DIRECTORY || (O_PATHSEARCH == O_SEARCH) + && stat (file, &st) == 0)Isn't there a parenthesizing mistake here? I would write if ((!O_DIRECTORY || (O_PATHSEARCH == O_SEARCH)) && stat (file, &st) == 0) This patch does not apply cleanly to the snapshot source. I tried a similar patch, but it did not help.
Yes sorry, I had the correct parentheses in the attached patch. Thanks for confirming the equivalent didn't address this issue. I'll need to dig into this more. thanks, Pádraig
