diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-11-22 13:39:47 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-11-22 13:39:47 +0000 |
commit | a936abe8eb1ed634d49f59e28f45d864ef538ea5 (patch) | |
tree | 30e94744286e10501022c61c93fbbe20ed4c20a3 /regress/lib | |
parent | 5cb8f3f90317da50507550e5e403fe7aa04da5d5 (diff) |
Return different error number to know which test is failing.
Diffstat (limited to 'regress/lib')
-rw-r--r-- | regress/lib/libfuse/fuse-opt-add-arg.c | 10 | ||||
-rw-r--r-- | regress/lib/libfuse/fuse-opt-add-opt-escaped.c | 12 | ||||
-rw-r--r-- | regress/lib/libfuse/fuse-opt-add-opt.c | 16 | ||||
-rw-r--r-- | regress/lib/libfuse/fuse-opt-insert-arg.c | 24 | ||||
-rw-r--r-- | regress/lib/libfuse/fuse-opt-match.c | 14 |
5 files changed, 38 insertions, 38 deletions
diff --git a/regress/lib/libfuse/fuse-opt-add-arg.c b/regress/lib/libfuse/fuse-opt-add-arg.c index eb28060a1e8..21ab05d6033 100644 --- a/regress/lib/libfuse/fuse-opt-add-arg.c +++ b/regress/lib/libfuse/fuse-opt-add-arg.c @@ -42,20 +42,20 @@ main(int ac, char **av) if (!args.allocated) return (1); if (fuse_opt_add_arg(&args, NULL) != -1) - return (1); + return (2); if (fuse_opt_add_arg(&args, "") != -1) - return (1); + return (3); for (i = 0; i < len; i++) if (strcmp(args.argv[i+1], argstest[i]) != 0) - return (1); + return (4); if (args.argc != len + 1) - return (1); + return (5); fuse_opt_free_args(&args); if (args.allocated) - return (1); + return (6); return (0); } diff --git a/regress/lib/libfuse/fuse-opt-add-opt-escaped.c b/regress/lib/libfuse/fuse-opt-add-opt-escaped.c index b9c3711bfea..ee715427e3d 100644 --- a/regress/lib/libfuse/fuse-opt-add-opt-escaped.c +++ b/regress/lib/libfuse/fuse-opt-add-opt-escaped.c @@ -31,18 +31,18 @@ main(int ac, char **av) return (1); if (fuse_opt_add_opt_escaped(&opt, "-a") != 0) - return (1); + return (2); if (fuse_opt_add_opt_escaped(&opt, ",a,b,c") != 0) - return (1); + return (3); if (fuse_opt_add_opt_escaped(&opt, "\\,\\,,,,\\\\,") != 0) - return (1); + return (4); if (fuse_opt_add_opt_escaped(&opt, "test") != 0) - return (1); + return (5); if (fuse_opt_add_opt_escaped(&opt, NULL) != -1) - return (1); + return (6); if (fuse_opt_add_opt_escaped(&opt, "") != -1) - return (1); + return (7); return (strcmp(opt, opt2)); } diff --git a/regress/lib/libfuse/fuse-opt-add-opt.c b/regress/lib/libfuse/fuse-opt-add-opt.c index 449afcef30f..2ce4c2dec9d 100644 --- a/regress/lib/libfuse/fuse-opt-add-opt.c +++ b/regress/lib/libfuse/fuse-opt-add-opt.c @@ -31,22 +31,22 @@ main(int ac, char **av) return (1); if (fuse_opt_add_opt(&opt, "-a") != 0) - return (1); + return (2); if (fuse_opt_add_opt(&opt, "--bc") != 0) - return (1); + return (3); if (fuse_opt_add_opt(&opt, "01234") != 0) - return (1); + return (4); if (fuse_opt_add_opt(&opt, "-56789") != 0) - return (1); + return (5); if (fuse_opt_add_opt(&opt, "-o test1") != 0) - return (1); + return (6); if (fuse_opt_add_opt(&opt, "test") != 0) - return (1); + return (7); if (fuse_opt_add_opt(&opt, NULL) != -1) - return (1); + return (8); if (fuse_opt_add_opt(&opt, "") != -1) - return (1); + return (9); return (strcmp(opt, opt2)); } diff --git a/regress/lib/libfuse/fuse-opt-insert-arg.c b/regress/lib/libfuse/fuse-opt-insert-arg.c index f3505f7a2c3..627866f7f0e 100644 --- a/regress/lib/libfuse/fuse-opt-insert-arg.c +++ b/regress/lib/libfuse/fuse-opt-insert-arg.c @@ -36,35 +36,35 @@ main(int ac, char **av) if (fuse_opt_insert_arg(&args, 1, "test") != 0) return (1); if (fuse_opt_insert_arg(&args, 1, "-d") != 0) - return (1); + return (2); if (fuse_opt_insert_arg(&args, 3, "barfoo") != 0) - return (1); + return (3); if (fuse_opt_insert_arg(&args, 3, "--test") != 0) - return (1); + return (4); if (fuse_opt_insert_arg(&args, 4, "-o foo") != 0) - return (1); + return (5); if (!args.allocated) - return (1); + return (6); if (fuse_opt_insert_arg(&args, 1, NULL) != -1) - return (1); + return (7); if (fuse_opt_insert_arg(&args, 1, "") != -1) - return (1); + return (8); if (fuse_opt_insert_arg(&args, -1, "foo") != -1) - return (1); + return (9); if (fuse_opt_insert_arg(&args, 42, "foo") != -1) - return (1); + return (10); for (i = 0; i < len; i++) if (strcmp(args.argv[i+1], argstest[i]) != 0) - return (1); + return (11); if (args.argc != len + 1) - return (1); + return (12); fuse_opt_free_args(&args); if (args.allocated) - return (1); + return (13); return (0); } diff --git a/regress/lib/libfuse/fuse-opt-match.c b/regress/lib/libfuse/fuse-opt-match.c index 3dacdd11d00..a9d2c4176a3 100644 --- a/regress/lib/libfuse/fuse-opt-match.c +++ b/regress/lib/libfuse/fuse-opt-match.c @@ -40,20 +40,20 @@ match_opts(const struct fuse_opt *opts, const int *results) if (fuse_opt_match(opts, NULL) != 0) return (1); if (fuse_opt_match(opts, "") != 0) - return (1); + return (2); if (fuse_opt_match(opts, "bar=") != results[0]) - return (1); + return (3); if (fuse_opt_match(opts, "--foo=") != results[1]) - return (1); + return (4); if (fuse_opt_match(opts, "bar=%s") != results[2]) - return (1); + return (5); if (fuse_opt_match(opts, "--foo=%lu") != results[3]) - return (1); + return (6); if (fuse_opt_match(opts, "-x ") != results[4]) - return (1); + return (7); if (fuse_opt_match(opts, "-x %s") != results[5]) - return (1); + return (8); return (0); } |