Commit 948b3b2
selftests: cachestat: add tests for mmap, refactor and enhance mmap test for cachestat validation
Add a cohesive test case that verifies cachestat behavior with
memory-mapped files using mmap(). Also refactor the test logic to reduce
redundancy, improve error reporting, and clarify failure messages for both
shmem and mmap file types.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Suresh K C <[email protected]>
Reviewed-by: Joshua Hahn <[email protected]>
Tested-by: Nhat Pham <[email protected]>
Acked-by: Nhat Pham <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Shuah Khan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>1 parent aec2d49 commit 948b3b2
1 file changed
+55
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
36 | 41 | | |
37 | 42 | | |
38 | 43 | | |
| |||
201 | 206 | | |
202 | 207 | | |
203 | 208 | | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
204 | 219 | | |
205 | | - | |
| 220 | + | |
| 221 | + | |
206 | 222 | | |
207 | 223 | | |
208 | 224 | | |
| |||
212 | 228 | | |
213 | 229 | | |
214 | 230 | | |
| 231 | + | |
215 | 232 | | |
216 | | - | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
217 | 237 | | |
218 | 238 | | |
219 | | - | |
| 239 | + | |
220 | 240 | | |
221 | 241 | | |
222 | 242 | | |
223 | 243 | | |
224 | 244 | | |
225 | | - | |
| 245 | + | |
226 | 246 | | |
227 | 247 | | |
228 | 248 | | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
234 | 273 | | |
235 | | - | |
236 | 274 | | |
237 | 275 | | |
238 | 276 | | |
| |||
308 | 346 | | |
309 | 347 | | |
310 | 348 | | |
311 | | - | |
| 349 | + | |
312 | 350 | | |
313 | 351 | | |
314 | 352 | | |
315 | 353 | | |
316 | 354 | | |
317 | 355 | | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
318 | 362 | | |
319 | 363 | | |
0 commit comments