Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Sep 2021 12:08:09 -0700
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        Mark Millard <marklmi@yahoo.com>, Ian Lepore <ian@freebsd.org>
Cc:        freebsd-ports@freebsd.org, freebsd-current <freebsd-current@freebsd.org>, Free BSD <freebsd-arm@freebsd.org>
Subject:   Re: I get odd time reports from poudriere on armv7 system, under a (non-debug) main [so: 14] FreeBSD.
Message-ID:  <5fe9294c-aabb-57ff-73e0-d9ad2d8efcf5@FreeBSD.org>
In-Reply-To: <0FE65CAD-EDFF-4CE8-8750-BD4F6971CAA0@yahoo.com>
References:  <C6D3F55B-C567-4EED-AC88-B6C18F6C6154@yahoo.com> <187B69AF-9465-41DE-BFD0-A4AA0F7F9068@yahoo.com> <e20c23c3b540203680ce79d8756aa21aaeb96612.camel@freebsd.org> <0FE65CAD-EDFF-4CE8-8750-BD4F6971CAA0@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--4PUY2Owcn9dc6SBJCFPer7297t2JnOLNg
Content-Type: multipart/mixed; boundary="s2lqJLBhwxirULgNtF0GmsE6sRTJO2DTm";
 protected-headers="v1"
From: Bryan Drewery <bdrewery@FreeBSD.org>
To: Mark Millard <marklmi@yahoo.com>, Ian Lepore <ian@freebsd.org>
Cc: freebsd-ports@freebsd.org, freebsd-current <freebsd-current@freebsd.org>,
 Free BSD <freebsd-arm@freebsd.org>
Message-ID: <5fe9294c-aabb-57ff-73e0-d9ad2d8efcf5@FreeBSD.org>
Subject: Re: I get odd time reports from poudriere on armv7 system, under a
 (non-debug) main [so: 14] FreeBSD.
References: <C6D3F55B-C567-4EED-AC88-B6C18F6C6154@yahoo.com>
 <187B69AF-9465-41DE-BFD0-A4AA0F7F9068@yahoo.com>
 <e20c23c3b540203680ce79d8756aa21aaeb96612.camel@freebsd.org>
 <0FE65CAD-EDFF-4CE8-8750-BD4F6971CAA0@yahoo.com>
In-Reply-To: <0FE65CAD-EDFF-4CE8-8750-BD4F6971CAA0@yahoo.com>

--s2lqJLBhwxirULgNtF0GmsE6sRTJO2DTm
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable

On 9/26/2021 11:05 PM, Mark Millard wrote:
> On 2021-Sep-26, at 10:02, Ian Lepore <ian at freebsd.org> wrote:
>=20
>> On Sun, 2021-09-26 at 02:27 -0700, Mark Millard via freebsd-current
>> wrote:
>>> On 2021-Sep-25, at 23:25, Mark Millard <marklmi at yahoo.com> wrote:
>>>
>>>
>>> [...]
>>>         if (argc =3D=3D 3 && strcmp(argv[2], "-nsec") =3D=3D 0)
>>>                 printf("%ld.%ld\n", ts.tv_sec, ts.tv_nsec);
>>
>> There are two problems with this, both the seconds and nanos are
>> printed incorrectly.  The correct incantation would be
>>
>>  printf("%jd.%09ld\n", (intmax_t)ts.tv_sec, ts.tv_nsec);
>>
>=20
> Thanks Ian for looking into more than I did last night.
>=20
> Based on the following (up to possible e-mail white space issues),
> poudriere-devel seems t be working for reporting times:
>=20
> # more /usr/ports/ports-mgmt/poudriere-devel/files/patch-clock=20
> --- src/libexec/poudriere/clock/clock.c.orig    2021-09-26 22:24:54.735=
485000 -0700
> +++ src/libexec/poudriere/clock/clock.c 2021-09-26 11:46:12.076362000 -=
0700
> @@ -24,6 +24,7 @@
>   * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
>   */
> =20
> +#include <stdint.h>
>  #include <err.h>
>  #include <stdio.h>
>  #include <stdlib.h>
> @@ -71,8 +72,8 @@
>         } else
>                 usage();
>         if (argc =3D=3D 3 && strcmp(argv[2], "-nsec") =3D=3D 0)
> -               printf("%ld.%ld\n", ts.tv_sec, ts.tv_nsec);
> +               printf("%jd.%09ld\n", (intmax_t)ts.tv_sec, ts.tv_nsec);=

>         else
> -               printf("%ld\n", ts.tv_sec);
> +               printf("%jd\n", (intmax_t)ts.tv_sec);
>         return (EXIT_SUCCESS);
>  }


Thanks, I've committed it in my local git. Will push out later.


--=20
Bryan Drewery


--s2lqJLBhwxirULgNtF0GmsE6sRTJO2DTm--

--4PUY2Owcn9dc6SBJCFPer7297t2JnOLNg
Content-Type: application/pgp-signature; name="OpenPGP_signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="OpenPGP_signature"

-----BEGIN PGP SIGNATURE-----

wsB5BAABCAAjFiEE+Rc8ssOq6npcih8JNddxu25Gl88FAmFTaBkFAwAAAAAACgkQNddxu25Gl8/W
SwgAjhDhlXXll8wRF30GUWY7TZYYW8Gg079tNVnPksEVKk+XxI0FfzQSpYH+vA2igpFVLEiP2tvN
DJHzJwiwZiKC32IsmkHledL79uU45jL/6jlGRbM061p+w0aRpKcYRBTmSNjZJXrGoVAdZBWOqyH1
bNPVtA2Yn0Zs3VhTBof0SJHsAEh/OqtVj3b5dMc6aB7RYvbYlcImacg3oktUp4zKgWl1MSw7/ZBF
MU87AKZqtPJFVo6d9wVFI6gdbod0ODmorepZxABn2NRss1NLBVY1pRoj8OLi89FuSc36qHQwmprK
wtmroOyJSXD5WsQxsjuwt+4bLL1sNjNeChh8R3qsvQ==
=VXtP
-----END PGP SIGNATURE-----

--4PUY2Owcn9dc6SBJCFPer7297t2JnOLNg--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5fe9294c-aabb-57ff-73e0-d9ad2d8efcf5>