coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] tests: avoid an ls-time false positive on Solaris 10


From: Jim Meyering
Subject: Re: [PATCH] tests: avoid an ls-time false positive on Solaris 10
Date: Fri, 16 Mar 2012 15:38:23 +0100

Pádraig Brady wrote:
> There was a spurious failure on tmpfs on Solaris 10.
> The attached should avoid it.
...
> Subject: [PATCH] tests: avoid an ls-time false positive on Solaris 10
>
> * tests/misc/ls-time: Force a ctime update as updating
> the atime doesn't update ctime on tmpfs on Solaris 10.
> ---
>  tests/misc/ls-time |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/tests/misc/ls-time b/tests/misc/ls-time
> index 4419ec7..ae9cdbc 100755
> --- a/tests/misc/ls-time
> +++ b/tests/misc/ls-time
> @@ -41,6 +41,10 @@ touch -a -d "$u2" b || framework_failure_
>  # Make sure A has ctime at least 1 second more recent than C's.
>  sleep 2
>  touch -a -d "$u1" a || framework_failure_

Thanks.  That looks fine, but please don't use "_" unless necessary.

> +# Usually updating the atime is enough to update the ctime,
> +# however on tmpfs on solaris 10, ctime is not updated,
> +# so force an update here:
> +{ ln a a_ctime && rm a_ctime; } || framework_failure_

    # Updating the atime is usually enough to update the ctime, but on
    # Solaris 10's tmpfs, ctime is not updated, so force an update here:
    { ln a a-ctime && rm a-ctime; } || framework_failure_



reply via email to

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