[PATCH 6/9] tests/ioctl_dm: overly long string printing checks

Eugene Syromyatnikov evgsyr at gmail.com
Tue Oct 11 22:39:02 UTC 2016


---
 tests/ioctl_dm.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/ioctl_dm.c b/tests/ioctl_dm.c
index 261983c..24232b7 100644
--- a/tests/ioctl_dm.c
+++ b/tests/ioctl_dm.c
@@ -67,12 +67,12 @@ main(void)
 	init_s(&s.ioc, sizeof(s), offsetof(struct s, u));
 	s.u.tm.target_msg.sector = 0x1234;
 	strcpy(s.u.string + offsetof(struct dm_target_msg, message),
-		"tmsg");
+		"long target msg");
 	ioctl(-1, DM_TARGET_MSG, &s);
 	printf("ioctl(-1, DM_TARGET_MSG, "
 	       "{version=4.1.2, data_size=%u, data_start=%u, "
 	       "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0, "
-	       "{sector=4660, message=\"tmsg\"}}) = -1 EBADF (%m)\n",
+	       "{sector=4660, message=\"long targ\"...}}) = -1 EBADF (%m)\n",
 	       s.ioc.data_size, s.ioc.data_start);
 
 	init_s(&s.ioc, sizeof(s), offsetof(struct s, u));
@@ -85,12 +85,12 @@ main(void)
 	       s.ioc.data_size, s.ioc.data_start);
 
 	init_s(&s.ioc, sizeof(s), offsetof(struct s, u));
-	strcpy(s.u.string, "new-name");
+	strcpy(s.u.string, "new long name");
 	ioctl(-1, DM_DEV_RENAME, &s);
 	printf("ioctl(-1, DM_DEV_RENAME, "
 	       "{version=4.1.2, data_size=%u, data_start=%u, "
 	       "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", event_nr=0, "
-	       "flags=0, string=\"new-name\"}) = -1 EBADF (%m)\n",
+	       "flags=0, string=\"new long \"...}) = -1 EBADF (%m)\n",
 	       s.ioc.data_size, s.ioc.data_start);
 
 	init_s(&s.ioc, sizeof(s), offsetof(struct s, u));
-- 
1.7.10.4





More information about the Strace-devel mailing list