Hi,
I am Rohan Rajak a 3rd year computer science student at IIT Kharagpur,
(India).
My interest lies in System Programming. I have taken courses like operating
system, computer networks etc. And I am familiar with multithreaded and
shell programming.

I am looking forward to work in comprehensive test suite project of strace
in GSOC 2017. I have gone through most of the conversation in the mailing
list (recent and archive), I know I took time to get started as I was
trying hard to understand it.


I have implemented an exit and an error message in the file test/skodic.c
to demonstrate races.
I have exited with -1 when the file descriptor haven't found any file.

git send-email is not working as I am in a private network.

So i am attaching the patch below

please review my patch
From 7d6a3334e95b098292aa0fb300692f1988db86d6 Mon Sep 17 00:00:00 2001
From: rajakrohan <rajakroha...@gmail.com>
Date: Sun, 19 Mar 2017 20:50:52 +0530
Subject: [PATCH] Error message added to the file descriptor

---
 test/skodic.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/test/skodic.c b/test/skodic.c
index 4dcd955..3a96638 100644
--- a/test/skodic.c
+++ b/test/skodic.c
@@ -19,6 +19,10 @@ int main(int argc, char *argv[])
 	int fd;
 
 	fd = open("/tmp/delme", O_RDWR);
+	if(fd==-1) {
+              printf("Create /tmp/delme with 10K of zeros and 666 mode, then run this under strace\n");
+               exit(-1);
+       }
 	c = mmap(0, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
 	*c = 0;
 
-- 
2.7.4

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to