#73 closed defect (fixed)
psTrace testing
| Reported by: | Paul Price | Owned by: | |
|---|---|---|---|
| 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 , 22 years ago
| Owner: | changed from to |
|---|
comment:2 by , 22 years ago
| Status: | new → assigned |
|---|
comment:3 by , 22 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
comment:4 by , 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 , 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:7 by , 21 years ago
| Keywords: | VERIFIED removed |
|---|

Test implemented in tst_psTrace.c