[LTP] [PATCH v3] mmap01: Convert to new API
Cyril Hrubis
chrubis@suse.cz
Thu Nov 28 15:26:02 CET 2024
Hi!
> + if (system(cmd_buffer) != 0) {
> + tst_res(TPASS, "Functionality of mmap() successful");
> + } else {
> + tst_res(TFAIL, "Specified pattern found in file");
> + return;
> + }
Can we please get rid of this ugly hack as well?
We can easily fork a child that would read the file and look for the
pattern instead. Also we do not even have to look for the patern, just
occurence of one these letters would be a failure. So we can write even
easier loop that would just read the file and check that it contains
only valid data.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list