smbtorture: Make BASE-OPENATTR report a failure if it fails.
authorJames Peach <jpeach@samba.org>
Fri, 6 Aug 2010 22:25:12 +0000 (15:25 -0700)
committerJames Peach <jpeach@samba.org>
Wed, 11 Aug 2010 18:11:11 +0000 (11:11 -0700)
source4/torture/basic/attr.c

index 49e8a5975c8a9324250a3bf7af933a72d876b5ba..66d17b439c9f14c071c71ce025124cd255e6d896 100644 (file)
@@ -121,7 +121,8 @@ bool torture_openattrtest(struct torture_context *tctx,
                        if (fnum1 == -1) {
                                for (l = 0; l < ARRAY_SIZE(attr_results); l++) {
                                        if (attr_results[l].num == k) {
                        if (fnum1 == -1) {
                                for (l = 0; l < ARRAY_SIZE(attr_results); l++) {
                                        if (attr_results[l].num == k) {
-                                               torture_comment(tctx, "[%d] trunc open 0x%x -> 0x%x of %s failed - should have succeeded !(%s)\n",
+                                               torture_result(tctx, TORTURE_FAIL,
+                                                               "[%d] trunc open 0x%x -> 0x%x of %s failed - should have succeeded !(%s)",
                                                                k, open_attrs_table[i],
                                                                open_attrs_table[j],
                                                                fname, smbcli_errstr(cli1->tree));
                                                                k, open_attrs_table[i],
                                                                open_attrs_table[j],
                                                                fname, smbcli_errstr(cli1->tree));
@@ -160,7 +161,8 @@ bool torture_openattrtest(struct torture_context *tctx,
                                        if (attr != attr_results[l].result_attr ||
                                            open_attrs_table[i] != attr_results[l].init_attr ||
                                            open_attrs_table[j] != attr_results[l].trunc_attr) {
                                        if (attr != attr_results[l].result_attr ||
                                            open_attrs_table[i] != attr_results[l].init_attr ||
                                            open_attrs_table[j] != attr_results[l].trunc_attr) {
-                                               torture_comment(tctx, "[%d] getatr check failed. [0x%x] trunc [0x%x] got attr 0x%x, should be 0x%x\n",
+                                               torture_result(tctx, TORTURE_FAIL,
+                                                       "[%d] getatr check failed. [0x%x] trunc [0x%x] got attr 0x%x, should be 0x%x",
                                                       k, open_attrs_table[i],
                                                       open_attrs_table[j],
                                                       (unsigned int)attr,
                                                       k, open_attrs_table[i],
                                                       open_attrs_table[j],
                                                       (unsigned int)attr,