Hi! > > > > Hmm, I would make sure here, that I haven't read more than SIZE > > characters. Eg. I wouldn't expect that device you are testing is null > > terminated, even if you wrote the terminating zero there. > > How about: > > while (s[i] && i < SIZE-1) { > if (s[i] != 'a') > fail++; > i++; > } > > if (i != SIZE-1) > tst_resm(TFAIL, "expect size: %d, actual size: %d.", SIZE-1, i); > else if (s[i] != '\0') > tst_resm(TFAIL, "zram device seems not null terminated"); >
Looks OK. -- Cyril Hrubis chru...@suse.cz ------------------------------------------------------------------------------ Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list