[PATCH v2] tests/syslog: GSOC Microproject: Modify test to pass imposed LSM configs

Dmitry V. Levin ldv at altlinux.org
Mon Mar 4 13:42:37 UTC 2019


On Sat, Mar 02, 2019 at 09:00:36PM +0530, Bharath Vedartham wrote:
> The current syslog test covers only cases where the type parameter is SYSLOG_ACTION_READ, SYSLOG_ACTION_READ_ALL, SYSLOG_ACTION_READ_CLEAR as per codecov.
> 
> Add test case to cover rest of the default cases.
> 
> PS: I am looking to apply for Gsoc. This is my first patch to strace.
> 
> ---
> Changes in v2:
>     - Used SYSLOG_ACTION_CLEAR which is a privileged instruction. This will fail before the LSM hooks.

strace tests are allowed to be run by a privileged user, too,
so the test shouldn't expect that a certain operation will fail
because it is a privileged one.

> ---
>  tests/syslog.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/syslog.c b/tests/syslog.c
> index fb933e7..b3b4154 100644
> --- a/tests/syslog.c
> +++ b/tests/syslog.c
> @@ -14,7 +14,7 @@
>  # include <unistd.h>
>  
>  # define SYSLOG_ACTION_READ 2
> -# define SYSLOG_ACTION_SIZE_BUFFER 10
> +# define SYSLOG_ACTION_CLEAR 5

When submitting a modified version of the patch, please use not the
patched tree but the master tree as the base tree, otherwise
the context is irrelevant which complicates the review process a lot.

Thanks,


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20190304/c67101fd/attachment.bin>


More information about the Strace-devel mailing list