public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/2] tests/i915/gem_fd_exhaustion.c: Remove unused sysfs functions
@ 2019-04-08 22:51 Antonio Argenziano
  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
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Antonio Argenziano @ 2019-04-08 22:51 UTC (permalink / raw)
  To: igt-dev; +Cc: Petri Latvala

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

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

end of thread, other threads:[~2019-04-09  6:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-08 22:51 [igt-dev] [PATCH i-g-t 1/2] tests/i915/gem_fd_exhaustion.c: Remove unused sysfs functions Antonio Argenziano
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

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