00240 {
00241
MCB Mcb;
00242 ULONG i;
00243 ULONG Vbn,Lbn,Length;
00244
00245
DbgPrint(
"\n\n\n>>>> Test PbRemoveMcbEntry <<<<\n");
00246
00247 PbInitializeMcb(Mcb, NonPagedPool);
00248
if (!PbAddMcbEntry(Mcb, 0, 1000, 100)) {
DbgPrint(
"Error\n");
return FALSE;}
00249
00250
DbgPrint(
"\nTest --Previous--| Hole\n");
00251 PbRemoveMcbEntry(Mcb, 90, 10);
00252
PbDumpMcb( Mcb );
00253
00254
DbgPrint(
"\nTest --Previous--| Hole |--Following--\n");
00255 PbRemoveMcbEntry(Mcb, 50, 10);
00256
PbDumpMcb( Mcb );
00257
00258
DbgPrint(
"\nTest --Previous--| Hole |--Hole--\n");
00259 PbRemoveMcbEntry(Mcb, 40, 10);
00260
PbDumpMcb( Mcb );
00261
00262
DbgPrint(
"\nTest --hole--| Hole |--Following--\n");
00263 PbRemoveMcbEntry(Mcb, 60, 10);
00264
PbDumpMcb( Mcb );
00265
00266
DbgPrint(
"\nTest --hole--| Hole\n");
00267 PbRemoveMcbEntry(Mcb, 70, 20);
00268
PbDumpMcb( Mcb );
00269
00270
DbgPrint(
"\nTest 0: Hole |--Following--\n");
00271 PbRemoveMcbEntry(Mcb, 0, 10);
00272
PbDumpMcb( Mcb );
00273
00274
DbgPrint(
"\nTest over remove\n");
00275 PbRemoveMcbEntry(Mcb, 0, 100);
00276
PbDumpMcb( Mcb );
00277
00278 PbUninitializeMcb(Mcb);
00279
00280
00281
00282 PbInitializeMcb(Mcb, NonPagedPool);
00283
if (!PbAddMcbEntry(Mcb, 0, 1000, 100)) {
DbgPrint(
"Error\n");
return FALSE;}
00284
00285 PbRemoveMcbEntry(Mcb, 10, 10);
00286
DbgPrint(
"\nTest 0: Hole |--Hole--\n");
00287 PbRemoveMcbEntry(Mcb, 0, 10);
00288
PbDumpMcb( Mcb );
00289
00290 PbRemoveMcbEntry(Mcb, 30, 10);
00291
DbgPrint(
"\nTest --Hole--| Hole |--Hole--\n");
00292 PbRemoveMcbEntry(Mcb, 20, 10);
00293
PbDumpMcb( Mcb );
00294
00295
DbgPrint(
"\nTest over remove\n");
00296 PbRemoveMcbEntry(Mcb, 0, 100);
00297
PbDumpMcb( Mcb );
00298
00299 PbUninitializeMcb(Mcb);
00300
00301
00302
00303 PbInitializeMcb(Mcb, NonPagedPool);
00304
if (!PbAddMcbEntry(Mcb, 0, 1000, 100)){
DbgPrint(
"Error\n");
return FALSE;}
00305
00306
DbgPrint(
"\nTest 0: Hole\n");
00307 PbRemoveMcbEntry(Mcb, 0, 100);
00308
PbDumpMcb( Mcb );
00309
00310
if (!PbAddMcbEntry(Mcb, 0, 1000, 30)) {
DbgPrint(
"Error\n");
return FALSE;}
00311
if (!PbAddMcbEntry(Mcb, 30, 1130, 30)) {
DbgPrint(
"Error\n");
return FALSE;}
00312
if (!PbAddMcbEntry(Mcb, 60, 1060, 30)) {
DbgPrint(
"Error\n");
return FALSE;}
00313
if (!PbAddMcbEntry(Mcb, 90, 1190, 10)) {
DbgPrint(
"Error\n");
return FALSE;}
00314
00315
DbgPrint(
"\nTest --Previous--| Hole |--Index--||--Following--\n");
00316 PbRemoveMcbEntry(Mcb, 30, 10);
00317
PbDumpMcb( Mcb );
00318
00319
DbgPrint(
"\nTest --Hole--| Hole |--Index--||--Following--\n");
00320 PbRemoveMcbEntry(Mcb, 40, 10);
00321
PbDumpMcb( Mcb );
00322
00323
DbgPrint(
"\nTest --Previous--||--Index--| Hole |--Following--\n");
00324 PbRemoveMcbEntry(Mcb, 80, 10);
00325
PbDumpMcb( Mcb );
00326
00327
DbgPrint(
"\nTest --Previous--||--Index--| Hole |--Hole--\n");
00328 PbRemoveMcbEntry(Mcb, 70, 10);
00329
PbDumpMcb( Mcb );
00330
00331
DbgPrint(
"\nTest 0:|--Index--| Hole |--Index--||--Following--\n");
00332 PbRemoveMcbEntry(Mcb, 10, 10);
00333
PbDumpMcb( Mcb );
00334
00335
DbgPrint(
"\nTest over remove\n");
00336 PbRemoveMcbEntry(Mcb, 0, 100);
00337
PbDumpMcb( Mcb );
00338
00339
00340
00341
if (!PbAddMcbEntry(Mcb, 0, 1000, 30)) {
DbgPrint(
"Error\n");
return FALSE;}
00342
if (!PbAddMcbEntry(Mcb, 30, 1130, 30)) {
DbgPrint(
"Error\n");
return FALSE;}
00343
if (!PbAddMcbEntry(Mcb, 60, 1060, 30)) {
DbgPrint(
"Error\n");
return FALSE;}
00344
if (!PbAddMcbEntry(Mcb, 90, 1190, 10)) {
DbgPrint(
"Error\n");
return FALSE;}
00345
00346
DbgPrint(
"\nTest --Previous--||--Index--| Hole |--Index--||--Following--\n");
00347 PbRemoveMcbEntry(Mcb, 40, 10);
00348
PbDumpMcb( Mcb );
00349
00350
DbgPrint(
"\nTest 0:|--Index--| Hole |--Following--\n");
00351 PbRemoveMcbEntry(Mcb, 20, 10);
00352
PbDumpMcb( Mcb );
00353
00354
DbgPrint(
"\nTest --Previous--||--Index--| Hole\n");
00355 PbRemoveMcbEntry(Mcb, 80, 20);
00356
PbDumpMcb( Mcb );
00357
00358
DbgPrint(
"\nTest over remove\n");
00359 PbRemoveMcbEntry(Mcb, 0, 100);
00360
PbDumpMcb( Mcb );
00361
00362
00363
if (!PbAddMcbEntry(Mcb, 0, 1000, 100)){
DbgPrint(
"Error\n");
return FALSE;}
00364
00365
DbgPrint(
"\nTest 0:--Index--| Hole\n");
00366 PbRemoveMcbEntry(Mcb, 50, 50);
00367
PbDumpMcb( Mcb );
00368
00369
DbgPrint(
"\nTest over remove\n");
00370 PbRemoveMcbEntry(Mcb, 0, 100);
00371
PbDumpMcb( Mcb );
00372
00373
00374
00375
if (!PbAddMcbEntry(Mcb, 0, 1000, 50)) {
DbgPrint(
"Error\n");
return FALSE;}
00376
if (!PbAddMcbEntry(Mcb, 50, 1150, 50)) {
DbgPrint(
"Error\n");
return FALSE;}
00377
00378
DbgPrint(
"\nTest 0: hole |--Index--||--Following--\n");
00379 PbRemoveMcbEntry(Mcb, 0, 20);
00380
PbDumpMcb( Mcb );
00381
00382 PbUninitializeMcb(Mcb);
00383
00384
return TRUE;
00385
00386 }