diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2017-04-24 19:14:41 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2017-04-24 19:14:41 +0000 |
commit | b5304784b565ee064f5904e953d6665df42a82c8 (patch) | |
tree | edba87b58f6648393151646e0652d1b1634526b5 /tests/ioctl_dm.c | |
parent | d64aa388346fbf890277a9254e1ef7b7e245c810 (diff) | |
download | strace-b5304784b565ee064f5904e953d6665df42a82c8.tar.gz |
dm: fix diagnostics about misplaced parts of struct dm_ioctl
* dm.c (dm_decode_dm_target_spec, dm_decode_dm_target_deps,
dm_decode_dm_name_list, dm_decode_dm_target_versions,
dm_decode_dm_target_msg, dm_decode_string, dm_known_ioctl): Fix
diagnostics about various misplaced parts of struct dm_ioctl.
* tests/ioctl_dm.c: Update expected output.
Diffstat (limited to 'tests/ioctl_dm.c')
-rw-r--r-- | tests/ioctl_dm.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/tests/ioctl_dm.c b/tests/ioctl_dm.c index 08f036c6a..403d795ce 100644 --- a/tests/ioctl_dm.c +++ b/tests/ioctl_dm.c @@ -234,15 +234,15 @@ main(void) dm_arg->version[1] = 0xbadc0dee; dm_arg->version[2] = 0xbadc0def; ioctl(-1, DM_VERSION, dm_arg); - printf("ioctl(-1, DM_VERSION, {version=%u.%u.%u, " - "/* Unsupported device mapper ABI version */ ...}) = " + printf("ioctl(-1, DM_VERSION, {version=%u.%u.%u" + " /* unsupported device mapper ABI version */}) = " "-1 EBADF (%m)\n", 0xbadc0ded, 0xbadc0dee, 0xbadc0def); /* Incorrect data_size */ init_s(dm_arg, 14, 64); ioctl(-1, DM_VERSION, dm_arg); - printf("ioctl(-1, DM_VERSION, {version=4.1.2, data_size=14, " - "/* Incorrect data_size */ ...}) = -1 EBADF (%m)\n"); + printf("ioctl(-1, DM_VERSION, {version=4.1.2, data_size=14" + " /* data_size too small */}) = -1 EBADF (%m)\n"); /* Unterminated name/uuid */ init_s(dm_arg, min_sizeof_dm_ioctl, 0); @@ -395,8 +395,8 @@ main(void) "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", " "target_count=1234, flags=0, " # if VERBOSE - "/* misplaced struct dm_target_spec */ ..." -# else /* !VERBOSE */ + "??? /* misplaced struct dm_target_spec */" +# else "..." # endif /* VERBOSE */ "}) = -1 EBADF (%m)\n", sizeof(*dm_arg), 0xfffffff8); @@ -491,7 +491,7 @@ main(void) print_dm_target_spec(&dm_arg_open3->target1, 15); printf("\"\\377\"}, "); print_dm_target_spec(&dm_arg_open3->target1, 42); - printf("\"\\1\\2\"}, /* misplaced struct dm_target_spec */ ..."); + printf("\"\\1\\2\"}, ??? /* misplaced struct dm_target_spec */"); # else /* !VERBOSE */ printf("..."); # endif /* VERBOSE */ @@ -575,7 +575,7 @@ main(void) "{version=4.1.2, data_size=%zu, data_start=%zu, " "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0, " # if VERBOSE - "/* misplaced struct dm_target_msg */" + "??? /* misplaced struct dm_target_msg */" # else /* !VERBOSE */ "..." # endif /* VERBOSE */ @@ -590,7 +590,7 @@ main(void) "{version=4.1.2, data_size=%zu, data_start=%u, " "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0, " # if VERBOSE - "/* misplaced struct dm_target_msg */" + "??? /* misplaced struct dm_target_msg */" # else /* !VERBOSE */ "..." # endif /* VERBOSE */ @@ -706,7 +706,7 @@ main(void) "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", event_nr=0, " "flags=0, " # if VERBOSE - "/* misplaced string */" + "??? /* misplaced string */" # else /* !VERBOSE */ "..." # endif /* VERBOSE */ @@ -757,10 +757,12 @@ main(void) "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", " "target_count=4294967295, flags=0, " # if VERBOSE - "{sector_start=0, length=0, target_type=\"\", string=\"\"}, " - "/* misplaced struct dm_target_spec */ " + "{sector_start=0, length=0, target_type=\"\", string=\"\"}" + ", ??? /* misplaced struct dm_target_spec */" +# else + "..." # endif /* VERBOSE */ - "...}) = -1 EBADF (%m)\n", + "}) = -1 EBADF (%m)\n", s.ioc.data_size, s.ioc.data_start); puts("+++ exited with 0 +++"); |