Giter Site home page Giter Site logo

posixlab's Introduction

POSIXLab

Insper - Sistemas Hardware-Software

Vitor Satyro Vitturi

Comecei com a criação de processos filhos para rodar os tests. Em seguida adicionei os prints com os respectivos erros retornados do filho. Cria um arquivo temporário para salvar os resultados dos tests vindo dos processos filhos e mostrar em ordem no final. Assim não ha relação entre os tests.

Coloquei um alarm com 7 para os filhos. Os resultados estão sendo printados coloridos passam ou não. Calculando o tempo por time (sem ms) dentro dos filhos.

Analisando signal caso o CRTL+C seja apertado o pai da um kill 0 para matar o grupo.

Rodar:

Para rodar gere o executavel com :

  • gcc SeuArquivo.c -o SeuExecutavel
  • ./SeuExecutavel

Saida:

O terminal com os teste criados sai desta maneira:

Running 8 tests:

==============================================

testLoopInfinito : FAIL com sinal: Urgent I/O condition testLoopInfinito demorou 0.001051 sec

testMuitoTrab exit status = 0 testMuitoTrab: PASS
testMuitoTrab demorou 1.836711 sec

testDivision0 : FAIL com sinal: Floating point exception testDivision0 demorou 0.001262 sec

testFalhaPassa exit status = 255 testFalhaPassa: FAIL This always fails in test.c:36 testFalhaPassa demorou 0.000036 sec

testLento exit status = 0 testLento: PASS
testLento demorou 0.000010 sec

testPrints exit status = 0 testPrints: Print testPrints: Print testPrints: Print testPrints: Print testPrints: Print testPrints: Print testPrints: PASS
testPrints demorou 0.000031 sec

testSegmentation : FAIL com sinal: Segmentation fault testSegmentation demorou 0.001654 sec

testRapido exit status = 0 testRapido: PASS
testRapido demorou 0.000000 sec

============================================== 4/8 tests passed

posixlab's People

Contributors

vitorsv1 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.