[LTP] [PATCH 1/3] syscalls/mq_timed{send|receive}: Add test cases for bad address

Cyril Hrubis chrubis@suse.cz
Wed Aug 5 17:22:44 CEST 2020


Hi!
> This patch introduces test cases for already existing
> tests for syscalls 'mq_timedsend()' and 'mq_timedreceive()'
> (mq_timedsend01, mq_timedreceive01). These test cases are for
> situations when bad addresses are passed for arguments 'msg_ptr'
> and 'abs_timeout' in which case errno 'EFAULT' is expected to be set.
> Value '(void *)1' is used as a bad address for these arguments.
> 
> Implementation notes:
> 
>    Structure 'struct test_case' from file 'mq_timed.h' was modified
>    with addition of two fields (bad_msg_addr and bad_ts_addr) which
>    represent indicators for the implemented testcases. They are set
>    to 1 for the new added test cases. These fileds are checked before
>    running the test to see if bad address value '(void *)1' should be
>    passed for the above mentioned arguments.

This is pretty clear from the patch itself. I'm not sure if there is
any added value in writing paragraphs that describe the obvious like
this one.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list