From 9f9d38d66ab43234515b2cab6756df269f41f707 Mon Sep 17 00:00:00 2001 From: Antonio Argenziano Date: Mon, 8 Apr 2019 15:51:59 -0700 Subject: tests/i915/gem_fd_exhaustion.c: Remove unused sysfs functions The test uses the new library helper so it doesn't need any local helper. Cc: Chris Wilson Cc: Petri Latvala Signed-off-by: Antonio Argenziano Reviewed-by: Arkadiusz Hiler --- tests/i915/gem_fd_exhaustion.c | 35 ----------------------------------- 1 file changed, 35 deletions(-) (limited to 'tests') 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 #include -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(); -- cgit v1.2.3