public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Antonio Argenziano <antonio.argenziano@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Petri Latvala <petri.latvala@intel.com>
Subject: [igt-dev] [PATCH i-g-t 1/2] tests/i915/gem_fd_exhaustion.c: Remove unused sysfs functions
Date: Mon,  8 Apr 2019 15:51:59 -0700	[thread overview]
Message-ID: <20190408225200.33606-1-antonio.argenziano@intel.com> (raw)

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>
---
 tests/i915/gem_fd_exhaustion.c | 35 ----------------------------------
 1 file changed, 35 deletions(-)

diff --git a/tests/i915/gem_fd_exhaustion.c b/tests/i915/gem_fd_exhaustion.c
index 9704fa02..23602b98 100644
--- a/tests/i915/gem_fd_exhaustion.c
+++ b/tests/i915/gem_fd_exhaustion.c
@@ -33,39 +33,6 @@
 #include <fcntl.h>
 #include <limits.h>
 
-unsigned int original_nr_open;
-
-static int read_sysctl(const char *path)
-{
-	unsigned int val;
-	FILE *f = fopen(path, "r");
-
-	if (f) {
-		igt_assert(fscanf(f, "%u", &val) == 1);
-		fclose(f);
-		return val;
-	}
-	return -errno;
-}
-
-static int write_sysctl(const char *path, unsigned int val)
-{
-	FILE *f = fopen(path, "w");
-
-	if (f) {
-		igt_assert(fprintf(f, "%u", val));
-		fclose(f);
-		return 0;
-	}
-	return -errno;
-}
-
-static void restore_original_sysctl(int sig)
-{
-	if (original_nr_open > 0)
-		write_sysctl("/proc/sys/fs/nr_open", original_nr_open);
-}
-
 igt_simple_main
 {
 	int fd;
@@ -74,8 +41,6 @@ igt_simple_main
 
 	fd = drm_open_driver(DRIVER_INTEL);
 
-	igt_install_exit_handler(restore_original_sysctl);
-
 	igt_fork(n, 1) {
 		igt_drop_root();
 
-- 
2.20.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

             reply	other threads:[~2019-04-08 22:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-08 22:51 Antonio Argenziano [this message]
2019-04-08 22:52 ` [igt-dev] [PATCH i-g-t 2/2] tests/i915/gem_fd_exhaustion.c: Expect ENFILE when fds run out Antonio Argenziano
2019-04-08 23:00   ` Chris Wilson
2019-04-08 23:06     ` Antonio Argenziano
2019-04-08 23:42       ` Chris Wilson
2019-04-08 23:53 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] tests/i915/gem_fd_exhaustion.c: Remove unused sysfs functions Patchwork
2019-04-09  6:31 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

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=20190408225200.33606-1-antonio.argenziano@intel.com \
    --to=antonio.argenziano@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=petri.latvala@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox