mirror of
https://github.com/fadden/nulib2.git
synced 2025-02-11 12:30:59 +00:00
Added "tr" command (NuTestRecord).
This commit is contained in:
parent
b5a25968d6
commit
693ddd6d61
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user