Discussion:
No gcda files created for certain coreutils programs in cde package
David Gloe
2013-05-04 21:02:28 UTC
Permalink
Hello,

I'm not getting any gcda files created for some coreutils programs using
the CDE package. I'm on a 64 bit Ubuntu 12.04 system. For example,
here's what happened for uname:

***@david-ThinkPad-T410:~/klee-cde-package/cde-root/home/pgbovine/coreutils-6.11/obj-llvm/src$
klee.cde --optimize --libc=uclibc --posix-runtime --init-env
--max-sym-array-size=512 ./uname.bc --sym-args 0 1 2

That command created 323 test files.

***@david-ThinkPad-T410:~/klee-cde-package/cde-root/home/pgbovine/coreutils-6.11/obj-llvm/src$
cd ../../obj-gcov/src
***@david-ThinkPad-T410:~/klee-cde-package/cde-root/home/pgbovine/coreutils-6.11/obj-gcov/src$
klee-replay.cde ./uname ../../obj-llvm/src/klee-last/*.ktest
***@david-ThinkPad-T410:~/klee-cde-package/cde-root/home/pgbovine/coreutils-6.11/obj-gcov/src$
ls *.gcda
ls: cannot access *.gcda: No such file or directory
***@david-ThinkPad-T410:~/klee-cde-package/cde-root/home/pgbovine/coreutils-6.11/obj-gcov/src$
gcov.cde -b uname
uname.gcno:version '406*', prefer '403R'
uname.gcda:cannot open data file, assuming not executed
File '../../src/uname.c'
Lines executed:0.00% of 88
Branches executed:0.00% of 63
Taken at least once:0.00% of 63
Calls executed:0.00% of 40
../../src/uname.c:creating 'uname.c.gcov'

File '../../src/system.h'
Lines executed:0.00% of 3
No branches
Calls executed:0.00% of 1
../../src/system.h:creating 'system.h.gcov'

This happened for chroot as well. Has anyone else run into this issue,
or know how to fix it? I haven't found anything by googling.

Thanks,
David G.
David Gloe
2013-05-04 21:41:47 UTC
Permalink
Hello again,

It seems that the gcda file locations are set up differently for some of
the different coreutils programs:
***@david-ThinkPad-T410:~/klee-cde-package/cde-root/home/pgbovine/coreutils-6.11/obj-gcov/src$
strings ./uname | grep gcda
/home/david/klee-cde-package/cde-root/home/pgbovine/coreutils-6.11/obj-gcov/src/uname.gcda
***@david-ThinkPad-T410:~/klee-cde-package/cde-root/home/pgbovine/coreutils-6.11/obj-gcov/src$
strings ./tty | grep gcda/home/pgbovine/coreutils-6.11/obj-gcov/src/tty.gcda

So when I run uname, the gcda file ends up in
/home/david/klee-cde-package/cde-root/home/david/klee-cde-package/cde-root/home/pgbovine/coreutils-6.11/obj-gcov/src/uname.gcda
rather than
home/david/klee-cde-package/cde-root/home/pgbovine/coreutils-6.11/obj-gcov/src/uname.gcda
as it should.

Perhaps the cde should be updated so the gcda files consistently go to
the right directories?
Anyway, now I will try to just copy the gcda file into the right
directory and then run gcov.

-David
Post by David Gloe
Hello,
I'm not getting any gcda files created for some coreutils programs
using the CDE package. I'm on a 64 bit Ubuntu 12.04 system. For
klee.cde --optimize --libc=uclibc --posix-runtime --init-env
--max-sym-array-size=512 ./uname.bc --sym-args 0 1 2
That command created 323 test files.
cd ../../obj-gcov/src
klee-replay.cde ./uname ../../obj-llvm/src/klee-last/*.ktest
ls *.gcda
ls: cannot access *.gcda: No such file or directory
gcov.cde -b uname
uname.gcno:version '406*', prefer '403R'
uname.gcda:cannot open data file, assuming not executed
File '../../src/uname.c'
Lines executed:0.00% of 88
Branches executed:0.00% of 63
Taken at least once:0.00% of 63
Calls executed:0.00% of 40
../../src/uname.c:creating 'uname.c.gcov'
File '../../src/system.h'
Lines executed:0.00% of 3
No branches
Calls executed:0.00% of 1
../../src/system.h:creating 'system.h.gcov'
This happened for chroot as well. Has anyone else run into this issue,
or know how to fix it? I haven't found anything by googling.
Thanks,
David G.
--
David Gloe
gloex003-***@public.gmane.org david-***@public.gmane.org dcgloe-***@public.gmane.org
Masters Student, Computer Science
University of Minnesota
Loi Luu
2013-05-05 02:23:49 UTC
Permalink
Hello David,

To get the gcda files, you should use klee-replay command.
For example, to run with uname in your case (the current folder is
home/david/klee-cde-package/**cde-root/home/pgbovine/**coreutils
-6.11/obj-gcov/src/) just enter:
/path/to/klee-replay/klee-replay ./uname /path/to/test_files/test00001.ktest

Hope this helps.

Regards,
Post by David Gloe
Hello again,
It seems that the gcda file locations are set up differently for some of
home/pgbovine/coreutils-6.11/**obj-gcov/src$ strings ./uname | grep gcda
/home/david/klee-cde-package/**cde-root/home/pgbovine/**
coreutils-6.11/obj-gcov/src/**uname.gcda
home/pgbovine/coreutils-6.11/**obj-gcov/src$ strings ./tty | grep
gcda/home/pgbovine/coreutils-**6.11/obj-gcov/src/tty.gcda
So when I run uname, the gcda file ends up in
/home/david/klee-cde-package/**cde-root/home/david/klee-cde-**
package/cde-root/home/**pgbovine/coreutils-6.11/obj-**gcov/src/uname.gcda
rather than
home/david/klee-cde-package/**cde-root/home/pgbovine/**
coreutils-6.11/obj-gcov/src/**uname.gcda
as it should.
Perhaps the cde should be updated so the gcda files consistently go to the
right directories?
Anyway, now I will try to just copy the gcda file into the right directory
and then run gcov.
-David
Post by David Gloe
Hello,
I'm not getting any gcda files created for some coreutils programs using
the CDE package. I'm on a 64 bit Ubuntu 12.04 system. For example, here's
home/pgbovine/coreutils-6.11/**obj-llvm/src$ klee.cde --optimize
--libc=uclibc --posix-runtime --init-env --max-sym-array-size=512
./uname.bc --sym-args 0 1 2
That command created 323 test files.
home/pgbovine/coreutils-6.11/**obj-llvm/src$ cd ../../obj-gcov/src
home/pgbovine/coreutils-6.11/**obj-gcov/src$ klee-replay.cde ./uname
../../obj-llvm/src/klee-last/***.ktest
home/pgbovine/coreutils-6.11/**obj-gcov/src$ ls *.gcda
ls: cannot access *.gcda: No such file or directory
home/pgbovine/coreutils-6.11/**obj-gcov/src$ gcov.cde -b uname
uname.gcno:version '406*', prefer '403R'
uname.gcda:cannot open data file, assuming not executed
File '../../src/uname.c'
Lines executed:0.00% of 88
Branches executed:0.00% of 63
Taken at least once:0.00% of 63
Calls executed:0.00% of 40
../../src/uname.c:creating 'uname.c.gcov'
File '../../src/system.h'
Lines executed:0.00% of 3
No branches
Calls executed:0.00% of 1
../../src/system.h:creating 'system.h.gcov'
This happened for chroot as well. Has anyone else run into this issue, or
know how to fix it? I haven't found anything by googling.
Thanks,
David G.
--
David Gloe
Masters Student, Computer Science
University of Minnesota
______________________________**_________________
klee-dev mailing list
https://mailman.ic.ac.uk/**mailman/listinfo/klee-dev<https://mailman.ic.ac.uk/mailman/listinfo/klee-dev>
--
Loi, Luu The (Mr.)
University of Engineering and Technology, Vietnam National University,
Hanoi.
Loading...