Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] portable mechanism to determine noatime



On Sat, Dec 5, 2015 at 12:17 PM, Eric Cook <llua@xxxxxxx> wrote:
> On 12/05/2015 12:15 AM, Eric Cook wrote:
>> On 12/04/2015 06:22 PM, Baptiste Daroussin wrote:
>>> Hello,
>>>
>>> While updating the FreeBSD package to 5.2, I got a failure when
>>> running the testsuite. Actually it was not a real failure are the said
>>> test is known to not work on a noatime filesystem which is my case.
>>>
>>> The way to test for noatime rely on /etc/mtab which we do not have
>>>
>>> Here is a patch to use the mount command instead:
>>> https://people.freebsd.org/~bapt/0001-Use-a-portable-mechanism-to-determine-if-the-filesys.patch
>>>
>>> Best regards,
>>> Bapt
>>>
>> This patch doesn't work on illumos/solaris systems.
>>
> Well, it isn't just unique to illumos/solaris.
> If you build zsh in a directory that is on your root partition (say you don't have a separate /home partition)
> `df .' returns `/', `grep /' matches every mount point and if any mount point is mounted noatime, the final grep succeeds.
> But that problem still exist with the use of /etc/mtab.

What about
mount | awk '$1 == "'"$(df . | tail -n 1 | cut -d\  -f1)"\" | grep -q noatime



Messages sorted by: Reverse Date, Date, Thread, Author