View Issue Details

IDProjectCategoryView StatusLast Update
0004706Talermerchant backendpublic2024-01-12 13:04
ReporterMarcello Stanisci Assigned ToMarcello Stanisci Resolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicator 
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
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.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

Christian Grothoff

2016-10-06 22: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-06 22: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 09:09

reporter   ~0011269

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

Marcello Stanisci

2016-10-07 09:10

reporter   ~0011270

It got assigned automatically! Ok.

Issue History

Date ModifiedUsernameFieldChange
2016-10-04 20:14Marcello StanisciNew Issue
2016-10-04 20:14Marcello StanisciStatusnew => assigned
2016-10-04 20:14Marcello StanisciAssigned To => Marcello Stanisci
2016-10-04 20:16Marcello StanisciDescription Updated
2016-10-06 22:34Christian GrothoffNote Added: 0011266
2016-10-06 22:36Christian GrothoffNote Added: 0011267
2016-10-06 22:36Christian GrothoffStatusassigned => feedback
2016-10-06 22:36Christian GrothoffSeverityminor => tweak
2016-10-06 22:36Christian GrothoffProduct Version => git (master)
2016-10-06 22:37Christian GrothoffSummaryUnify "return stiyle" in testcase => Unify "return style" in testcase
2016-10-07 09:09Marcello StanisciNote Added: 0011269
2016-10-07 09:09Marcello StanisciStatusfeedback => assigned
2016-10-07 09:10Marcello StanisciNote Added: 0011270
2016-10-14 13:37Christian GrothoffStatusassigned => informing
2016-10-14 13:37Christian GrothoffFixed in Version => 0.2
2016-10-14 13:37Christian GrothoffResolutionopen => no change required
2016-10-14 13:37Christian GrothoffTarget Version => 0.2
2016-11-20 02:26Christian GrothoffStatusinforming => closed
2024-01-12 13:04Christian GrothoffCategorymerchant backend API (C) => mechant backend
2025-03-22 13:09Christian GrothoffCategorymechant backend => merchant backend