Test the following: More...
Functions | |
| STATIC void | test500 () |
| STATIC void | test501 () |
| STATIC void | test502 () |
| STATIC void | test503 () |
| STATIC void | test504 () |
| STATIC void | test505 () |
| STATIC void | test506 () |
| STATIC void | test508 () |
| test508: Dircache stress test with cache filling and evictions | |
| static int | access_working_set (uint16_t vol, int start_idx, int end_idx, int passes, const char *prefix) |
| Helper: Access a working set of directories multiple times. | |
| static int | sequential_scan (uint16_t vol, int start_idx, int end_idx, const char *prefix) |
| Helper: Perform sequential scan of directories. | |
| STATIC void | test509 () |
| test509: Scan resistance test with realistic workload pattern | |
| void | Dircache_attack_test () |
Test the following:
|
static |
Helper: Access a working set of directories multiple times.
Accesses directories in the specified range multiple times to establish them as "frequently accessed" which should promote them to T2 in ARC.
| [in] | vol | Volume ID |
| [in] | start_idx | Starting directory index |
| [in] | end_idx | Ending directory index (exclusive) |
| [in] | passes | Number of times to access each directory |
| [in] | prefix | Directory name prefix |
| void Dircache_attack_test | ( | ) |
|
static |
Helper: Perform sequential scan of directories.
Sequentially accesses a range of directories once, simulating a scan operation that should pass through ARC's T1 without evicting T2 entries, but would evict LRU cache entries.
| [in] | vol | Volume ID |
| [in] | start_idx | Starting directory index |
| [in] | end_idx | Ending directory index (exclusive) |
| [in] | prefix | Directory name prefix |
| STATIC void test500 | ( | ) |
move and rename dir, enumerate new parent, stat renamed dir
| STATIC void test501 | ( | ) |
move and rename dir, then stat it
| STATIC void test502 | ( | ) |
move and rename dir, enumerate renamed dir
| STATIC void test503 | ( | ) |
move and rename dir, stat renamed dir
| STATIC void test504 | ( | ) |
rename topdir, stat file in subdir of renamed topdir
| STATIC void test505 | ( | ) |
rename dir, stat subdir in renamed dir
| STATIC void test506 | ( | ) |
stat subdir in poisened path
| STATIC void test508 | ( | ) |
test508: Dircache stress test with cache filling and evictions
Test Requirements:
This test exercises core dircache behaviors by creating more directories than can fit in cache, forcing evictions and re-access patterns to test cache management under stress.
Test Pattern:
Expected Behavior:
Verification: Check logs for evictions, cache hits, and (in ARC) ghost hits and adaptations
| STATIC void test509 | ( | ) |
test509: Scan resistance test with realistic workload pattern
Test Requirements:
This test provides a realistic workload pattern that simulates common AFP usage: frequently accessed directories (hot working set) mixed with sequential scans (one-time directory traversals). This pattern is optimized for ARC's frequency detection, but also exposes LRU's limitations for comparison purposes.
Realistic Workload Pattern:
Test Pattern (5 cycles of working set + scan):
Expected Behavior:
Key Differences from test508: