Test Specifications A Specification System for Multi-Platform Test Suite Configuration, Build, and Execution Greg Cooksey.

Slides:



Advertisements
Similar presentations
4 Oracle Data Integrator First Project – Simple Transformations: One source, one target 3-1.
Advertisements

Xtensa C and C++ Compiler Ding-Kai Chen
Software & Services Group, Developer Products Division Copyright© 2010, Intel Corporation. All rights reserved. *Other brands and names are the property.
1 Lab 3 Objectives  Case study: “Hello world” program on motes  Write you first program on mote.
1.  Understanding about How to Working with Server Side Scripting using PHP Framework (CodeIgniter) 2.
Today ’ s Topic Breakdown of GCC script Breakdown of GCC script Description of how different system programs work together to build (and run) a C program.
“Mult- ” : Multi-Platform Electronic Organizer with Client “Mult- ” : Multi-Platform Electronic Organizer with Client  Kogan Daniel.
1 Real-Time System Design Developing a Cross Compiler and libraries for a target system.
Automated Tests in NICOS Nightly Control System Alexander Undrus Brookhaven National Laboratory, Upton, NY Software testing is a difficult, time-consuming.
PART A Emac Lisp   Emac Lisp is a programming language  Emacs Lisp is a dialect.
NDT Tools Tutorial: How-To setup your own NDT server Rich Carlson Summer 04 Joint Tech July 19, 2004.
Introduction to The Linaro Toolchain Embedded Processors Training Multicore Software Applications Literature Number: SPRPXXX 1.
1 Introduction to Tool chains. 2 Tool chain for the Sitara Family (but it is true for other ARM based devices as well) A tool chain is a collection of.
Advance Computer Programming Java Database Connectivity (JDBC) – In order to connect a Java application to a database, you need to use a JDBC driver. –
Javascript and the Web Whys and Hows of Javascript.
Input/Output Controller (IOC) Overview Andrew Johnson Computer Scientist, AES Controls Group.
Donald Stark National Center for Atmospheric Research (NCAR) The Developmental Testbed Center (DTC) Wednesday 29 June, 2011 GSI Fundamentals (1): Setup.
Framework for Automated Builds Natalia Ratnikova CHEP’03.
University of Maryland Compiler-Assisted Binary Parsing Tugrul Ince PD Week – 27 March 2012.
Obsydian OLE Automation Ranjit Sahota Chief Architect Obsydian Development Ranjit Sahota Chief Architect Obsydian Development.
University of Maryland parseThat: A Robust Arbitrary-Binary Tester for Dyninst Ray Chen.
Converting COBOL Data to SQL Data: GDT-ETL Part 1.
Capture and Replay Often used for regression test development –Tool used to capture interactions with the system under test. –Inputs must be captured;
Winrunner Usage - Best Practices S.A.Christopher.
Developing C/C++ applications with the Eclipse CDT David Gallardo.
March 17, 2005 Roadmap of Upcoming Research, Features and Releases Bart Miller & Jeff Hollingsworth.
Old Chapter 10: Programming Tools A Developer’s Candy Store.
Creating your first C++ program
Testing Workflow In the Unified Process and Agile/Scrum processes.
Scons Writing Solid Code Overview What is scons? scons Basics Other cools scons stuff Resources.
Exploring an Open Source Automation Framework Implementation.
Guide to Linux Installation and Administration, 2e1 Chapter 10 Managing System Resources.
Contents 1.Introduction, architecture 2.Live demonstration 3.Extensibility.
Siebel 8.0 Module 5: EIM Processing Integrating Siebel Applications.
Visual Linker Prototype presentation.
Debugging and Profiling With some help from Software Carpentry resources.
Guide to Linux Installation and Administration, 2e1 Chapter 11 Using Advanced Administration Techniques.
National Center for Supercomputing ApplicationsNational Computational Science Grid Packaging Technology Technical Talk University of Wisconsin Condor/GPT.
Horizon: CDR The Horizon Project Team September 29 th, 2006.
1 SEEM3460 Tutorial Compiling and Debugging C programs.
November 2005 New Features in Paradyn and Dyninst Matthew LeGendre Ray Chen
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
Chapter 1 Introduction. Chapter 1 -- Introduction2  Def: Compiler --  a program that translates a program written in a language like Pascal, C, PL/I,
Getting Started with SIDL using the ANL SIDL Environment (ASE) ANL SIDL Team MCS Division, ANL April 2003 The ANL SIDL compilers are based on the Scientific.
Paradyn Project Paradyn / Dyninst Week Madison, Wisconsin April 12-14, 2010 Binary Rewriting with Dyninst Madhavi Krishnan and Dan McNulty.
PL/SQLPL/SQL Oracle10g Developer: PL/SQL Programming Chapter 8 Program Unit Dependencies.
Dharmen Mehta (Project Manager) Nimai Buch (Language Guru) Yash Parikh (System Architect) Amol Joshi (System Integrator) Chaitanya Korgaonkar (Verifier.
Javascript Static Code Analyzer
SPI NIGHTLIES Alex Hodgkins. SPI nightlies  Build and test various software projects each night  Provide a nightlies summary page that displays all.
Geant4 is a toolkit to simulate the passage of particles through matter, and is widely used in HEP, in medical physics and for space applications. Ongoing.
PHP Tutorial. What is PHP PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages.
OCR A Level F453: The function and purpose of translators Translators a. describe the need for, and use of, translators to convert source code.
Visual Linker ADD presentation. slide 2  Project Overview And Vision  Project System View  The System Life Cycle  Data Model and.
Build and Test system for FairRoot
CST 1101 Problem Solving Using Computers
JRA2: Acceptance Testing senarious
Types CSCE 314 Spring 2016.
Bash Introduction (adapted from chapters 1 and 2 of bash Cookbook by Albing, Vossing, & Newham) CPTE 440 John Beckett.
PYTHON: AN INTRODUCTION
PVS-Studio static analyzer: advanced features
Course Name: QTP Trainer: Laxmi Duration: 25 Hrs Session: Daily 1 Hr.
What is Bash Shell Scripting?
Prof: Dr. Shu-Ching Chen TA: Yimin Yang
Prof: Dr. Shu-Ching Chen TA: Hsin-Yu Ha
Getting Started: Developing Code with Cloud9
Creating your first C program
Appendix F C Programming Environment on UNIX Systems
Lab 4: Introduction to Scripting
Chapter 1 Introduction.
Executable Specifications
Presentation transcript:

Test Specifications A Specification System for Multi-Platform Test Suite Configuration, Build, and Execution Greg Cooksey

Test Specifications -2- Talk Outline Test suite challenges and basis for our new architecture The specification system A walk through the new Dyninst test suite architecture Other features, status notes, and future plans

Test Specifications -3- Idealized Dyninst Test Mutator program –Uses Dyninst to analyze or modify mutatee Mutatee program –Simply verify that modification occurred Output –passed, failed, or skipped Simple, right? mutator Dyninst mutatee output test

Test Specifications -4- Not That Simple Multiple platforms –Architecture –operating system –operating system version –32 vs. 64 bit Multiple compilers –Native –GNU –Other Multiple languages –C–C –C++ –Fortran Multiple build parameters –Optimization levels –Stripped vs. unstripped Multiple test parameters –Create vs. attach Multiple mutator-mutatee mappings And not all combinations are valid

Test Specifications -5- Our Goal Write simple test cases: Modify specification file –Don’t modify code when adding a test Automatically do the rest –Build the test programs, with appropriate variations and parameters –Run the test with appropriate parameters –Collect results and insert into database mutator() { insertSnippet(…)... } foo() {... }

Test Specifications -6- New Infrastructure Specification language and compiler –Specifications for almost all aspects of test suite Test suite build system –Standard build system –Makefiles are output of spec. compiler Test driver –Tests are plugins –List of tests to run is output of spec. compiler Results parser and database User only needs to write test cases and test specifications

Test Specifications -7- Specifications What? –Platforms Architecture Operating system File name conventions Compiler availability –Compilers Language Standard flags Option-parameter string mapping –Languages –Test cases Mutator sources Mutatee sources Mutator-mutatee mappings Build configurations Run configurations –Test suite glue Standard libraries Constraints How? –We use simple tuples, written as Prolog clauses Prolog lets us naturally express relationships between tuples

Test Specifications -8- Test Suite Architecture Build Stage Specifications Run StageData Collection Test sources

Test Specifications -9- Test Suite Architecture Build StageRun StageData Collection spec file spec compiler Test sources

Test Specifications -10- Specification Compiler mutator specmutatee spectest specstandard libscompiler spec Prolog Specifications mutator tuple mutatee tuple test tuple Tuples Python makefile test lists Scripts test suite glue

Test Specifications -11- mutator(‘example’, [‘example.C’]). mutatee(‘example’, [‘example_mutatee.c’]). compiler_for_mutatee(‘example’, Compiler) :- compiler_language(Compiler, ‘c’); compiler_language(Compiler, ‘c++’). mutator_mutatee(‘example’, ‘example’). test_runs_everywhere(‘example’). test_runmode(‘example’, ‘both’). test_start_state(‘example’, ‘stopped’). Test Specification mutator source mutatee source valid compilers mutator-mutatee mapping build and run constraints

Test Specifications -12- Test Suite Architecture Build StageRun StageData Collection spec file spec compiler Test sources

Test Specifications -13- Test Suite Architecture Run StageData Collection mutator compiler mutatee compilers build scripts (makefiles) spec filespec compiler Test sources

Test Specifications -14- Build scripts Specification compiler generates makefile Mutator built as shared library plugin –example.so Multiple mutatees built with build parameters encoded into names –example.mutatee_g++_none –example.mutatee_g++_low –...

Test Specifications -15- Test Suite Architecture Run StageData Collection mutator compiler mutatee compilers build scripts (makefiles) spec filespec compiler Test sources

Test Specifications -16- Test Suite Architecture Data Collection mutator compiler mutatee compilers build scripts (makefiles) spec filespec compiler run scripts (test lists) test driver src Dyninst compiler test driver mutator.so mutatee1 mutatee2 mutatee3 Test sources

Test Specifications -17- Run scripts Prolog generates tests as tuples –(example, example.mutatee_gcc_low, createProcess, stopped) Python script creates lists of tests that are compiled into the test driver Test driver executes lists of tests and produces results output

Test Specifications -18- Test Suite Architecture Data Collection mutator compiler mutatee compilers build scripts (makefiles) spec filespec compiler run scripts (test lists) test driver src Dyninst compiler test driver mutator.so mutatee1 mutatee2 mutatee3 Test sources

Test Specifications -19- Test Suite Architecture mutator compiler mutatee compilers build scripts (makefiles) spec filespec compiler run scripts (test lists) test driver src Dyninst compiler test driver mutator.so mutatee1 mutatee2 mutatee3 output log parser database Test sources

Test Specifications -20- Collecting Output Test output “example –mutatee example.mutatee_g++_low” All tests passed Output is human readable Added to database –(example, g++, low, createProcess): passed

Test Specifications -21- Flexible Testing Structures Build each test as separate binary –High isolation, slow performance Build several tests into a single binary –Balance test isolation vs. performance

Test Specifications -22- Not Just Tests Specifications also used for –Platforms Specify architecture, operating system, filename conventions, compiler availability* –Compilers Specify languages*, option - command line parameter mapping, standard flags, platform availability* –Languages Specify filename conventions, compilers*

Test Specifications -23- Example Platform % Linux 2.6 i386 specification % paragraph platform(‘i386’, ‘linux’,‘linux2.6’, ‘i386-unknown-linux2.6’). compiler_platform(‘gcc’, ‘i386-unknown-linux2.6’). object_suffix(‘i386-unknown-linux2.6’, ‘.o’). library_prefix(‘i386-unknown-linux2.6’, ‘lib’). library_suffix(‘i386-unknown-linux2.6’, ‘.so’).

Test Specifications -24- Example Compiler % g++ specification paragraph comp_lang(‘g++’, ‘c++’). compiler_platform(‘g++’, Platform) :- platform(_, OS, _, Platform), OS \= ‘windows’. compiler_optimization_translate(‘g++’, ‘high’, ‘- O2’). comp_std_flags(‘g++’, ‘$(CXXFLAGS)’). comp_mutatee_flags(‘g++’, ‘$(MUTATEE_CXXFLAGS_GNU)’). mutatee_link_options(‘g++’, ‘$(MUTATEE_LDFLAGS_GNU)’).

Test Specifications -25- Status Infrastructure functional Converted 2/3 of old tests; working on the rest Will add SymtabAPI tests to new infrastructure Tech. report in early summer Future: integrate into NMI Build & Test system

Test Specifications -26- Pulled Slides

Test Specifications -27- Test Tuples Mutators mutator(‘example’, [‘example.C’]).  (example, [‘example.C’],, g++) Mutatees mutatee(‘example’, [‘example_mutatee.c’]). compiler_for_mutatee(‘example’, Compiler) :- compiler_language(Compiler, ‘c’); compiler_language(Compiler, ‘c++’).  (example, [‘example_mutatee.c’],, gcc, none)  (example, [‘example_mutatee.c’],, g++, high) ...

Test Specifications -28- Test Source Mutator mutator() { fn = findFunction(“f1”); p = findPoint(fn, ENTRY); fn2 = findFunction(“f2”); cl = funcCallExpr(fn2, NO_ARGS); insertSnippet(fn2, p); } Mutatee test_passes = FALSE; f2() { test_passes = TRUE; } f1() { if (test_passes) return PASSED; else return FAILED; }

Test Specifications -29- Example Test % Test specification paragraph for test_example test_name(‘test_example’). test_runs_everywhere(‘test_example’). mutator_mutatee(‘test_example’, ‘test_example’). mutator(‘test_example’, [‘test_example.C’]). mutatee(‘test_example’, [‘test_example_mutatee.c’]). compiler_for_mutatee(‘test_example’, Compiler) :- comp_lang(Compiler, ‘c’). test_runmode(‘test_example’, ‘both’). test_start_state(‘test_example’, ‘stopped’).

Test Specifications -30- Tuples Specification system outputs tuples for compilers, mutators, mutatees, and tests Build stage uses compiler, mutator, and mutatee tuples Run stage uses test tuples –(mutator, mutatee, run mode, start state)

Test Specifications -31- unit test 1 src unit test n src mutatee 1 src mutatee m src specspec compilerbuild scripts (makefiles) run scripts (test lists) mutatee compile stage (multiple compilers) mutator.so 1 mutator.so n mutatee 1_1 mutatee 1_k mutatee m_1 mutatee m_k test results 1_1test results m_1 database mutator compile stage test driver src Dyninst compiler test drivertest results 1_ktest results m_k

Test Specifications -32- Build Stage Specifications Run StageData Collection

Test Specifications -33- mutatee mutator Dyninst output test

Test Specifications -34- test driver mutatee mutator Dyninst output test

Test Specifications -35- Semi-Automated Test Generation Tools exist to automate unit test generation What about regression tests? Take a load off the programmer –Minimize direct interaction with test framework –Minimize details for test configuration –Automatically add test to makefiles, run scripts, and output parsing

Test Specifications -36- Compiler Specification mutator_compiler(‘g++’). mutatee_compiler(‘g++’). compiler_language(‘g++’, ‘c++’). compiler_optimization_translate(‘g++’, ‘none’, ‘-O0’). compiler_optimization_translate(‘g++’, ‘low’, ‘-O1’).... compiler_platform(‘g++’, Platform) :- platform(_, OS, _, Platform), OS \= ‘windows’. compiler_std_flags(‘g++’, ‘$(CXXFLAGS)’). compiler_mutatee_flags(‘g++’, ‘$(MUTATEE_CXXFLAGS_GNU)’). mutatee_link_options(‘g++’, ‘$(MUTATEE_LDFLAGS_GNU)’).