Not always reproducible
root@SC-1:~# /hostfs/immoitest 6 4 Suite 6: Augmented CCBs immoitest: test_saImmOiAugmentCcbInitialize.c:717: saImmOiCcbAugmentInitialize_04: Assertion `callbackCounter == 6' failed. Aborted (core dumped)
Analysis:
Increment of 'callbackCounter' in the OI callbacks is not atomic.
Even when the 2 OIs receives 6 callbacks in total, 'callbackCounter' may not be 6.
/* Wait for 2 completed and 2 apply callbacks */ while(callbackCounter != 6 && threadCounter == 2) usleep(500); assert(callbackCounter == 6);
In that case, the OI threads will exit after 2 seconds (poll time out).
That results in the while() loop stopping (threadCounter != 2) and assertion failing.
'callbackCounter' and 'threadCounter" should be thread-safe.
default (5.1) [staging:13c4ea]
changeset: 7702:13c4eac607cd
user: Hung Nguyen hung.d.nguyen@dektech.com.au
date: Thu May 05 19:00:41 2016 +0700
summary: imm: Make the counters in CcbAugment testcases thread-safe [#1803]
opensaf-5.0.x [staging:49bcaf]
changeset: 7703:49bcaf45ec66
user: Hung Nguyen hung.d.nguyen@dektech.com.au
date: Thu May 05 19:00:41 2016 +0700
summary: imm: Make the counters in CcbAugment testcases thread-safe [#1803]
opensaf-4.7.x [staging:56c4c2]
changeset: 7704:56c4c222b6f0
user: Hung Nguyen hung.d.nguyen@dektech.com.au
date: Wed Jun 08 14:34:23 2016 +0700
summary: imm: Make the counters in CcbAugment testcases thread-safe [#1803]
Related
Commit: [13c4ea]
Commit: [49bcaf]
Commit: [56c4c2]
Tickets:
#1803