[LTP] [PATCH v3 08/11] Add statmount03 test

Cyril Hrubis chrubis@suse.cz
Wed Jul 10 10:18:55 CEST 2024


Hi!
> +static void run(void)
> +{
> +	memset(st_mount, 0, sizeof(struct statmount));
> +
> +	TST_EXP_PASS(statmount(
> +		root_id,
> +		STATMOUNT_MNT_BASIC,
> +		st_mount,
> +		sizeof(struct statmount),
> +		0));
> +
> +	if (TST_RET == -1)
> +		return;
> +
> +	TST_EXP_EQ_LI(st_mount->mask, STATMOUNT_MNT_BASIC);
> +	TST_EXP_EQ_LI(st_mount->size, sizeof(struct statmount));
> +	TST_EXP_EQ_LI(st_mount->mnt_id, root_id);
> +	TST_EXP_EQ_LI(st_mount->mnt_id_old, root_id_old);
> +	TST_EXP_EQ_LI(st_mount->mnt_parent_id, parent_id);
> +	TST_EXP_EQ_LI(st_mount->mnt_parent_id_old, parent_id_old);
> +	TST_EXP_EQ_LI(st_mount->mnt_propagation, MS_PRIVATE);

You are missing the mnt_master and mnt_peer_group these are I suppose
set to 0 in this case. I guess that we would have bind mount the mount
and make it slave to get the mnt_master set. And I'm not sure how to set
the mnt group id.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list