Re: [PATCH v1 3/3] libtracefs: Add unit tests for user_events

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 18 Feb 2022 14:50:58 -0800
Beau Belgrave <beaub@xxxxxxxxxxxxxxxxxxx> wrote:

> @@ -871,6 +872,235 @@ static void test_eprobes(void)
>  	test_eprobes_instance(test_instance);
>  }
>  
> +#ifdef USEREVENTS
> +struct user_test_context {
> +	int seen;
> +	int failed;
> +};
> +static int user_callback(struct tep_event *event, struct tep_record *record,
> +			  int cpu, void *context)
> +{
> +	struct tep_format_field *field;
> +	struct user_test_context *user_context;
> +	__u32 *rel, size, offset;
> +       

The above line has extra white space.

-- Steve

> +	user_context = (struct user_test_context *)context;
> +	user_context->seen++;
> +
> +	field = tep_find_field(event, "u8");
> +	if (!field || *(__u8 *)(record->data + field->offset) != 1)
> +	{
> +		user_context->failed = 1;
> +		return -1;
> +	}



[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux