public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 2/2] Replace struct event_t with struct inotify_event
@ 2012-04-05  0:42 Garrett Cooper
  2012-04-05  1:39 ` Wanlong Gao
  0 siblings, 1 reply; 7+ messages in thread
From: Garrett Cooper @ 2012-04-05  0:42 UTC (permalink / raw)
  To: ltp-list

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1839 bytes --]

Replace struct event_t with struct inotify_event

Also do some minor whitespace cleanup while I'm
in the neighborhood.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>

---
  testcases/kernel/syscalls/inotify/inotify02.c |   13 ++++---------
  1 files changed, 4 insertions(+), 9 deletions(-)


--------------1.7.2.5
Content-Type: text/x-patch; name="0002-Replace-struct-event_t-with-struct-inotify_event.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0002-Replace-struct-event_t-with-struct-inotify_event.patch"

diff --git a/testcases/kernel/syscalls/inotify/inotify02.c b/testcases/kernel/syscalls/inotify/inotify02.c
index 59f83ba..c87797f 100644
--- a/testcases/kernel/syscalls/inotify/inotify02.c
+++ b/testcases/kernel/syscalls/inotify/inotify02.c
@@ -81,15 +81,10 @@ char buf[BUF_SIZE];
  int fd, fd_notify;
  int wd;

-struct event_t {
-	char name[BUF_SIZE];
-	int mask;
-	int len;
-};
  #define FILE_NAME1 "test_file1"
  #define FILE_NAME2 "test_file2"

-struct event_t event_set[EVENT_MAX];
+struct inotify_event event_set[EVENT_MAX];

  char event_buf[EVENT_BUF_LEN];

@@ -239,7 +234,7 @@ int main(int ac, char **av)
  						 "1c17d18e3775485bf1e0ce79575eb637a94494a2.");
  				tst_resm(TFAIL,
  					 "get unnecessary event: "
-					 "wd=%d mask=%x cookie=%u len=%u"
+					 "wd=%d mask=%x cookie=%u len=%u "
  					 "name=\"%s\"", event->wd, event->mask,
  					 event->cookie, event->len,
  					 event->name);
@@ -250,8 +245,8 @@ int main(int ac, char **av)
  				    (event_set[test_num].name, event->name,
  				     event->len))) {
  				tst_resm(TPASS,
-					 "get event: wd=%d mask=%x"
-					 " cookie=%u len=%u name=\"%s\"",
+					 "get event: wd=%d mask=%x "
+					 "cookie=%u len=%u name=\"%s\"",
  					 event->wd, event->mask, event->cookie,
  					 event->len, event->name);

[-- Attachment #2: Type: TEXT/PLAIN, Size: 2258 bytes --]

From 3852ca2ef240f2e5eb0fdc0d727c14f93fc00cf8 Mon Sep 17 00:00:00 2001
From: Garrett Cooper <yanegomi@gmail.com>
Date: Wed, 4 Apr 2012 17:19:08 -0700
Subject: [PATCH 2/2] Replace struct event_t with struct inotify_event
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------1.7.2.5"

This is a multi-part message in MIME format.
--------------1.7.2.5
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit


Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
---
 testcases/kernel/syscalls/inotify/inotify02.c |   13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)


--------------1.7.2.5
Content-Type: text/x-patch; name="0002-Replace-struct-event_t-with-struct-inotify_event.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0002-Replace-struct-event_t-with-struct-inotify_event.patch"

diff --git a/testcases/kernel/syscalls/inotify/inotify02.c b/testcases/kernel/syscalls/inotify/inotify02.c
index 59f83ba..c87797f 100644
--- a/testcases/kernel/syscalls/inotify/inotify02.c
+++ b/testcases/kernel/syscalls/inotify/inotify02.c
@@ -81,15 +81,10 @@ char buf[BUF_SIZE];
 int fd, fd_notify;
 int wd;
 
-struct event_t {
-	char name[BUF_SIZE];
-	int mask;
-	int len;
-};
 #define FILE_NAME1 "test_file1"
 #define FILE_NAME2 "test_file2"
 
-struct event_t event_set[EVENT_MAX];
+struct inotify_event event_set[EVENT_MAX];
 
 char event_buf[EVENT_BUF_LEN];
 
@@ -239,7 +234,7 @@ int main(int ac, char **av)
 						 "1c17d18e3775485bf1e0ce79575eb637a94494a2.");
 				tst_resm(TFAIL,
 					 "get unnecessary event: "
-					 "wd=%d mask=%x cookie=%u len=%u"
+					 "wd=%d mask=%x cookie=%u len=%u "
 					 "name=\"%s\"", event->wd, event->mask,
 					 event->cookie, event->len,
 					 event->name);
@@ -250,8 +245,8 @@ int main(int ac, char **av)
 				    (event_set[test_num].name, event->name,
 				     event->len))) {
 				tst_resm(TPASS,
-					 "get event: wd=%d mask=%x"
-					 " cookie=%u len=%u name=\"%s\"",
+					 "get event: wd=%d mask=%x "
+					 "cookie=%u len=%u name=\"%s\"",
 					 event->wd, event->mask, event->cookie,
 					 event->len, event->name);
 

--------------1.7.2.5--



[-- Attachment #3: Type: text/plain, Size: 274 bytes --]

------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev

[-- Attachment #4: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-05-03 13:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-05  0:42 [LTP] [PATCH 2/2] Replace struct event_t with struct inotify_event Garrett Cooper
2012-04-05  1:39 ` Wanlong Gao
2012-04-05  2:10   ` Garrett Cooper
2012-04-11  2:53     ` Wanlong Gao
2012-04-11  9:18       ` Garrett Cooper
2012-04-11  9:30         ` Wanlong Gao
2012-05-03 12:46           ` Cyril Hrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox