Rework tests/definitions/usage of the __attribute__ feature

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>