Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ACATS & dispatching priorities

133 views
Skip to first unread message

Simon Wright

unread,
May 5, 2017, 1:24:51 PM5/5/17
to
ACATS 4.1 has tests CXD* which test correct Annex D behaviour. I'm
getting problems with them. See [0] for work in progress.

For instance, CXD2002 reports as below (lines starting '*' are reporting
errors):

,.,. CXD2002 ACATS 4.1 17-05-03 17:31:31
---- CXD2002 Default Task Dispatching - a non-blocking delay puts the
task at the tail of the ready queue for that priority.
* CXD2002 Delay_Task executed before a Sub_Task.
* CXD2002 Low priority task executed out of order.
* CXD2002 Sub_Tasks did not run when expected.
**** CXD2002 FAILED ****************************.

(sometimes the "Low priority task" line doesn't appear).

The binder has correctly set Ceiling priority and FIFO within tasks.

Same on macOS, Debian (both 64-bit). Same with GNAT GPL 2016, GCC
6.1.0. Behaviour not affected by running as root (this used to make a
difference to Linux tasking programs - or was that Solaris?)

Is anyone aware of GNAT limitations in this area? I found [1] ([2] is
prettier), and apparently Ceiling locking isn't supported on Linux. But
it should be OK on macOS???

[0] https://github.com/simonjwright/ACATS
[1]
https://gcc.gnu.org/onlinedocs/gcc-3.1/gnat_rm/Ensuring-Compliance-with-the-Real-Time-Annex.html
[2] https://docs.adacore.com/gnat_rm-docs/html/gnat_rm/gnat_rm/implementation_of_specific_ada_features.html

Robert A Duff

unread,
May 5, 2017, 6:45:13 PM5/5/17
to
Simon Wright <si...@pushface.org> writes:

> Is anyone aware of GNAT limitations in this area? I found [1] ([2] is
> prettier), and apparently Ceiling locking isn't supported on Linux. But
> it should be OK on macOS???

I don't know about macOS or solaris.

Ceiling locking is supported on Linux, but that support is fairly recent
(I implemented it in the last few months or so). I think GNAT GPL 2016
doesn't have it.

There was a version that supported ceiling locking on linux, but only if
the process is running as root. Then, as decribed in the doc you quoted
here:

> [2] https://docs.adacore.com/gnat_rm-docs/html/gnat_rm/gnat_rm/implementation_of_specific_ada_features.html

(search for "ceiling") there is now a version that also supports
capabilities. You have to link with the right library, and you
have to set the appropriate capability on the executable file
(which requires being root), and then you can run that file
without being root and get ceiling priority support.

That doc describes the latest development version, available to AdaCore
customers. I don't know how much other versions lag behind.

- Bob

Robert Eachus

unread,
May 7, 2017, 3:51:46 PM5/7/17
to
On Friday, May 5, 2017 at 1:24:51 PM UTC-4, Simon Wright wrote:
> ACATS 4.1 has tests CXD* which test correct Annex D behaviour. I'm
> getting problems with them. See [0] for work in progress.

The ACATS tests should have notations as to which tests are not appropriate for a system with multiple processor cores. Do you by chance have that problem?

Simon Wright

unread,
May 7, 2017, 4:32:54 PM5/7/17
to
A good thought; I was expecting the number of cores to be automatically
detected, but no (I think maybe it should be now we have
System.Multiprocessors).

I still have issues, but I think they are all locking-related now.

Randy Brukardt

unread,
May 9, 2017, 3:41:49 PM5/9/17
to
Given that 98% of the ACATS tests are older than System.Multiprocessors,
it's not surprising that they don't use it. On top of which, no tests using
that package would work on compilers older than Ada 2012 (we still maintain
Ada 95 and Ada 2005 versions of the test suite, in part so it is isn't a
GNAT-only endevour).

Randy.

"Simon Wright" <si...@pushface.org> wrote in message
news:ly7f1sj...@pushface.org...

Simon Wright

unread,
Jun 8, 2017, 5:37:07 AM6/8/17
to
"Randy Brukardt" <ra...@rrsoftware.com> writes:

> "Simon Wright" <si...@pushface.org> wrote in message
> news:ly7f1sj...@pushface.org...
>> Robert Eachus <riea...@comcast.net> writes:
>>
>>> On Friday, May 5, 2017 at 1:24:51 PM UTC-4, Simon Wright wrote:
>>>> ACATS 4.1 has tests CXD* which test correct Annex D behaviour. I'm
>>>> getting problems with them. See [0] for work in progress.
>>>
>>> The ACATS tests should have notations as to which tests are not
>>> appropriate for a system with multiple processor cores. Do you by
>>> chance have that problem?
>>
>> A good thought; I was expecting the number of cores to be automatically
>> detected, but no (I think maybe it should be now we have
>> System.Multiprocessors).

> Given that 98% of the ACATS tests are older than
> System.Multiprocessors, it's not surprising that they don't use it. On
> top of which, no tests using that package would work on compilers
> older than Ada 2012 (we still maintain Ada 95 and Ada 2005 versions of
> the test suite, in part so it is isn't a GNAT-only endevour).

Actually, it's in impdefd.a (constant Processor), so my remark was about
the implementation-specific changes appropriate in a current GCC, not
the tests themselves. And FSF GCC isn't, I think, much interested in
older versions of GNAT that might be 95- or 2005-only.
0 new messages