Loading...

Messages

Proposals

Stuck in your homework and missing deadline? Get urgent help in $10/Page with 24 hours deadline

Get Urgent Writing Help In Your Essays, Assignments, Homeworks, Dissertation, Thesis Or Coursework & Achieve A+ Grades.

Privacy Guaranteed - 100% Plagiarism Free Writing - Free Turnitin Report - Professional And Experienced Writers - 24/7 Online Support

Operating System and unflake program

06/10/2020 Client: mmm78901 Deadline: 3 days

  


Operating System and unflake program


you are on the testing team at work. unfortunately, your companies programmers do not have good testing practices. there aren’t many tests written, and the ones that are out there don’t work reliably: they pass some of the time, but they often fail for unrelated reasons. while your developers get their testing act together, your boss wants you to write a tool to at least make the tests relatively usable.


you have to write an unflake program that will rerun a test if it fails the first time (or the 2nd time or 3rd time …). you also need to keep track of stdout and stderr in a single file from the tests, so you need to log them to a file. once the program completes, you need to print how many times the program ran, the exit code or signal that killed the program, and print the program output. the exit code of unflake must match the exit code of the last run. if the last run will killed with a signal, unflake should have an exit code of 255.


the flaky tests sometimes hang, so if a timeout is exceeded, you need to force the running test to stop.


specification


unflake max_tries max_timeout test_command args…


max_tries – is the maximum amount of times you will try rerunning the test before giving up.


max_timeout – the maximum allowed time for a test to run


test_command – the command you will be running for the test


args – any arguments the test may take


when unflake finishes the current directory will contain files of the form: test_output.X where X is the try number (starting at 1). this file will contain both the stdout and stderr of the test run.


when unflake finishes, it will dump the information about the run and contents of the last run to the screen and exit with a return code of the last run.


make sure you match the format exactly. extra spaces or incorrect capitalization will cause you to lose points. make sure you don’t have any extra print statements and that each line ends in a linefeed (‘\n’). make sure your files are also named correctly with lower case letters.


example runs


$ ./unflake

USAGE: ./unflake max_tries max_timeout test_command args...

max_tries - must be greater than or equal to 1

max_timeout - number of seconds greater than or equal to 1

$ echo $?

1

$ ./unflake not_num not_num cmd asdf

USAGE: ./unflake max_tries max_timeout test_command args...

max_tries - must be greater than or equal to 1

max_timeout - number of seconds greater than or equal to 1

$ echo $?ec

1

$ ./unflake 2 2 cmd asdf 

2 runs

could not exec cmd

exit code 2

$ echo $?

2

$ ls test_output.*

test_output.1 test_output.2

$ cat test_output.1

could not exec cmd

exit code 2

$ cat test_output.2

could not exec cmd

exit code 2

$ rm test_output.*

$ ./unflake 2 2 ./always_succeed.sh 

1 runs

i always succeed

exit code 0

$ echo $?

0

$ ./unflake 5 3 ./succeed_after.sh 3 

3 runs

i will succeed after 1 tries

0 more to go

exit code 0

$ ls test_output.*

test_output.1  test_output.2  test_output.3

$ cat test_output.1 

i will succeed after 3 tries

2 more to go

exit code 2

$ ./unflake 2 3 ./succeed_after.sh 5

2 runs

i will succeed after 4 tries

3 more to go

exit code 3

$ ./unflake 5 3 sleep 5 

5 runs

killed with signal 9

$ echo $?

255

test files


always_fail.sh always_succeed.sh succeed_after.sh


calls to use


when you implement unflake, you will need to use the following system calls: fork, execvp, wait, open, dup2, signal, kill, and alarm.


to get the exit codes from that status returned from wait please look at the macros (they act like functions) in the man page for wait (man 2 wait). when you open a file with create, you will need to set the mode, so you will probably invoke it like:


open(name, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR)

to format the filename, you might want to look at the snprintf function. finally, when it comes time to kill a child process due to running too long, use the SIGKILL signal.


grading (rubric)


  


points




criteria


 


5




program compiles without warnings with the -Wall flag


 


10




exit code of unflake matches exit code of last run


 


10




retry count is processed correctly


 


10




the correct output is displayed


 


10




the output files for each run are correct


 


10




tests that run too long are handled correctly


 


10




execvp was used correctly


 


10




wait was used correctly


 


10




dup2 was used correctly


 


15




signal, alarm, and kill were used correctly


ATTACHMENTS

Homework is Completed By:

Writer Writer Name Amount Client Comments & Rating
Instant Homework Helper

ONLINE

Instant Homework Helper

$36

She helped me in last minute in a very reasonable price. She is a lifesaver, I got A+ grade in my homework, I will surely hire her again for my next assignments, Thumbs Up!

Order & Get This Solution Within 3 Hours in $25/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 3 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 6 Hours in $20/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 6 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 12 Hours in $15/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 12 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

6 writers have sent their proposals to do this homework:

Top Academic Guru
Calculation Guru
Assignments Hut
Accounting & Finance Master
Exam Attempter
Instant Assignments
Writer Writer Name Offer Chat
Top Academic Guru

ONLINE

Top Academic Guru

This project is my strength and I can fulfill your requirements properly within your given deadline. I always give plagiarism-free work to my clients at very competitive prices.

$50 Chat With Writer
Calculation Guru

ONLINE

Calculation Guru

I see that your standard of work is to get content for articles. Well, you are in the right place because I am a professional content writer holding a PhD. in English, as well as having immense experience in writing articles for a vast variety of niches and category such as newest trends, health issues, entertainment, technology, etc and I will make sure your article has all the key pointers and relevant information, Pros, Cons and basically all the information that a perfect article needs with good research. Your article is guaranteed to be appealing, attractive, engaging, original and passed through Copyscape for the audience so once they start reading they keep asking for more and stay interested.

$70 Chat With Writer
Assignments Hut

ONLINE

Assignments Hut

Hey, I can write about your given topic according to the provided requirements. I have a few more questions to ask as if there is any specific instructions or deadline issue. I have already completed more than 250 academic papers, articles, and technical articles. I can provide you samples. I believe my capabilities would be perfect for your project. I can finish this job within the necessary interval. I have four years of experience in this field. If you want to give me the project I had be very happy to discuss this further and get started for you as soon as possible.

$70 Chat With Writer
Accounting & Finance Master

ONLINE

Accounting & Finance Master

Dear client, after going through this project it matched my skills and since it is among my major fields of expertise and my preferred area that I always cover very comprehensively to meet client’s expectations and give outstanding results. I hereby request we proceed to a chat so as we discuss it details.

$50 Chat With Writer
Exam Attempter

ONLINE

Exam Attempter

I will help you with your online exams, quizzes and assignment with A+ grades. Please give me a chance and get relax :)

$55 Chat With Writer
Instant Assignments

ONLINE

Instant Assignments

Good day dear client, I am a full-time freelance writer with years of experience. My strongest strengths are strong dedication to duty, reliability, quality and excellence. I am going to do an outstanding job for you, kindly PM me and let us commence. Thank you so much in anticipation of your positive response. Thank you very much.

$70 Chat With Writer

Let our expert academic writers to help you in achieving a+ grades in your homework, assignment, quiz or exam.

Similar Homework Questions

Datum line in fluid mechanics - Communication - Wiltshire council clothes recycling - According to prothero what is the problem for judaism - Superior supermarkets case study - +971561686603 Abortion pills in Dubai/Abu Dhabi-mifepristone & misoprostol in DUBAI - Agarose gel electrophoresis of dna fragments late nite labs - A clothier makes coats and slacks - Before manager kim can begin the mbo process with her associates, what step needs to be taken? - Metal casting principles and techniques - Body recomposition workout plan pdf - Symbolic Language Assignment - Bordeaux international school fees - Blackvue dr550gw 2ch wifi password - Newcastle accounting and finance - Graduate Education Assistance - A chaste maid in cheapside - Mather hospital emergency room - Cinema ___ film that is a homage to the cinema - Conversion of a vm is irreversible - Brian fuller caravans ltd - Urban Expansion in the New Nation - Write a short post (~300 words/~2 paragraphs) - The Assignment—Part 2: - MBA - Main - Activity 5 - Arnold palmer hospital case study answers - Neutralization of acids and bases lab answers - Sociology current event assignment - Https www ted com talks sherry_turkle_alone_together - Concepts and theories in nursing - Langur monkey and chital deer symbiotic relationship facts - Common places mythologies of everyday life in russia - What is cross cutting symptom measure - Fit2work police check form pdf - Section review - Pierce the spaceman reading skill sheet answers - Owl english purdue edu owl resource 614 03 - Unit 5 Assignment: New York Times - What are the psychological costs and benefits of behaving compassionately - 2 responses - Lg hi macs white granite - Ross martin arrived at the following tax information - Asahi beverages graduate program - MBA - Main - Dis - 10 - Hardinge quick change collets - Ne manquez pas RTL 2 pendant vos vacances: écoutez en ligne - How to start html with notepad - Jean piaget theory of language development - Safe work method statements examples - Health communications assignment - BSHS/382 - RESEARCH AND STATISTICS - Marinco plug wiring instructions - A2 paper size cm - Characteristics of information literacy - Stability strategies in business pros and cons - Head to toe assessment nursing documentation - How is the claim management dialog box displayed in medisoft - The wrong place by susan michalski - C 130 cruise speed - Square root of 1/8 - Need help in writing a paper on IT Sourcing and Development in a Global Economy . - Two cables are tied together at c - Org mode edit link - REPLY 1 - Unsw census date semester 2 - The outcasts of poker flat analysis - Rokeach value survey example - Philip markoff brother - Why and how do governments regulate natural monopolies? - Tap your subsidiaries for global reach - 99.9 as a fraction - Human Resource Management - 1 Essay type Question - Gibbs reflective cycle example leadership - Identifying and Operationalizing variables - Franck hertz experiment video - Westpac future leaders scholarship - Which of the following training methods involve assisting a certified tradesperson at a work site? - Quant 7 - Module 4 writing - Journal entry - Erin brockovich movie worksheet answers - Csa z245 15 standard - How are topics added to the fasb technical agenda - Why is it just as important to decide what you won't do when creating your MVP as it to decide what you will do? - Chapter 1 homework financial accounting - Although plesiadapiforms may be the earliest primates, some consider a better contender might be? - Research Paper: Server Virtualization - Leanne brown look north - How to write a critically appraised topic - This is pr 11th edition pdf - Here are simplified financial statements for watervan corporation - Stukent mimic pro - Fractional indices to surds - 0.0891 as a percentage - Joboutlook gov career quiz - Johnson and johnson swot analysis essay - Lambda air fuel ratio chart - 5 pages - Management & Leadership of Organizations - Cosmic creation myths across cultures - Medical law and ethics quiz