diff --git a/tests/integration/data/regression_output/dump.201912060006/core/ptype thread_union b/tests/integration/data/regression_output/dump.201912060006/core/ptype thread_union new file mode 100644 index 0000000..3271d9f --- /dev/null +++ b/tests/integration/data/regression_output/dump.201912060006/core/ptype thread_union @@ -0,0 +1,6 @@ +union thread_union { + struct task_struct task; + unsigned long stack[2048]; +} +@#$ EXIT CODE $#@ +0 diff --git a/tests/integration/data/regression_output/dump.201912060006/core/ptype zfs_case 'struct v' thread_union b/tests/integration/data/regression_output/dump.201912060006/core/ptype zfs_case similarity index 51% rename from tests/integration/data/regression_output/dump.201912060006/core/ptype zfs_case 'struct v' thread_union rename to tests/integration/data/regression_output/dump.201912060006/core/ptype zfs_case index d9d5efe..b7d88df 100644 --- a/tests/integration/data/regression_output/dump.201912060006/core/ptype zfs_case 'struct v' thread_union +++ b/tests/integration/data/regression_output/dump.201912060006/core/ptype zfs_case @@ -3,12 +3,5 @@ enum zfs_case { ZFS_CASE_INSENSITIVE = 1, ZFS_CASE_MIXED = 2, } -struct v { - uint8_t b[16]; -} -union thread_union { - struct task_struct task; - unsigned long stack[2048]; -} @#$ EXIT CODE $#@ 0 diff --git a/tests/integration/data/regression_output/dump.202303131823/core/ptype thread_union b/tests/integration/data/regression_output/dump.202303131823/core/ptype thread_union new file mode 100644 index 0000000..3271d9f --- /dev/null +++ b/tests/integration/data/regression_output/dump.202303131823/core/ptype thread_union @@ -0,0 +1,6 @@ +union thread_union { + struct task_struct task; + unsigned long stack[2048]; +} +@#$ EXIT CODE $#@ +0 diff --git a/tests/integration/data/regression_output/dump.202303131823/core/ptype zfs_case 'struct v' thread_union b/tests/integration/data/regression_output/dump.202303131823/core/ptype zfs_case similarity index 51% rename from tests/integration/data/regression_output/dump.202303131823/core/ptype zfs_case 'struct v' thread_union rename to tests/integration/data/regression_output/dump.202303131823/core/ptype zfs_case index 2aa32ee..b7d88df 100644 --- a/tests/integration/data/regression_output/dump.202303131823/core/ptype zfs_case 'struct v' thread_union +++ b/tests/integration/data/regression_output/dump.202303131823/core/ptype zfs_case @@ -3,12 +3,5 @@ enum zfs_case { ZFS_CASE_INSENSITIVE = 1, ZFS_CASE_MIXED = 2, } -struct v { - uint8_t b[32]; -} -union thread_union { - struct task_struct task; - unsigned long stack[2048]; -} @#$ EXIT CODE $#@ 0 diff --git a/tests/integration/infra.py b/tests/integration/infra.py index 39ff9f5..930416c 100644 --- a/tests/integration/infra.py +++ b/tests/integration/infra.py @@ -281,6 +281,14 @@ def verify_cmd_output_and_code(self, assert self.repl_invoke(cmd) == ref_code captured = capsys.readouterr() if not stripped: + with capsys.disabled(): + if captured.out != ref_output: + # + # If we are about to fail the assertion print the + # actual mismatch in the logs before failing. + # + print("expected:\n" + ref_output) + print("got:\n" + captured.out) assert captured.out == ref_output else: for i, n in enumerate(captured.out): diff --git a/tests/integration/test_core_generic.py b/tests/integration/test_core_generic.py index 9f43982..8a5ec05 100644 --- a/tests/integration/test_core_generic.py +++ b/tests/integration/test_core_generic.py @@ -125,7 +125,8 @@ # ptype "ptype spa_t", "ptype spa vdev", - "ptype zfs_case 'struct v' thread_union", + "ptype zfs_case", + "ptype thread_union", "ptype 'struct spa'", # sizeof