[illumos-Developer] Establishing requirements and test cases for tail replacement

Joerg Schilling Joerg.Schilling at fokus.fraunhofer.de
Mon Sep 6 04:59:03 PDT 2010


<cjlove at san.rr.com> wrote:

> Hi all,
>
> So I've been working on possible replacements for the closed bin 'tail' commands (/usr/bin/tail and /usr/xpg4/bin/tail) starting with the FreeBSD
> version.  Getting the FreeBSD version to build and run on Solaris was simple enough, but beyond that there's the issue of actual requirements and test cases. 
>
> Comparing Solaris and FreeBSD tail there are different levels of standards compliance:  FreeBSD tail is said to be a superset of
> POSIX.2 (IEEE 1003.2-1992), while the legacy Solaris version cites IEEE 1003.1-2008.   
>
> There are command-line usage differences which can be corrected in the FreeBSD code to match the legacy Solaris version.

It may help to seach the "austin" mailing list on opengroup.org (the POSIX 
discuss list). There has been an important tr(1) related discussion aprox. 1-2 
years ago.


> The Solaris tail(1) manpage specifies LANG, LC_ALL, LC_CTYPE as affecting its behavior.  I see no evidence that the FreeBSD code deals with this issue and I'm going to plead some level of ignorance here as a US developer who has never dealt with anything other than the default POSIX locale.  

If you cannot do full tests (including non-US locales), I would vote against an 
integration. Tail rewinds by a known byte offset and then e.g. needs to be able to 
synchronize again on multi byte characters.

This is an essential feature that needs to be tested.

BTW: Doing this correctly even on stateful locales could forbid to use lseek(2) 
at all.



Jörg

-- 
 EMail:joerg at schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
       js at cs.tu-berlin.de                (uni)  
       joerg.schilling at fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily



More information about the Developer mailing list