changeset 23836:977754382ff4

13323 CTF forward test needs adjusting after 13278 Reviewed by: Dan McDonald <danmcd@joyent.com> Reviewed by: Robert Mustacchi <rm@fingolfin.org> Approved by: Gordon Ross <gordon.w.ross@gmail.com>
author Andy Fiddaman <omnios@citrus-it.co.uk>
date Thu, 19 Nov 2020 21:33:40 +0000
parents 175ec654ee98
children f87c21888d47
files usr/src/test/util-tests/tests/ctf/check-forward.c
diffstat 1 files changed, 5 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/test/util-tests/tests/ctf/check-forward.c	Thu Nov 12 11:10:27 2020 +0000
+++ b/usr/src/test/util-tests/tests/ctf/check-forward.c	Thu Nov 19 21:33:40 2020 +0000
@@ -15,14 +15,6 @@
 
 /*
  * Verify that we can properly handle forward declarations.
- *
- * In test-forward.c barp is declared as a union, not a struct. However, today
- * the CTF tooling does not contain enough information to know whether a forward
- * declaration was for a struct or a union, only that it was a forward.
- * Therefore, the type printing information assumes at the moment that the type
- * is a struct. In a future revision of the CTF type data, we should encode this
- * information in the equivalent of ctt_info so we can properly distinguish
- * between these.
  */
 
 #include "check-common.h"
@@ -30,7 +22,7 @@
 static check_symbol_t check_syms[] = {
 	{ "forward", "struct forward" },
 	{ "foop", "struct foo *" },
-	{ "barp", "struct bar *" },
+	{ "barp", "union bar *" },
 	{ "bazp", "enum baz *" },
 	{ NULL }
 };
@@ -39,12 +31,12 @@
 #ifdef	TARGET_LP64
 	{ "prev", "struct foo *", 0 },
 	{ "next", "struct foo *", 8 * NBBY },
-	{ "data", "struct bar *", 16 * NBBY },
+	{ "data", "union bar *", 16 * NBBY },
 	{ "tag", "enum baz *", 24 * NBBY },
 #else
 	{ "prev", "struct foo *", 0 },
 	{ "next", "struct foo *", 4 * NBBY },
-	{ "data", "struct bar *", 8 * NBBY },
+	{ "data", "union bar *", 8 * NBBY },
 	{ "tag", "enum baz *", 12 * NBBY },
 #endif
 	{ NULL }
@@ -67,8 +59,8 @@
 };
 
 static check_descent_t check_descent_bar[] = {
-	{ "struct bar *", CTF_K_POINTER },
-	{ "struct bar", CTF_K_FORWARD },
+	{ "union bar *", CTF_K_POINTER },
+	{ "union bar", CTF_K_FORWARD },
 	{ NULL }
 };