Bug #48337 tap test prints a failure message, which is correct, but confusing for reader
Submitted: 27 Oct 2009 3:05 Modified: 29 Jan 2010 5:39
Reporter: jack andrews Email Updates:
Status: Closed Impact on me:
None 
Category:Tests: Cluster Severity:S3 (Non-critical)
Version:mysql-5.1-telco-7.0 OS:Any
Assigned to: jack andrews CPU Architecture:Any

[27 Oct 2009 3:05] jack andrews
Description:
jack andrews wrote:
> i just discovered that tap tests are run in club.
> NdbDir-t prints a 'Failed' message, but it passes.
> would it be better not to print this message?
>
> Running tests: mytap mysys ../storage
> ../storage/ndb/src/common/portlib/RelWithDebInfo/NdbDir-t.........Failed to open iterator for 'c:\Users\club\AppData\Local\Temp\\ndbdir_test\'
> Failed to open iterator for 'c:\Users\club\AppData\Local\Temp\\ndbdir_test\'
> ok
>

True, it's a little confusing. But the test is a negative test which checks that it "works" to open a non existing directory.

When using this in ndbd or elsewhere, it's very useful to get the printout, so I don't think we should remove it. Instead you can add an explanation printout in the testcase that says "Checking that proper error is returned when opening non existing directory"

/ Magnus 

How to repeat:
.

Suggested fix:
you can add an explanation printout in the testcase that says "Checking that proper error is returned when opening non existing directory"
[1 Dec 2009 2:21] jack andrews
--- ndbdir-t-48337.orig/storage/ndb/src/common/portlib/NdbDir.cpp       2009-12-01 12:58:54.000000000 +1100
+++ ndbdir-t-48337/storage/ndb/src/common/portlib/NdbDir.cpp    2009-12-01 13:19:09.506000000 +1100
@@ -414,6 +414,8 @@
   CHECK(gone(path));

   // Remove non exisiting directory
+  fprintf(stderr, "Checking that proper error is returned when "
+                  "opening non existing directory\n");
   CHECK(!NdbDir::remove_recursive(path));
   CHECK(gone(path));
[18 Dec 2009 22:31] Magnus BlÄudd
Will be revieed when commit mail attaches to bug