coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: coreutils-9.0.193-54bec on Solaris 11.4


From: Pádraig Brady
Subject: Re: coreutils-9.0.193-54bec on Solaris 11.4
Date: Sun, 10 Apr 2022 17:35:43 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:97.0) Gecko/20100101 Thunderbird/97.0

On 10/04/2022 15:37, Bruno Haible wrote:
On Solaris 11.4 (x86_64, in 64-bit mode), there are 4 test failures:


FAIL: tests/misc/stty-row-col
=============================

Any of the commands like `stty rows 40 columns 80` are being silently ignored.
FWIW on the Solaris 10 system I've access to, this test passes.
I'd need access to investigate.

FAIL: tests/install/basic-1
===========================
FAIL: tests/mv/diag
===================

These two are the same issue I think ...

+ compare_ exp out
+ diff -u exp out
--- exp 2022-04-10 18:00:35.334713869 +0200
+++ out 2022-04-10 18:00:35.321291561 +0200
@@ -2,5 +2,5 @@
  Try 'mv --help' for more information.
  mv: missing destination file operand after 'no-file'
  Try 'mv --help' for more information.
-mv: target 'f1': Not a directory
-mv: target directory 'f2': Not a directory
+mv: target 'f1': Permission denied
+mv: target directory 'f2': Permission denied
+ fail=1

... I think this is due to the change in:
https://git.sv.gnu.org/cgit/coreutils.git/commit/?id=v9.0-90-g57c812cc3
I've only access to Solaris 10 at present, but it seems on Solaris 11
open("file", O_SEARCH | O_DIRECTORY) is returning EPERM instead of ENOTDIR?
Though I notice the 11.1 open() docs don't even mention EPERM:
https://docs.oracle.com/cd/E26502_01/html/E29032/open-2.html

Paul do you have access to Solaris 11?
Given this is such a confusing error we should fix if possible.
If open() is returning EPERM here, we should probably do a check
with stat() first on such systems? I.e. something like the following on master.

(Bruno I've attached the equivalent patch against the version you're testing,
which you could test directly with):
  make TESTS=tests/mv/diag.sh VERBOSE=yes SUBDIRS=. check

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)
     {
       is_a_dir = !!S_ISDIR (st.st_mode);
       if (! is_a_dir)


FAIL: tests/tail-2/pipe-f
=========================

The following might help here:

diff --git a/src/tail.c b/src/tail.c
index f1b741783..a28fa61da 100644
--- a/src/tail.c
+++ b/src/tail.c
@@ -356,7 +356,7 @@ check_output_alive (void)
      event immediately) or if using inotify (which relies on 'poll'
      anyway).  Otherwise, use 'select' as it's more portable;
      'poll' doesn't work for this application on macOS.  */
-#if defined _AIX || HAVE_INOTIFY
+#if defined _AIX || defined __sun || HAVE_INOTIFY
   struct pollfd pfd;
   pfd.fd = STDOUT_FILENO;
   pfd.events = POLLERR;


thanks!
Pádraig

Attachment: solaris-11-eperm.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]