IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Opened 22 years ago

Closed 22 years ago

Last modified 21 years ago

#73 closed defect (fixed)

psTrace testing

Reported by: Paul Price Owned by: george.gusciora@…
Priority: high Milestone:
Component: sys Version: unspecified
Severity: normal Keywords:
Cc:

Description

The important property of inheritance of trace levels is not tested ("A facility
inherits the trace level of its parent, unless explicitly specified.", SDRS-01
p9). I suggest something like:

psTraceSetLevel(".inher", 4);
psTrace(".inher.itance", 5, "This message should not be displayed (%x)\n",

0xbeefface);

psTrace(".inher.itance", 4, "This message should be displayed (%x)\n",

0xbeefface);

psTrace(".inher.itance", 1, "This message should be displayed (%x)\n",

0xbeefface);

Change History (7)

comment:1 by robert.desonia@…, 22 years ago

Owner: changed from robert.desonia@… to george.gusciora@…

comment:2 by robert.desonia@…, 22 years ago

Status: newassigned

comment:3 by Eric.VanAlst@…, 22 years ago

Resolution: fixed
Status: assignedclosed

Test implemented in tst_psTrace.c

comment:4 by Paul Price, 22 years ago

The only occurences of psTrace() in tst_psTrace.c are in function testTrace04():

(void)psTraceSetLevel(".", 4);
psTrace(".", 5, "(0) This message should not be displayed (%x)\n",

0xbeefface);

(void)psTraceSetLevel(".", 7);
psTrace(".", 5, "(0) This message should be displayed (%x)\n",

0xbeefface);

(void)psTraceSetLevel(".a", 4);
psTrace(".a", 5, "(1) This message should not be displayed (%x)\n",

0xbeefface);

(void)psTraceSetLevel(".a", 7);
psTrace(".a", 5, "(1) This message should be displayed (%x)\n",

0xbeefface);

(void)psTraceSetLevel(".a.b", 4);
psTrace(".a.b", 5, "(2) This message should not be displayed (%x)\n",

0xbeefface);

(void)psTraceSetLevel(".a.b", 7);
psTrace(".a.b", 5, "(2) This message should be displayed (%x)\n",

0xbeefface);

These calls do not test the property of inheritance, since the level is set
before each call to psTrace().

comment:5 by gusciora@…, 22 years ago

Dynamic inheritance is tested in another part of tst_trace.c: the
testTrace02() procedure. I added a specific check for the component levels
into the code itself, rather than simply checking the stdout.

Also, I fixed a bug with dynamic inheritance in the code.

comment:6 by Paul Price, 22 years ago

Keywords: VERIFIED added

OK, I see it.

comment:7 by Paul Price, 21 years ago

Keywords: VERIFIED removed
Note: See TracTickets for help on using tickets.