New testfile: dwarf-getstring

Marek Polacek mpolacek at redhat.com
Wed Mar 2 20:12:10 UTC 2011


Hi,

I'd like to extend elfutils testsuite, so I've examined lcov coverage
report and picked up a function from libdw, dwarf_getstring(), which had
coverage 0%, with this test it is 100% covered.  The .c and .sh files
are attached.  Tested on x86_64.  What do you folks think, is it
sufficient?  Any comments or suggestions are very welcome.  Thanks,

	Marek 

tests/ChangeLog:

2011-03-02  Marek Polacek  <mpolacek at redhat.com>

	* dwarf-getstring.c: New test.
	* run-dwarf-getstring.sh: And its wrapper.
	* Makefile.am (EXTRA_DIST): Add and update all.


diff -d -urpN src/elfutils/tests/Makefile.am
rpmbuild/BUILD/elfutils-0.152/tests/Makefile.am 
--- src/elfutils/tests/Makefile.am	2011-02-28 14:59:12.189848145 +0100
+++ rpmbuild/BUILD/elfutils-0.152/tests/Makefile.am	2011-03-02
20:56:30.089749019 +0100
@@ -57,7 +57,7 @@ noinst_PROGRAMS = arextract arsymtest ne
 		  dwfl-bug-addr-overflow arls dwfl-bug-fd-leak \
 		  dwfl-addr-sect dwfl-bug-report early-offscn \
 		  dwfl-bug-getmodules dwarf-getmacros addrcfi \
-		  test-flag-nobits
+		  test-flag-nobits dwarf-getstring
 asm_TESTS = asm-tst1 asm-tst2 asm-tst3 asm-tst4 asm-tst5 \
 	    asm-tst6 asm-tst7 asm-tst8 asm-tst9
 
@@ -83,7 +83,8 @@ TESTS = run-arextract.sh run-arsymtest.s
 	run-dwfl-bug-offline-rel.sh run-dwfl-addr-sect.sh \
 	run-disasm-x86.sh run-disasm-x86-64.sh \
 	run-early-offscn.sh run-dwarf-getmacros.sh \
-	run-test-flag-nobits.sh run-prelink-addr-test.sh
+	run-test-flag-nobits.sh run-prelink-addr-test.sh \
+	run-dwarf-getstring.sh
 # run-show-ciefde.sh
 
 if !STANDALONE
@@ -117,6 +118,7 @@ EXTRA_DIST = run-arextract.sh run-arsymt
 	     run-addrname-test.sh run-dwfl-bug-offline-rel.sh \
 	     run-dwfl-addr-sect.sh run-early-offscn.sh \
 	     run-dwarf-getmacros.sh run-test-flag-nobits.sh \
+	     run-dwarf-getstring.sh \
 	     testfile15.bz2 testfile15.debug.bz2 \
 	     testfile16.bz2 testfile16.debug.bz2 \
 	     testfile17.bz2 testfile17.debug.bz2 \
@@ -246,6 +248,7 @@ dwfl_bug_getmodules_LDADD = $(libdw) $(l
 dwfl_addr_sect_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl
 sha1_tst_LDADD = $(libeu) $(libmudflap)
 dwarf_getmacros_LDADD = $(libdw) $(libmudflap)
+dwarf_getstring_LDADD = $(libdw) $(libmudflap)
 addrcfi_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl
 test_flag_nobits_LDADD = $(libelf) $(libmudflap)
 



-------------- next part --------------
A non-text attachment was scrubbed...
Name: dwarf-getstring.c
Type: text/x-csrc
Size: 2394 bytes
Desc: not available
Url : https://fedorahosted.org/pipermail/elfutils-devel/attachments/20110302/f6ca1218/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: run-dwarf-getstring.sh
Type: application/x-shellscript
Size: 3510 bytes
Desc: not available
Url : https://fedorahosted.org/pipermail/elfutils-devel/attachments/20110302/f6ca1218/attachment-0001.bin 


More information about the elfutils-devel mailing list