[PATCH v3] Add regression tests for ctf reading

Dodji Seketeli dodji@seketeli.org
Mon Dec 13 16:11:54 GMT 2021


Hello Guillermo,

I ran the tests and found some issues on my system.  I have described
them below.

"Guillermo E. Martinez via Libabigail" <libabigail@sourceware.org> a
écrit:

[...]

> 	* tests/data/test-read-ctf/test-enum-many.o.hash.abi: Likewise.

[...]

>  tests/data/test-read-ctf/test-enum-many.c     |  10 +

[...]


> +++ b/tests/test-read-ctf.cc

[...]


> +  {
> +    "data/test-read-ctf/test-enum-many.o",

This file is not present in the patch.

So running the test yields:

$ ./build/tests/runtestreadctf 
NOT PROCESSED TYPE 18446744073709551615
NOT PROCESSED TYPE 18446744073709551615
NOT PROCESSED TYPE 18446744073709551615
NOT PROCESSED TYPE 18446744073709551615
NOT PROCESSED TYPE 18446744073709551615
NOT PROCESSED TYPE 18446744073709551615
NOT PROCESSED TYPE 18446744073709551615
NOT PROCESSED TYPE 18446744073709551615
NOT PROCESSED TYPE 18446744073709551615
NOT PROCESSED TYPE 18446744073709551615
NOT PROCESSED TYPE 18446744073709551615
NOT PROCESSED TYPE 18446744073709551615
NOT PROCESSED TYPE 18446744073709551615
NOT PROCESSED TYPE 18446744073709551615
NOT PROCESSED TYPE 18446744073709551615
NOT PROCESSED TYPE 18446744073709551615
runtestreadctf: /home/dodji/git/libabigail/patches/tests/test-read-ctf.cc:277: virtual void test_task_ctf::perform(): Assertion `__abg_cond__' failed.
Abandon (core dumped)
$

The program aborts because "tests/data/test-read-ctf/test-enum-many.o"
was not found.

You can detect this kind of problems by running 'make distcheck-fast'
before submitting the patch.  It's super helpful.

Also, please be aware that all new files to the tests/data/* directory
sub-tree have to be added to the tests/data/Makefile.am so that these
files are added to the final distribution tarball.  Otherwise, "make
distcheck-fast" will fail.

[...]

diff --git a/tests/data/test-read-dwarf/PR27700/test-PR27700.o b/tests/data/test-read-dwarf/PR27700/test-PR27700.o
deleted file mode 100644
index 3f084d21..00000000
Binary files a/tests/data/test-read-dwarf/PR27700/test-PR27700.o and /dev/null differ
diff --git a/tests/data/test-read-dwarf/test-PR26568-1.o b/tests/data/test-read-dwarf/test-PR26568-1.o

[...]

> +++ b/tests/test-read-dwarf.cc

[...]

>    {
> -    "data/test-read-dwarf/test-PR26568-1.o",
> +    "data/test-read-common/test-PR26568-1.o",

This file data/test-read-common/test-PR26568-1.o doesn't exist in the
patch.

As a result, running runtestreaddwarf yields:


$ build/tests/runtestreaddwarf 
runtestreaddwarf: /home/dodji/git/libabigail/patches/tests/test-read-dwarf.cc:590: virtual void test_task_dwarf::perform(): Assertion `__abg_cond__' failed.
Abandon (core dumped)
$

It aborts because at least the file
"tests/data/test-read-common/test-PR26568-1.o" is not present.  This too
can be detected by running "make distcheck-fast".

[...]

I hope this helps.  Thanks.

Cheers,

-- 
		Dodji


More information about the Libabigail mailing list