public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t v3 1/1] lib: consolidate duplicated define of vfs_file_max(void)
@ 2019-04-25 17:23 Caz Yokoyama
  2019-04-25 18:18 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v3,1/1] " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Caz Yokoyama @ 2019-04-25 17:23 UTC (permalink / raw)
  To: igt-dev; +Cc: Petri Latvala

Remove it from intel_os.c and gem_exec_reuse.c and globally
define in igt_aux.c.

v3: update comment in the code and commit message.

Signed-off-by: Caz Yokoyama <caz.yokoyama@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
---
 lib/igt_aux.c               | 24 ++++++++++++++++++++++++
 lib/igt_aux.h               |  2 ++
 lib/intel_os.c              | 14 --------------
 tests/i915/gem_exec_reuse.c | 14 +-------------
 4 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index 05528352..c3a9764a 100644
--- a/lib/igt_aux.c
+++ b/lib/igt_aux.c
@@ -1615,3 +1615,27 @@ bool igt_allow_unlimited_files(void)
 	rlim.rlim_max = nofile_rlim;
 	return setrlimit(RLIMIT_NOFILE, &rlim) == 0;
 }
+
+/**
+ * vfs_file_max: report maximum number of files
+ *
+ * Get the global system-wide maximum of open files the kernel allows,
+ * by reading /proc/sys/fs/file-max. Fails the current subtest if
+ * reading the file fails, and returns a suitable best guess if it
+ * cannot be opened.
+ *
+ * Returns: System-wide maximum of open files, or a best effort guess.
+ */
+uint64_t vfs_file_max(void)
+{
+	static long long unsigned max;
+	if (max == 0) {
+		FILE *file = fopen("/proc/sys/fs/file-max", "r");
+		max = 80000;
+		if (file) {
+			igt_assert(fscanf(file, "%llu", &max) == 1);
+			fclose(file);
+		}
+	}
+	return max;
+}
diff --git a/lib/igt_aux.h b/lib/igt_aux.h
index 55392790..b5416ae0 100644
--- a/lib/igt_aux.h
+++ b/lib/igt_aux.h
@@ -297,4 +297,6 @@ void igt_lsof(const char *dpath);
 
 #define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
 
+uint64_t vfs_file_max(void);
+
 #endif /* IGT_AUX_H */
diff --git a/lib/intel_os.c b/lib/intel_os.c
index dd93bea1..505831c0 100644
--- a/lib/intel_os.c
+++ b/lib/intel_os.c
@@ -279,20 +279,6 @@ void *intel_get_total_pinnable_mem(size_t *total)
 	return can_mlock;
 }
 
-static uint64_t vfs_file_max(void)
-{
-	static long long unsigned max;
-	if (max == 0) {
-		FILE *file = fopen("/proc/sys/fs/file-max", "r");
-		max = 80000;
-		if (file) {
-			igt_assert(fscanf(file, "%llu", &max) == 1);
-			fclose(file);
-		}
-	}
-	return max;
-}
-
 static unsigned max_open_files(void)
 {
 	struct rlimit rlim;
diff --git a/tests/i915/gem_exec_reuse.c b/tests/i915/gem_exec_reuse.c
index 9cba1354..935bfa9a 100644
--- a/tests/i915/gem_exec_reuse.c
+++ b/tests/i915/gem_exec_reuse.c
@@ -25,6 +25,7 @@
 #include <sys/resource.h>
 
 #include "igt.h"
+#include "igt_aux.h"
 
 IGT_TEST_DESCRIPTION("Inspect scaling with large number of reused objects");
 
@@ -56,19 +57,6 @@ static void noop(struct noop *n,
 	gem_execbuf(n->fd, &execbuf);
 }
 
-static uint64_t vfs_file_max(void)
-{
-	long long unsigned max = 80000;
-	FILE *file = fopen("/proc/sys/fs/file-max", "r");
-	if (file) {
-		igt_assert(fscanf(file, "%llu", &max) == 1);
-		fclose(file);
-	}
-
-	igt_info("System limit for open files is %llu\n", max);
-	return max;
-}
-
 static uint64_t max_open_files(void)
 {
 	struct rlimit rlim;
-- 
2.17.1

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

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

* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v3,1/1] lib: consolidate duplicated define of vfs_file_max(void)
  2019-04-25 17:23 [igt-dev] [PATCH i-g-t v3 1/1] lib: consolidate duplicated define of vfs_file_max(void) Caz Yokoyama
@ 2019-04-25 18:18 ` Patchwork
  2019-04-26  7:43 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  2019-04-26  9:41 ` [igt-dev] [PATCH i-g-t v3 1/1] " Petri Latvala
  2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2019-04-25 18:18 UTC (permalink / raw)
  To: Caz Yokoyama; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,v3,1/1] lib: consolidate duplicated define of vfs_file_max(void)
URL   : https://patchwork.freedesktop.org/series/59952/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6000 -> IGTPW_2922
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/59952/revisions/1/mbox/

Known issues
------------

  Here are the changes found in IGTPW_2922 that come from known issues:

### IGT changes ###

#### Possible fixes ####

  * igt@i915_selftest@live_contexts:
    - fi-bdw-gvtdvm:      [DMESG-FAIL][1] ([fdo#110235 ]) -> [PASS][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/fi-bdw-gvtdvm/igt@i915_selftest@live_contexts.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2922/fi-bdw-gvtdvm/igt@i915_selftest@live_contexts.html

  
  [fdo#110235 ]: https://bugs.freedesktop.org/show_bug.cgi?id=110235 


Participating hosts (32 -> 27)
------------------------------

  Additional (6): fi-skl-6770hq fi-cfl-guc fi-apl-guc fi-cfl-8109u fi-blb-e6850 fi-kbl-r 
  Missing    (11): fi-kbl-soraka fi-ilk-m540 fi-bsw-n3050 fi-bsw-cyan fi-kbl-guc fi-ctg-p8600 fi-gdg-551 fi-pnv-d510 fi-skl-6700k2 fi-skl-lmem fi-skl-6600u 


Build changes
-------------

  * IGT: IGT_4966 -> IGTPW_2922

  CI_DRM_6000: a0c3fff52846356f63dd210cddf81e5bb01e7aa0 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2922: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2922/
  IGT_4966: a75429544f5721316b04a36551c57573e0c79486 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2922/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,v3,1/1] lib: consolidate duplicated define of vfs_file_max(void)
  2019-04-25 17:23 [igt-dev] [PATCH i-g-t v3 1/1] lib: consolidate duplicated define of vfs_file_max(void) Caz Yokoyama
  2019-04-25 18:18 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v3,1/1] " Patchwork
@ 2019-04-26  7:43 ` Patchwork
  2019-04-26  9:41 ` [igt-dev] [PATCH i-g-t v3 1/1] " Petri Latvala
  2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2019-04-26  7:43 UTC (permalink / raw)
  To: Caz Yokoyama; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,v3,1/1] lib: consolidate duplicated define of vfs_file_max(void)
URL   : https://patchwork.freedesktop.org/series/59952/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6000_full -> IGTPW_2922_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/59952/revisions/1/mbox/

Known issues
------------

  Here are the changes found in IGTPW_2922_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_tiled_swapping@non-threaded:
    - shard-iclb:         [PASS][1] -> [FAIL][2] ([fdo#108686])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-iclb6/igt@gem_tiled_swapping@non-threaded.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2922/shard-iclb7/igt@gem_tiled_swapping@non-threaded.html

  * igt@kms_cursor_legacy@cursor-vs-flip-atomic:
    - shard-hsw:          [PASS][3] -> [FAIL][4] ([fdo#103355])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-hsw7/igt@kms_cursor_legacy@cursor-vs-flip-atomic.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2922/shard-hsw6/igt@kms_cursor_legacy@cursor-vs-flip-atomic.html

  * igt@kms_frontbuffer_tracking@fbcpsr-rgb565-draw-render:
    - shard-iclb:         [PASS][5] -> [FAIL][6] ([fdo#103167]) +3 similar issues
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-iclb7/igt@kms_frontbuffer_tracking@fbcpsr-rgb565-draw-render.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2922/shard-iclb8/igt@kms_frontbuffer_tracking@fbcpsr-rgb565-draw-render.html

  * igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes:
    - shard-apl:          [PASS][7] -> [DMESG-WARN][8] ([fdo#108566]) +2 similar issues
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-apl2/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2922/shard-apl5/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes.html

  * igt@kms_plane_lowres@pipe-a-tiling-y:
    - shard-iclb:         [PASS][9] -> [FAIL][10] ([fdo#103166])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-iclb5/igt@kms_plane_lowres@pipe-a-tiling-y.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2922/shard-iclb1/igt@kms_plane_lowres@pipe-a-tiling-y.html

  * igt@kms_plane_scaling@pipe-c-scaler-with-pixel-format:
    - shard-glk:          [PASS][11] -> [SKIP][12] ([fdo#109271] / [fdo#109278])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-glk9/igt@kms_plane_scaling@pipe-c-scaler-with-pixel-format.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2922/shard-glk1/igt@kms_plane_scaling@pipe-c-scaler-with-pixel-format.html

  * igt@kms_psr2_su@frontbuffer:
    - shard-iclb:         [PASS][13] -> [SKIP][14] ([fdo#109642])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-iclb2/igt@kms_psr2_su@frontbuffer.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2922/shard-iclb1/igt@kms_psr2_su@frontbuffer.html

  * igt@kms_psr@psr2_sprite_blt:
    - shard-iclb:         [PASS][15] -> [SKIP][16] ([fdo#109441]) +4 similar issues
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-iclb2/igt@kms_psr@psr2_sprite_blt.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2922/shard-iclb7/igt@kms_psr@psr2_sprite_blt.html

  
#### Possible fixes ####

  * igt@gem_ctx_isolation@rcs0-s3:
    - shard-kbl:          [INCOMPLETE][17] ([fdo#103665]) -> [PASS][18]
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-kbl2/igt@gem_ctx_isolation@rcs0-s3.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2922/shard-kbl2/igt@gem_ctx_isolation@rcs0-s3.html

  * igt@kms_cursor_crc@cursor-256x256-suspend:
    - shard-kbl:          [DMESG-WARN][19] ([fdo#108566]) -> [PASS][20]
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-kbl5/igt@kms_cursor_crc@cursor-256x256-suspend.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2922/shard-kbl7/igt@kms_cursor_crc@cursor-256x256-suspend.html

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-blt:
    - shard-iclb:         [FAIL][21] ([fdo#103167]) -> [PASS][22] +5 similar issues
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-iclb2/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-blt.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2922/shard-iclb8/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-blt.html

  * igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes:
    - shard-apl:          [DMESG-WARN][23] ([fdo#108566]) -> [PASS][24]
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-apl3/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2922/shard-apl2/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html

  * igt@kms_plane_scaling@pipe-b-scaler-with-rotation:
    - shard-glk:          [SKIP][25] ([fdo#109271] / [fdo#109278]) -> [PASS][26] +1 similar issue
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-glk5/igt@kms_plane_scaling@pipe-b-scaler-with-rotation.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2922/shard-glk9/igt@kms_plane_scaling@pipe-b-scaler-with-rotation.html

  * igt@kms_psr@psr2_cursor_plane_onoff:
    - shard-iclb:         [SKIP][27] ([fdo#109441]) -> [PASS][28] +2 similar issues
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-iclb3/igt@kms_psr@psr2_cursor_plane_onoff.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2922/shard-iclb2/igt@kms_psr@psr2_cursor_plane_onoff.html

  * igt@kms_rotation_crc@multiplane-rotation-cropping-top:
    - shard-kbl:          [FAIL][29] ([fdo#109016]) -> [PASS][30]
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-kbl7/igt@kms_rotation_crc@multiplane-rotation-cropping-top.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2922/shard-kbl6/igt@kms_rotation_crc@multiplane-rotation-cropping-top.html

  * igt@kms_setmode@basic:
    - shard-apl:          [FAIL][31] ([fdo#99912]) -> [PASS][32]
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-apl2/igt@kms_setmode@basic.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2922/shard-apl1/igt@kms_setmode@basic.html

  * igt@kms_sysfs_edid_timing:
    - shard-iclb:         [FAIL][33] ([fdo#100047]) -> [PASS][34]
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6000/shard-iclb3/igt@kms_sysfs_edid_timing.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2922/shard-iclb5/igt@kms_sysfs_edid_timing.html

  
  [fdo#100047]: https://bugs.freedesktop.org/show_bug.cgi?id=100047
  [fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103355]: https://bugs.freedesktop.org/show_bug.cgi?id=103355
  [fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
  [fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
  [fdo#108686]: https://bugs.freedesktop.org/show_bug.cgi?id=108686
  [fdo#109016]: https://bugs.freedesktop.org/show_bug.cgi?id=109016
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912


Participating hosts (10 -> 6)
------------------------------

  Missing    (4): pig-skl-6260u shard-skl pig-hsw-4770r pig-glk-j5005 


Build changes
-------------

  * IGT: IGT_4966 -> IGTPW_2922
  * Piglit: piglit_4509 -> None

  CI_DRM_6000: a0c3fff52846356f63dd210cddf81e5bb01e7aa0 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2922: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2922/
  IGT_4966: a75429544f5721316b04a36551c57573e0c79486 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2922/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t v3 1/1] lib: consolidate duplicated define of vfs_file_max(void)
  2019-04-25 17:23 [igt-dev] [PATCH i-g-t v3 1/1] lib: consolidate duplicated define of vfs_file_max(void) Caz Yokoyama
  2019-04-25 18:18 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v3,1/1] " Patchwork
  2019-04-26  7:43 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2019-04-26  9:41 ` Petri Latvala
  2019-04-26  9:52   ` Petri Latvala
  2 siblings, 1 reply; 5+ messages in thread
From: Petri Latvala @ 2019-04-26  9:41 UTC (permalink / raw)
  To: Caz Yokoyama; +Cc: igt-dev

On Thu, Apr 25, 2019 at 10:23:13AM -0700, Caz Yokoyama wrote:
> Remove it from intel_os.c and gem_exec_reuse.c and globally
> define in igt_aux.c.
> 
> v3: update comment in the code and commit message.
> 
> Signed-off-by: Caz Yokoyama <caz.yokoyama@intel.com>
> Cc: Petri Latvala <petri.latvala@intel.com>


Reviewed-by: Petri Latvala <petri.latvala@intel.com>

> ---
>  lib/igt_aux.c               | 24 ++++++++++++++++++++++++
>  lib/igt_aux.h               |  2 ++
>  lib/intel_os.c              | 14 --------------
>  tests/i915/gem_exec_reuse.c | 14 +-------------
>  4 files changed, 27 insertions(+), 27 deletions(-)
> 
> diff --git a/lib/igt_aux.c b/lib/igt_aux.c
> index 05528352..c3a9764a 100644
> --- a/lib/igt_aux.c
> +++ b/lib/igt_aux.c
> @@ -1615,3 +1615,27 @@ bool igt_allow_unlimited_files(void)
>  	rlim.rlim_max = nofile_rlim;
>  	return setrlimit(RLIMIT_NOFILE, &rlim) == 0;
>  }
> +
> +/**
> + * vfs_file_max: report maximum number of files
> + *
> + * Get the global system-wide maximum of open files the kernel allows,
> + * by reading /proc/sys/fs/file-max. Fails the current subtest if
> + * reading the file fails, and returns a suitable best guess if it
> + * cannot be opened.
> + *
> + * Returns: System-wide maximum of open files, or a best effort guess.
> + */
> +uint64_t vfs_file_max(void)
> +{
> +	static long long unsigned max;
> +	if (max == 0) {
> +		FILE *file = fopen("/proc/sys/fs/file-max", "r");
> +		max = 80000;
> +		if (file) {
> +			igt_assert(fscanf(file, "%llu", &max) == 1);
> +			fclose(file);
> +		}
> +	}
> +	return max;
> +}
> diff --git a/lib/igt_aux.h b/lib/igt_aux.h
> index 55392790..b5416ae0 100644
> --- a/lib/igt_aux.h
> +++ b/lib/igt_aux.h
> @@ -297,4 +297,6 @@ void igt_lsof(const char *dpath);
>  
>  #define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
>  
> +uint64_t vfs_file_max(void);
> +
>  #endif /* IGT_AUX_H */
> diff --git a/lib/intel_os.c b/lib/intel_os.c
> index dd93bea1..505831c0 100644
> --- a/lib/intel_os.c
> +++ b/lib/intel_os.c
> @@ -279,20 +279,6 @@ void *intel_get_total_pinnable_mem(size_t *total)
>  	return can_mlock;
>  }
>  
> -static uint64_t vfs_file_max(void)
> -{
> -	static long long unsigned max;
> -	if (max == 0) {
> -		FILE *file = fopen("/proc/sys/fs/file-max", "r");
> -		max = 80000;
> -		if (file) {
> -			igt_assert(fscanf(file, "%llu", &max) == 1);
> -			fclose(file);
> -		}
> -	}
> -	return max;
> -}
> -
>  static unsigned max_open_files(void)
>  {
>  	struct rlimit rlim;
> diff --git a/tests/i915/gem_exec_reuse.c b/tests/i915/gem_exec_reuse.c
> index 9cba1354..935bfa9a 100644
> --- a/tests/i915/gem_exec_reuse.c
> +++ b/tests/i915/gem_exec_reuse.c
> @@ -25,6 +25,7 @@
>  #include <sys/resource.h>
>  
>  #include "igt.h"
> +#include "igt_aux.h"
>  
>  IGT_TEST_DESCRIPTION("Inspect scaling with large number of reused objects");
>  
> @@ -56,19 +57,6 @@ static void noop(struct noop *n,
>  	gem_execbuf(n->fd, &execbuf);
>  }
>  
> -static uint64_t vfs_file_max(void)
> -{
> -	long long unsigned max = 80000;
> -	FILE *file = fopen("/proc/sys/fs/file-max", "r");
> -	if (file) {
> -		igt_assert(fscanf(file, "%llu", &max) == 1);
> -		fclose(file);
> -	}
> -
> -	igt_info("System limit for open files is %llu\n", max);
> -	return max;
> -}
> -
>  static uint64_t max_open_files(void)
>  {
>  	struct rlimit rlim;
> -- 
> 2.17.1
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t v3 1/1] lib: consolidate duplicated define of vfs_file_max(void)
  2019-04-26  9:41 ` [igt-dev] [PATCH i-g-t v3 1/1] " Petri Latvala
@ 2019-04-26  9:52   ` Petri Latvala
  0 siblings, 0 replies; 5+ messages in thread
From: Petri Latvala @ 2019-04-26  9:52 UTC (permalink / raw)
  To: Caz Yokoyama, igt-dev

On Fri, Apr 26, 2019 at 12:41:10PM +0300, Petri Latvala wrote:
> On Thu, Apr 25, 2019 at 10:23:13AM -0700, Caz Yokoyama wrote:
> > Remove it from intel_os.c and gem_exec_reuse.c and globally
> > define in igt_aux.c.
> > 
> > v3: update comment in the code and commit message.
> > 
> > Signed-off-by: Caz Yokoyama <caz.yokoyama@intel.com>
> > Cc: Petri Latvala <petri.latvala@intel.com>
> 
> 
> Reviewed-by: Petri Latvala <petri.latvala@intel.com>

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

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

end of thread, other threads:[~2019-04-26  9:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-25 17:23 [igt-dev] [PATCH i-g-t v3 1/1] lib: consolidate duplicated define of vfs_file_max(void) Caz Yokoyama
2019-04-25 18:18 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v3,1/1] " Patchwork
2019-04-26  7:43 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-04-26  9:41 ` [igt-dev] [PATCH i-g-t v3 1/1] " Petri Latvala
2019-04-26  9:52   ` Petri Latvala

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