rtems-central: Error trying to add FACE POSIX Timer Behavior

Joel Sherrill joel at rtems.org
Tue Aug 16 19:20:40 UTC 2022


On Tue, Aug 16, 2022 at 7:15 AM Frank Kühndel <
frank.kuehndel at embedded-brains.de> wrote:

> Hi Joel,
>
> as far as I can remember, the error handling of `spec2modules.py` was
> never excellent. Adding `notes: null` to
> `spec/acfg/if/posix-timer-face-behavior.yml` fixes your problem:
>

Thanks! That did it.

I accidentally added a k to interface and it also gave a mysterious
exception.

Improving the error handling might be a good GSoC project if we can define
the places a field is required, a field as an enumerated set of values,
group
references are wrong, etc.

It is going to be hard to write these with crystal ball error diagnosis. :(

>
> {{{{
> SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
> appl-config-option-type: feature-enable
> copyrights:
> - Copyright (C) 2022 On-Line Applications Research Corporation (OAR)
> description: |
>   If this configuration option is defined, then POSIX timers may
>   not be created to use the CLOCK_REALTIME. Per POSIX, this is allowed
>   behavior but per the FACE Technical Standard, using POSIX timers based
>   on CLOCK_REALTIME (e.g., time of day) is unsafe for real-time safety
>   systems as setting CLOCK_REALTIME will perturb any active timers.
>
>   If this option is not defined, POSIX timers may be created to use the
>   CLOCK_REALTIME in compliance with the POSIX specification.
> enabled-by: true
> index-entries: []
> interface-type: appl-config-option
> links:
> - role: appl-config-group-member
>   uid: group-face
> name: CONFIGURE_POSIX_TIMERS_FACE_BEHAVIOR
> notes: null
> type: interface
> }}}
>
> Missing non-optional keys, misspelled keys, or keys placed in the wrong
> level lead to exceptions in `spec2modules.py` as well as missing values,
> or values of wrong type.
>
> In this particular case, I found the problem by comparing
> `spec/acfg/if/posix-timer-face-behavior.yml` to files using
> `group-filesystem` (e.g. `spec/acfg/if/filesystem-all.yml`).
>
> There is a documentation on specification items:
> https://docs.rtems.org/branches/master/eng/req/items.html
>
> The format for your file `spec/acfg/if/posix-timer-face-behavior.yml` is
> described in
>
> * section "5.2.2.18. Interface Item Type"
> * sub-section "5.2.2.20. Application Configuration Option Item Type"
>
> It states the missing key "notes".
>

This was my first time wandering into here. Hopefully it gets easier
over time.

>
> I hope I could help.
>

I appreciate the help.

Thanks.

>
> Greetings
> Frank
>
>
>
> On 8/12/22 23:28, Joel Sherrill wrote:
> > Hi
> >
> > I've just attached the patch as a work in progress since spec2modules.py
> is
> > unhappy with what I've done so far. I'd appreciate some guidance. I
> checked
> > that spec2modules.py ran OK before my changes. I added a group-face and
> > hope I did that much right. But something is wrong. Help appreciated.
> >
> > $ ./spec2modules.py
> > Traceback (most recent call last):
> >   File "./spec2modules.py", line 85, in <module>
> >     main()
> >   File "./spec2modules.py", line 76, in main
> >     rtemsspec.applconfig.generate(config["appl-config"], item_cache)
> >   File
> "/home/joel/rtems-work/rtems/rtems-central/rtemsspec/applconfig.py",
> > line 336, in generate
> >     _generate(group, options, enabled, sphinx_content)
> >   File
> "/home/joel/rtems-work/rtems/rtems-central/rtemsspec/applconfig.py",
> > line 264, in _generate
> >     content.add_option_notes(content.substitute(item["notes"]))
> >   File "/home/joel/rtems-work/rtems/rtems-central/rtemsspec/items.py",
> line
> > 210, in __getitem__
> >     return self._data[key]
> > KeyError: 'notes'
> >
> > Thanks.
> >
> > --joel
>
> --
> embedded brains GmbH
> Herr Frank KÜHNDEL
> Dornierstr. 4
> 82178 Puchheim
> Germany
> email: frank.kuehndel at embedded-brains.de
> phone:  +49-89-18 94 741 - 23
> mobile: +49-176-15 22 06 - 11
> fax:    +49-89-18 94 741 - 08
>
> Registergericht: Amtsgericht München
> Registernummer: HRB 157899
> Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
> Unsere Datenschutzerklärung finden Sie hier:
> https://embedded-brains.de/datenschutzerklaerung/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20220816/8c992ac5/attachment.htm>


More information about the devel mailing list