[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [csmith-dev] About csmith



Suresh Khatiwada <sk665@uowmail.edu.au> writes:

> Actually I want to use csmith tool for generating automated test cases for
> compilers (gcc, g++, clang) as my academic project. I am using windows 8.1
> operating systems. I have downloaded compilers and started to use. I have
> downloaded csmith-2.2.0.tar file. It is in a folder. But its not being run.
> First I need to run it. I am not getting proper guidelines for using
> it. Please suggest me. Thank you.

Short answer: I strongly recommend that you use Linux, not Windows, if you want
to use Csmith to test compilers.  You should also ask your academic advisor for
help on getting started with standard Linux utilities like "tar".

Longer answer:

A ".tar" file is an archive file, like a ZIP file.  You need to unpack the
archive in order to extract the source-code files for Csmith.  I don't use
Windows very often, so I can't tell you what unarchiving programs will process
a tar file.  (It is a *very* common format, however, so lots of tools should
work.)  On Linux, the tool for unpacking a ".tar" file is called "tar".

Once you unpack the tar file, you will need to compile Csmith.  Compiling
Csmith is pretty straightforward on a Linux system: assuming you have a C++
compiler installed and working, you can basically type "configure" and then
type "make" to compile Csmith, like one does with many open-source projects for
Linux.

It is possible to compile Csmith on Windows, but I have not done this in many
years.  If you *really* want to try this, there are some VS project files in
the "src" directory of the Csmith source tree.  These might be helpful to you.

Once you get it compiled, you need some kind of driver to repeat the process of
generating a test case and feeding it to the compiler you are testing.  Csmith
comes with some example scripts for doing this --- and they are intended to
work on Linux.  If you want to run these scripts under Windows, you will need
to install a bunch of tools like Perl on your Windows machine.  Either that,
you will need to write your own scripts.

My strong advice would be for you to use Linux, if at all possible, for your
experiments with Csmith.

>From your question about tar, I get the impression that you aren't yet very
familiar with Linux tools.  That's OK --- you just need to ask your academic
advisor or your schoolmates for help getting started with Linux!  The
Csmith-dev mailing list isn't a good place to ask about Linux basics.

Good luck with your project! ---

Eric.

-- 
-------------------------------------------------------------------------------
Eric Eide <eeide@cs.utah.edu>  .         University of Utah School of Computing
http://www.cs.utah.edu/~eeide/ . +1 (801) 585-5512 voice, +1 (801) 581-5843 FAX