Feature #11826
closed
Do not generate return values implicitly in case of missed callbacks
Added by Evgeny Novikov over 2 years ago.
Updated over 2 years ago.
Category:
Environment models
Description
At the moment EMG implicitly generates nondeterministic return values of missed callbacks to be invoked using function pointers. It seems to be redundant in general since as a rule these return values are nondeterministic themselves. Worse is that this approach prevents providing return values explicitly, e.g. by allocating and initializing an appropriate memory and using a pointer to it as a return value (e.g. #11825).
- Blocks Feature #11825: Allocate memory for tty_struct for tty_operations callbacks added
- Status changed from New to Resolved
I implemented this in branch avoid-implicit-init that should be tested.
The "implementation" just reverts cea54a3 and 4fbc223.
Extended testing revealed several transitions from timeouts to safes and a slight code coverage drop due to this change. It turns out that the EMG specification for platform drivers is too restrictive unlike other specifications. It sets the default return value of the probe callback to 1 meaning an error while some platform drivers do not implement the probe callback. Thus, the specification considers only failure scenarios after removing implicit generation of return values in this case. I change the default return value to ldv_undef_int() like in other specifications in d73a2c5a2. Let's see on new testing results.
- Status changed from Resolved to Closed
Tests passed. BTW, there are some improvements. Instead of a few timeouts there are safes without decreasing code coverage, but with less considered states. I merged the branch to master in d73a2c5a2.
Also available in: Atom
PDF