<h3>Contribution description</h3>
<p>Even if using <code>%f</code> the <code>printf_float</code> module was not used.</p>
<p>When running the test on <code>samr21-xpro</code> and <code>arduino-mega2560</code> the float<br>
is not printed correctly.</p>
<ul>
<li>samr21-xpro <code> false positive rate.</code></li>
<li>arduino-mega2560 <code>? false positive rate.</code></li>
</ul>
<p>As the arduino-mega2560 does not handle printf_float use<br>
<code>fmt/print_float</code>.</p>
<p>The output should be flushed before using fmt/print functions if<br>
available as they do not use <code>printf</code> buffer.</p>
<h3>Testing procedure</h3>
<p>Run the <code>tests/bloom_bytes</code> test on <code>samr21-xpro</code> and <code>arduino-mega2560</code> (or same family).</p>
<p>In master the <code>false positive rate</code> is not printed correctly.<br>
The updated test can be run without the last commit to verify also it is failing.</p>
<p>New output with:</p>
<p><code>samr21-xpro</code></p>
<pre><code>2019-02-21 15:59:12,498 - INFO # main(): Tmain(): This is RIOT! (Version: 2019.04-devel-242-ga554ef-pr/tests/bloom_bytes/float_handling)                                                                                                                                                  
2019-02-21 15:59:12,500 - INFO # Testing Bloom filter.                                                                                                                                                                                                                                    
2019-02-21 15:59:12,500 - INFO #                                                                                                                                                                                                                                                          
2019-02-21 15:59:12,501 - INFO # m: 4096 k: 8                                                                                                                                                                                                                                             
2019-02-21 15:59:12,502 - INFO #                                                                                                                                                                                                                                                          
2019-02-21 15:59:12,768 - INFO # adding 512 elements took 262ms                                                                                                                                                                                                                           
2019-02-21 15:59:15,227 - INFO # checking 10000 elements took 2448ms                                                                                                                                                                                                                      
2019-02-21 15:59:15,227 - INFO #                                                                                                                                                                                                                                                          
2019-02-21 15:59:15,230 - INFO # 267 elements probably in the filter.                                                                                                                                                                                                                     
2019-02-21 15:59:15,233 - INFO # 9733 elements not in the filter.                                                                                                                                                                                                                         
2019-02-21 15:59:15,236 - INFO # 0.026700 false positive rate.                                                                                                                                                                                                                            
2019-02-21 15:59:15,236 - INFO #                             
2019-02-21 15:59:15,237 - INFO # All done!
</code></pre>
<p><code>arduino-mega2560</code></p>
<pre><code>2019-02-21 16:00:13,413 - INFO # main(): This is RIOT! (Version: 2019.04-devel-242-ga554ef-pr/tests/bloom_bytes/float_handling)                                                                                                                                                           
2019-02-21 16:00:13,438 - INFO # Testing Bloom filter.                                                                                                                                                                                                                                    
2019-02-21 16:00:13,438 - INFO #                                                                                                                                                                                                                                                          
2019-02-21 16:00:13,450 - INFO # m: 4096 k: 8                                                                                                                                                                                                                                             
2019-02-21 16:00:13,450 - INFO #
2019-02-21 16:00:20,200 - INFO # adding 512 elements took 6716ms
2019-02-21 16:01:02,354 - INFO # checking 10000 elements took 42126ms
2019-02-21 16:01:02,358 - INFO #
2019-02-21 16:01:02,395 - INFO # 267 elements probably in the filter.
2019-02-21 16:01:02,432 - INFO # 9733 elements not in the filter.
2019-02-21 16:01:02,461 - INFO # 0.026700 false positive rate.
2019-02-21 16:01:02,461 - INFO #
2019-02-21 16:01:02,473 - INFO # All done!
</code></pre>
<p>It is still working in <code>native</code>:</p>
<pre><code>main(): This is RIOT! (Version: 2019.04-devel-243-g642f5e-pr/tests/bloom_bytes/float_handling)
Testing Bloom filter.

m: 4096 k: 8

adding 512 elements took 4ms
checking 10000 elements took 35ms

267 elements probably in the filter.
9733 elements not in the filter.
0.026699 false positive rate.

All done!
</code></pre>
<h3>Issues/PRs references</h3>
<p><span class="issue-keyword tooltipped tooltipped-se" aria-label="This pull request closes issue #11052.">Fixes</span> <a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="412963753" data-permission-text="Issue title is private" data-url="https://github.com/RIOT-OS/RIOT/issues/11052" data-hovercard-type="issue" data-hovercard-url="/RIOT-OS/RIOT/issues/11052/hovercard" href="https://github.com/RIOT-OS/RIOT/issues/11052">#11052</a></p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/RIOT-OS/RIOT/pull/11053'>https://github.com/RIOT-OS/RIOT/pull/11053</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>tests/bloom_bytes: define regexp as raw strings</li>
  <li>tests/bloom_bytes: replace %f with fmt/print_float</li>
  <li>tests/bloom_bytes: explicitely expect a float</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/11053/files#diff-0">tests/bloom_bytes/Makefile</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/11053/files#diff-1">tests/bloom_bytes/main.c</a>
    (10)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/11053/files#diff-2">tests/bloom_bytes/tests/01-run.py</a>
    (10)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/11053.patch'>https://github.com/RIOT-OS/RIOT/pull/11053.patch</a></li>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/11053.diff'>https://github.com/RIOT-OS/RIOT/pull/11053.diff</a></li>
</ul>

<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/11053">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AEn7YIuc2SQSOV5yUI3cnqllWC-TkiV9ks5vPrpzgaJpZM4bHsGI">mute the thread</a>.<img src="https://github.com/notifications/beacon/AEn7YKpGrXKeu4lpZK6OdCh1yRM6Fjviks5vPrpzgaJpZM4bHsGI.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":"DESCRIPTION","message":" tests/bloom_bytes: replace %f with fmt/print_float (#11053)"}],"action":{"name":"View Pull Request","url":"https://github.com/RIOT-OS/RIOT/pull/11053"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/11053",
"url": "https://github.com/RIOT-OS/RIOT/pull/11053",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>