diff options
author | Volker Lendecke <vl@samba.org> | 2012-02-22 17:57:08 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2012-02-22 23:56:17 +0100 |
commit | e673afada1248535b992ceb28b8fcef106a85e05 (patch) | |
tree | f5a86871f1c826ae9d540cabc58c6f7014f97179 /source3 | |
parent | 108253250048673493a636fd9fb2bf99b64ccf3c (diff) | |
download | samba-e673afada1248535b992ceb28b8fcef106a85e05.tar.gz samba-e673afada1248535b992ceb28b8fcef106a85e05.tar.bz2 samba-e673afada1248535b992ceb28b8fcef106a85e05.zip |
s3-vfstest: Return an error code if cmd failed
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Wed Feb 22 23:56:18 CET 2012 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r-- | source3/torture/vfstest.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/torture/vfstest.c b/source3/torture/vfstest.c index 53b5ee99d9..40e78e87f2 100644 --- a/source3/torture/vfstest.c +++ b/source3/torture/vfstest.c @@ -452,6 +452,7 @@ int main(int argc, char *argv[]) char cwd[MAXPATHLEN]; TALLOC_CTX *frame = talloc_stackframe(); struct tevent_context *ev = tevent_context_init(NULL); + NTSTATUS status = NT_STATUS_OK; /* make sure the vars that get altered (4th field) are in a fixed location or certain compilers complain */ @@ -532,11 +533,11 @@ int main(int argc, char *argv[]) char *p = cmdstr; while((cmd=next_command(frame, &p)) != NULL) { - process_cmd(&vfs, cmd); + status = process_cmd(&vfs, cmd); } TALLOC_FREE(cmd); - return 0; + return NT_STATUS_IS_OK(status) ? 0 : 1; } /* Loop around accepting commands */ @@ -551,12 +552,12 @@ int main(int argc, char *argv[]) } if (line[0] != '\n') { - process_cmd(&vfs, line); + status = process_cmd(&vfs, line); } SAFE_FREE(line); } TALLOC_FREE(vfs.conn); TALLOC_FREE(frame); - return 0; + return NT_STATUS_IS_OK(status) ? 0 : 1; } |