bugfindutils - Bugs: bug #66134, Add a prefix to each diagnostic...

 
 

bug #66134: Add a prefix to each diagnostic message to indicate if it is a warning message or an error message

Submitter:  Jean-Baptiste de la Tour <jbdlt>
Submitted:  Wed 28 Aug 2024 10:20:43 AM UTC
   
 
Category:  find Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  None Fixed Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 28 Aug 2024 10:20:43 AM UTC, original submission:  


$ find --version
find (GNU findutils) 4.10.0


The issue


The problem is present at least for these diagnostic messages but may be more global (I have not tested it further).

link-to-link loop:

$ ln -s link link
$ find -L -xtype l
find: ‘./link’: Too many levels of symbolic links
$


link-to-directory-to-link loop:

$ ln -s . link
$ find -L -xtype l
find: File system loop detected; ‘./link’ is part of the same file system loop as ‘.’.
$


directory with no permission:

$ mkdir dir
$ chmod 000 dir
$ find -type f
find: ‘./dir’: Permission denied
$


The message itself does not indicate if it is a warning message or an error message.

This has an impact on the user because:


As a comparison, see the output (an extract) of the server Xorg:

Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(II) AIGLX: Suspending AIGLX clients for VT switch
(EE) client bug: timer event5 debounce: scheduled expiry is in the past (-54ms), your system is too slow


In the opposite, GNU Findutils manual / 12.1 Error Messages From find indicates that some error messages are prefixed by "Warning:", example: "Warning: filesystem /path/foo has recently been mounted".

PS


For users reading this report, the answer is that they are probably error messages (because not removed by the -nowarn option — or else they are warning messages and there is a bug in -nowarn):

link-to-link loop:

$ ln -s link link
$ find -L -nowarn -xtype l
find: ‘./link’: Too many levels of symbolic links
$


link-to-directory-to-link loop:

$ ln -s . link
$ find -L -nowarn -xtype l
find: File system loop detected; ‘./link’ is part of the same file system loop as ‘.’.
$


directory with no permission:

$ mkdir dir
$ chmod 000 dir
$ find -nowarn -type f
find: ‘./dir’: Permission denied
$


Jean-Baptiste de la Tour <jbdlt>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jbdlt (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.14-3b9d.
    Corresponding source code