[LTP] [PATCH v4] dio_truncate.c test refactory with LTP API

Cyril Hrubis chrubis@suse.cz
Fri Nov 19 10:51:23 CET 2021


Hi!
> > -	for (i = 0; i < 100; i++) {
> > -		dio_append(filename, 0);
> > -		truncate(filename, 0);
> > -		dio_append("junkfile", 0xaa);
> > -		truncate("junkfile", 0);
> > -	}
> > -
> >  	for (i = 0; i < num_children; i++) {

Also this should be for (i = 0; i < 100; i++) right?

> > -		kill(pid[i], SIGTERM);
> > +		dio_append(filename, 0, filesize, 200);
> > +		SAFE_TRUNCATE(filename, 0);
> > +		dio_append("junkfile", 0xaa, filesize, 200);
> > +		SAFE_TRUNCATE("junkfile", 0);
> >  	}

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list