<p><b>@kaspar030</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/RIOT-OS/RIOT/pull/10908#discussion_r256364597">tests/thread_msg_block_race/main.c</a>:</p>
<pre style='color:#555'>> +     * used to not call `sched_run()` which was the cause of the bug tested
+     * here */
+    _sched_next();
+    pid = thread_create(_stack, sizeof(_stack), THREAD_PRIORITY_MAIN + 1,
+                        THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
+                        _thread, NULL, "nr2");
+    assert(pid != KERNEL_PID_UNDEF);
+
+    while (1) {
+        msg_t msg = { .type = CANARY_TYPE };
+
+        /* receive blocked */
+        msg_receive(&msg);
+        /* check msg_receive() returned without blocking (i.e. the sending
+         * thread did not get a chance to copy the message over) */
+        assert(msg.type != CANARY_TYPE);
</pre>
<p>We don't have conventions on using assert for tests, right? IMO, the thing that a test tests for shouldn't be tested by "assert()", as it is too easy to accidentally compile it out. It would also make it difficult to run the test but with production CFLAGS.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/10908#pullrequestreview-203171078">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AEn7YBEedc3DqKFKZG0fnH0Yre8Zhf31ks5vM_57gaJpZM4aax89">mute the thread</a>.<img src="https://github.com/notifications/beacon/AEn7YAGOIRqRDfv1qvmC7afHp-MhI4_zks5vM_57gaJpZM4aax89.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/RIOT-OS/RIOT","title":"RIOT-OS/RIOT","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/RIOT-OS/RIOT"}},"updates":{"snippets":[{"icon":"PERSON","message":"@kaspar030 commented on #10908"}],"action":{"name":"View Pull Request","url":"https://github.com/RIOT-OS/RIOT/pull/10908#pullrequestreview-203171078"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/10908#pullrequestreview-203171078",
"url": "https://github.com/RIOT-OS/RIOT/pull/10908#pullrequestreview-203171078",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>