All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shuah Khan <shuahkh@osg.samsung.com>
To: corbet@lwn.net, richardcochran@gmail.com
Cc: Shuah Khan <shuahkh@osg.samsung.com>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: [PATCH 1/9] selftests: move dnotify_test from Documentation/filesystems
Date: Fri,  9 Sep 2016 16:22:42 -0600	[thread overview]
Message-ID: <86ba11fc5f22dba9b322b38eec8e63d19f6634af.1473458697.git.shuahkh@osg.samsung.com> (raw)
In-Reply-To: <cover.1473458697.git.shuahkh@osg.samsung.com>
In-Reply-To: <cover.1473458697.git.shuahkh@osg.samsung.com>

Move dnotify_test from Documentation/filesystems to selftests/filesystems

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
 Documentation/filesystems/Makefile                 |  5 ----
 Documentation/filesystems/dnotify_test.c           | 34 ----------------------
 tools/testing/selftests/filesystems/Makefile       |  5 ++++
 tools/testing/selftests/filesystems/dnotify_test.c | 34 ++++++++++++++++++++++
 4 files changed, 39 insertions(+), 39 deletions(-)
 delete mode 100644 Documentation/filesystems/Makefile
 delete mode 100644 Documentation/filesystems/dnotify_test.c
 create mode 100644 tools/testing/selftests/filesystems/Makefile
 create mode 100644 tools/testing/selftests/filesystems/dnotify_test.c

diff --git a/Documentation/filesystems/Makefile b/Documentation/filesystems/Makefile
deleted file mode 100644
index 883010c..0000000
--- a/Documentation/filesystems/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-# List of programs to build
-hostprogs-y := dnotify_test
-
-# Tell kbuild to always build the programs
-always := $(hostprogs-y)
diff --git a/Documentation/filesystems/dnotify_test.c b/Documentation/filesystems/dnotify_test.c
deleted file mode 100644
index 8b37b4a..0000000
--- a/Documentation/filesystems/dnotify_test.c
+++ /dev/null
@@ -1,34 +0,0 @@
-#define _GNU_SOURCE	/* needed to get the defines */
-#include <fcntl.h>	/* in glibc 2.2 this has the needed
-				   values defined */
-#include <signal.h>
-#include <stdio.h>
-#include <unistd.h>
-
-static volatile int event_fd;
-
-static void handler(int sig, siginfo_t *si, void *data)
-{
-	event_fd = si->si_fd;
-}
-
-int main(void)
-{
-	struct sigaction act;
-	int fd;
-
-	act.sa_sigaction = handler;
-	sigemptyset(&act.sa_mask);
-	act.sa_flags = SA_SIGINFO;
-	sigaction(SIGRTMIN + 1, &act, NULL);
-
-	fd = open(".", O_RDONLY);
-	fcntl(fd, F_SETSIG, SIGRTMIN + 1);
-	fcntl(fd, F_NOTIFY, DN_MODIFY|DN_CREATE|DN_MULTISHOT);
-	/* we will now be notified if any of the files
-	   in "." is modified or new files are created */
-	while (1) {
-		pause();
-		printf("Got event on fd=%d\n", event_fd);
-	}
-}
diff --git a/tools/testing/selftests/filesystems/Makefile b/tools/testing/selftests/filesystems/Makefile
new file mode 100644
index 0000000..883010c
--- /dev/null
+++ b/tools/testing/selftests/filesystems/Makefile
@@ -0,0 +1,5 @@
+# List of programs to build
+hostprogs-y := dnotify_test
+
+# Tell kbuild to always build the programs
+always := $(hostprogs-y)
diff --git a/tools/testing/selftests/filesystems/dnotify_test.c b/tools/testing/selftests/filesystems/dnotify_test.c
new file mode 100644
index 0000000..8b37b4a
--- /dev/null
+++ b/tools/testing/selftests/filesystems/dnotify_test.c
@@ -0,0 +1,34 @@
+#define _GNU_SOURCE	/* needed to get the defines */
+#include <fcntl.h>	/* in glibc 2.2 this has the needed
+				   values defined */
+#include <signal.h>
+#include <stdio.h>
+#include <unistd.h>
+
+static volatile int event_fd;
+
+static void handler(int sig, siginfo_t *si, void *data)
+{
+	event_fd = si->si_fd;
+}
+
+int main(void)
+{
+	struct sigaction act;
+	int fd;
+
+	act.sa_sigaction = handler;
+	sigemptyset(&act.sa_mask);
+	act.sa_flags = SA_SIGINFO;
+	sigaction(SIGRTMIN + 1, &act, NULL);
+
+	fd = open(".", O_RDONLY);
+	fcntl(fd, F_SETSIG, SIGRTMIN + 1);
+	fcntl(fd, F_NOTIFY, DN_MODIFY|DN_CREATE|DN_MULTISHOT);
+	/* we will now be notified if any of the files
+	   in "." is modified or new files are created */
+	while (1) {
+		pause();
+		printf("Got event on fd=%d\n", event_fd);
+	}
+}
-- 
2.7.4

  reply	other threads:[~2016-09-09 22:25 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-09 22:22 [PATCH 0/9] Move runnable code (tests) from Documentation to selftests Shuah Khan
2016-09-09 22:22 ` Shuah Khan [this message]
2016-09-10  8:08   ` [PATCH 1/9] selftests: move dnotify_test from Documentation/filesystems kbuild test robot
2016-09-09 22:22 ` [PATCH 2/9] selftests: update filesystems Makefile to work under selftests Shuah Khan
2016-09-13 11:56   ` Michael Ellerman
2016-09-13 13:20     ` Shuah Khan
2016-09-09 22:22 ` [PATCH 3/9] selftests: move .gitignore from Documentation/filesystems Shuah Khan
2016-09-09 22:22 ` [PATCH 4/9] selftests: move prctl tests from Documentation/prctl Shuah Khan
2016-09-09 23:58   ` kbuild test robot
2016-09-10  0:05   ` kbuild test robot
2016-09-09 22:22 ` [PATCH 5/9] selftests: Update prctl Makefile to work under selftests Shuah Khan
2016-09-09 22:22 ` [PATCH 6/9] selftests: move ptp tests from Documentation/ptp Shuah Khan
2016-09-10  0:07   ` kbuild test robot
2016-09-09 22:22 ` [PATCH 7/9] selftests: Update ptp Makefile to work under selftests Shuah Khan
2016-09-10 13:32   ` Sergei Shtylyov
2016-09-09 22:22 ` [PATCH 8/9] selftests: move vDSO tests from Documentation/vDSO Shuah Khan
2016-09-10  0:46   ` kbuild test robot
2016-09-09 22:22 ` [PATCH 9/9] selftests: Update vDSO Makefile to work under selftests Shuah Khan
2016-09-10 13:33   ` Sergei Shtylyov
2016-09-10  7:01 ` [PATCH 0/9] Move runnable code (tests) from Documentation to selftests Jonathan Corbet
2016-09-13  9:20   ` Jani Nikula
2016-09-13 13:25     ` Shuah Khan
2016-09-13 13:45       ` Jani Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86ba11fc5f22dba9b322b38eec8e63d19f6634af.1473458697.git.shuahkh@osg.samsung.com \
    --to=shuahkh@osg.samsung.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.