Added "tr" command (NuTestRecord).

This commit is contained in:
Andy McFadden 2003-02-23 19:13:58 +00:00
parent b5a25968d6
commit 693ddd6d61
1 changed files with 17 additions and 0 deletions

View File

@ -981,6 +981,20 @@ TestFunc(ExerciserState* pState, int argc, char** argv)
return NuTest(ExerciserState_GetNuArchive(pState));
}
/*
* tr - test record
*/
static NuError
TestRecordFunc(ExerciserState* pState, int argc, char** argv)
{
(void) pState, (void) argc, (void) argv; /* shut up, gcc */
assert(ExerciserState_GetNuArchive(pState) != nil);
assert(argc == 2);
return NuTestRecord(ExerciserState_GetNuArchive(pState),
strtol(argv[1], nil, 0));
}
/*
* upt - update pre-sized thread
*/
@ -1113,6 +1127,8 @@ static const struct {
"Set record attributes" },
{ "t", TestFunc, 0, "", kFlagArchiveReq,
"Test archive" },
{ "tr", TestRecordFunc, 1, "recordIdx", kFlagArchiveReq,
"Test record" },
{ "upt", UpdatePresizedThreadFunc, 1, "threadIdx", kFlagArchiveReq,
"Update pre-sized thread" },
};
@ -1330,6 +1346,7 @@ main(void)
&nufxLibDate, &nufxLibFlags);
printf("NufxLib exerciser, linked with NufxLib v%ld.%ld.%ld [%s]\n\n",
majorVersion, minorVersion, bugVersion, nufxLibFlags);
printf("Use 'h' or '?' for help, 'q' to quit.\n");
/* stuff useful when debugging lots */
if (unlink(kTempFile) == 0)