* Re: [Xenomai-core] [Xenomai-git] Jan Kiszka : Add regression test for mprotect on pinned memory
[not found] <E1SEhxD-0007Jo-Tb@domain.hid>
@ 2012-04-02 14:35 ` Gilles Chanteperdrix
2012-04-03 8:37 ` Jan Kiszka
0 siblings, 1 reply; 2+ messages in thread
From: Gilles Chanteperdrix @ 2012-04-02 14:35 UTC (permalink / raw)
To: Xenomai core
On 04/02/2012 04:09 PM, GIT version control wrote:
> Module: xenomai-jki
> Branch: for-upstream
> Commit: 410e90d085d21dc913f8724efafe6ae75bd3c952
> URL: http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=410e90d085d21dc913f8724efafe6ae75bd3c952
>
> Author: Jan Kiszka <jan.kiszka@domain.hid>
> Date: Fri Mar 30 18:06:27 2012 +0200
>
> Add regression test for mprotect on pinned memory
>
> This tests both the original issue of mprotect reintroducing COW pages
> to Xenomai processes as well as the recently fixed zero page corruption.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@domain.hid>
> +static void check_inner(const char *fn, int line, const char *msg,
> + int status, int expected)
> +{
> + if (status == expected)
> + return;
> +
> + rt_task_set_mode(T_WARNSW, 0, NULL);
> + rt_print_flush_buffers();
> (...)
> +static void check_value_inner(const char *fn, int line, const char *msg,
> + int value, int expected)
> +{
> + if (value == expected)
> + return;
> +
> + rt_task_set_mode(T_WARNSW, 0, NULL);
> + rt_print_flush_buffers();
> (...)
> +void sigdebug_handler(int sig, siginfo_t *si, void *context)
> +{
> + unsigned int reason = si->si_value.sival_int;
> +
> + rt_print_flush_buffers();
> (...)
> +
> + rt_task_set_mode(T_WARNSW, 0, NULL);
> + rt_print_flush_buffers();
Maybe you could use posix skin's printf instead of putting calls to
rt_print_flush_buffers all over the place? I did not mean for this call
to be exported, I only added it for internal use by the posix skin.
--
Gilles.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Xenomai-core] [Xenomai-git] Jan Kiszka : Add regression test for mprotect on pinned memory
2012-04-02 14:35 ` [Xenomai-core] [Xenomai-git] Jan Kiszka : Add regression test for mprotect on pinned memory Gilles Chanteperdrix
@ 2012-04-03 8:37 ` Jan Kiszka
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kiszka @ 2012-04-03 8:37 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: Xenomai core
On 2012-04-02 16:35, Gilles Chanteperdrix wrote:
> On 04/02/2012 04:09 PM, GIT version control wrote:
>> Module: xenomai-jki
>> Branch: for-upstream
>> Commit: 410e90d085d21dc913f8724efafe6ae75bd3c952
>> URL: http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=410e90d085d21dc913f8724efafe6ae75bd3c952
>>
>> Author: Jan Kiszka <jan.kiszka@domain.hid>
>> Date: Fri Mar 30 18:06:27 2012 +0200
>>
>> Add regression test for mprotect on pinned memory
>>
>> This tests both the original issue of mprotect reintroducing COW pages
>> to Xenomai processes as well as the recently fixed zero page corruption.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@domain.hid>
>> +static void check_inner(const char *fn, int line, const char *msg,
>> + int status, int expected)
>> +{
>> + if (status == expected)
>> + return;
>> +
>> + rt_task_set_mode(T_WARNSW, 0, NULL);
>> + rt_print_flush_buffers();
>> (...)
>> +static void check_value_inner(const char *fn, int line, const char *msg,
>> + int value, int expected)
>> +{
>> + if (value == expected)
>> + return;
>> +
>> + rt_task_set_mode(T_WARNSW, 0, NULL);
>> + rt_print_flush_buffers();
>> (...)
>> +void sigdebug_handler(int sig, siginfo_t *si, void *context)
>> +{
>> + unsigned int reason = si->si_value.sival_int;
>> +
>> + rt_print_flush_buffers();
>> (...)
>> +
>> + rt_task_set_mode(T_WARNSW, 0, NULL);
>> + rt_print_flush_buffers();
>
> Maybe you could use posix skin's printf instead of putting calls to
> rt_print_flush_buffers all over the place? I did not mean for this call
> to be exported, I only added it for internal use by the posix skin.
>
Could be done, likely together with a complete switch to posix.
I could also start to use the check_* wrappers that I just discovered.
BTW, the native version lacks that flush unless it's used in
native+posix context. I will write a fix.
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-03 8:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <E1SEhxD-0007Jo-Tb@domain.hid>
2012-04-02 14:35 ` [Xenomai-core] [Xenomai-git] Jan Kiszka : Add regression test for mprotect on pinned memory Gilles Chanteperdrix
2012-04-03 8:37 ` Jan Kiszka
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.