View Issue Details

IDProjectCategoryView StatusLast Update
0004706Talermerchant backendpublic2024-01-12 14:04
ReporterMarcello Stanisci Assigned ToMarcello Stanisci  
PrioritynormalSeveritytweakReproducibilityhave not tried
Status closedResolutionno change required 
Product Versiongit (master) 
Target Version0.2Fixed in Version0.2 
Summary0004706: Unify "return style" in testcase
DescriptionThe merchant-lib testcase uses two different styles to handle errors.
Style 1:

if (!x)
{
  fail (is);
  return;
}

Stile 2
GNUNET_assert (x)

Unify.
TagsNo tags attached.

Activities

Christian Grothoff

2016-10-07 00:34

manager   ~0011266

I'm not sure this is needed. In one case, we produce an error but continue with the test, in the other we die hard. It's perfectly OK for the test to die hard on some errors and to throw a more soft error on others IMO.

Christian Grothoff

2016-10-07 00:36

manager   ~0011267

That said, we should of course ideally have a rhyme or reason behind the style chosen. For example, we should avoid assert-style death if the test should really clean up behind itself; OTOH, cleaning up is not always a good thing, as it may hurt diagnosing the error. So IF clean up would be useful and not hurt understanding the bug, then the fail()-style error is fine. If OTOH we really ought to create a core dump and leave the database behind, assert()-style is better.

Marcello Stanisci

2016-10-07 11:09

reporter   ~0011269

Ok, I leave this 'feedback' as I need to look at any return situation.

Marcello Stanisci

2016-10-07 11:10

reporter   ~0011270

It got assigned automatically! Ok.

Issue History

Date Modified Username Field Change
2016-10-04 22:14 Marcello Stanisci New Issue
2016-10-04 22:14 Marcello Stanisci Status new => assigned
2016-10-04 22:14 Marcello Stanisci Assigned To => Marcello Stanisci
2016-10-04 22:16 Marcello Stanisci Description Updated
2016-10-07 00:34 Christian Grothoff Note Added: 0011266
2016-10-07 00:36 Christian Grothoff Note Added: 0011267
2016-10-07 00:36 Christian Grothoff Status assigned => feedback
2016-10-07 00:36 Christian Grothoff Severity minor => tweak
2016-10-07 00:36 Christian Grothoff Product Version => git (master)
2016-10-07 00:37 Christian Grothoff Summary Unify "return stiyle" in testcase => Unify "return style" in testcase
2016-10-07 11:09 Marcello Stanisci Note Added: 0011269
2016-10-07 11:09 Marcello Stanisci Status feedback => assigned
2016-10-07 11:10 Marcello Stanisci Note Added: 0011270
2016-10-14 15:37 Christian Grothoff Status assigned => resolved
2016-10-14 15:37 Christian Grothoff Fixed in Version => 0.2
2016-10-14 15:37 Christian Grothoff Resolution open => no change required
2016-10-14 15:37 Christian Grothoff Target Version => 0.2
2016-11-20 03:26 Christian Grothoff Status resolved => closed
2024-01-12 14:04 Christian Grothoff Category merchant backend API (C) => mechant backend
2025-03-22 14:09 Christian Grothoff Category mechant backend => merchant backend