From f43cdb68c77dd0d0e71d696eb3b7816b32953f50 Mon Sep 17 00:00:00 2001
From: Pekka Enberg <penberg@cloudius-systems.com>
Date: Fri, 23 Aug 2013 13:35:42 +0300
Subject: [PATCH] tst-zfs-disk: Drop broken ASSERT()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The ASSERT() doesn't compile if ZFS debugging is enabled:

  CC tests/tst-zfs-disk.o
In file included from ../../bsd/sys/cddl/compat/opensolaris/sys/debug.h:35:0,
                 from ../../bsd/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_context.h:42,
                 from ../../tests/tst-zfs-disk.c:28:
../../tests/tst-zfs-disk.c: In function ‘make_vdev_root’:
../../tests/tst-zfs-disk.c:119:9: error: ‘t’ undeclared (first use in this function)
  ASSERT(t > 0);
         ^
../../bsd/sys/cddl/contrib/opensolaris/uts/common/sys/debug.h:56:29: note: in definition of macro ‘ASSERT’
 #define ASSERT(EX) ((void)((EX) || assfail(#EX, __FILE__, __LINE__)))
                             ^
../../tests/tst-zfs-disk.c:119:9: note: each undeclared identifier is reported only once for each function it appears in
  ASSERT(t > 0);
         ^
../../bsd/sys/cddl/contrib/opensolaris/uts/common/sys/debug.h:56:29: note: in definition of macro ‘ASSERT’
 #define ASSERT(EX) ((void)((EX) || assfail(#EX, __FILE__, __LINE__)))
                             ^
---
 tests/tst-zfs-disk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/tst-zfs-disk.c b/tests/tst-zfs-disk.c
index 413222994..a85d49ae1 100644
--- a/tests/tst-zfs-disk.c
+++ b/tests/tst-zfs-disk.c
@@ -116,7 +116,7 @@ make_vdev_root(void)
 	nvlist_t *root, **child;
 	int c;
 
-	ASSERT(t > 0);
+	//ASSERT(t > 0);
 
 	child = calloc(1, sizeof (nvlist_t *));
 	child[0] = make_vdev_disk("/dev/vblk1");
-- 
GitLab