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

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

diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index 05528352..6516a6d6 100644
--- a/lib/igt_aux.c
+++ b/lib/igt_aux.c
@@ -1615,3 +1615,24 @@ 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
+ *
+ * By reading /proc/sys/fs/file-max, it returns maximum number of files kernel
+ * allows to have at the same time. It may returns 80000 or assert failure
+ * on error.
+ */
+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,v2,1/1] lib: consolidate duplicated define of vfs_file_max(void)
  2019-04-24 15:31 [igt-dev] [PATCH i-g-t v2 1/1] lib: consolidate duplicated define of vfs_file_max(void) Caz Yokoyama
@ 2019-04-24 18:37 ` Patchwork
  2019-04-25  4:16 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
  2019-04-25  9:32 ` [igt-dev] [PATCH i-g-t v2 1/1] " Petri Latvala
  2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2019-04-24 18:37 UTC (permalink / raw)
  To: Caz Yokoyama; +Cc: igt-dev

== Series Details ==

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

== Summary ==

CI Bug Log - changes from CI_DRM_5990 -> IGTPW_2912
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

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

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


Participating hosts (40 -> 43)
------------------------------

  Additional (8): fi-hsw-peppy fi-icl-u2 fi-cfl-8700k fi-pnv-d510 fi-icl-y fi-blb-e6850 fi-byt-n2820 fi-bsw-kefka 
  Missing    (5): fi-kbl-soraka fi-ilk-m540 fi-bsw-cyan fi-ctg-p8600 fi-bdw-samus 


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

  * IGT: IGT_4963 -> IGTPW_2912

  CI_DRM_5990: 59b3d13393721597be4c56e587e079c3acb57d5a @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2912: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2912/
  IGT_4963: 11e10bc575516c56978640fcc697c27f277c660a @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2912/
_______________________________________________
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: failure for series starting with [i-g-t,v2,1/1] lib: consolidate duplicated define of vfs_file_max(void)
  2019-04-24 15:31 [igt-dev] [PATCH i-g-t v2 1/1] lib: consolidate duplicated define of vfs_file_max(void) Caz Yokoyama
  2019-04-24 18:37 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v2,1/1] " Patchwork
@ 2019-04-25  4:16 ` Patchwork
  2019-04-25  9:32 ` [igt-dev] [PATCH i-g-t v2 1/1] " Petri Latvala
  2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2019-04-25  4:16 UTC (permalink / raw)
  To: Caz Yokoyama; +Cc: igt-dev

== Series Details ==

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

== Summary ==

CI Bug Log - changes from CI_DRM_5990_full -> IGTPW_2912_full
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with IGTPW_2912_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_2912_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

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

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in IGTPW_2912_full:

### IGT changes ###

#### Possible regressions ####

  * igt@kms_color@pipe-c-ctm-max:
    - shard-kbl:          [PASS][1] -> [FAIL][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5990/shard-kbl3/igt@kms_color@pipe-c-ctm-max.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2912/shard-kbl7/igt@kms_color@pipe-c-ctm-max.html
    - shard-apl:          [PASS][3] -> [FAIL][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5990/shard-apl8/igt@kms_color@pipe-c-ctm-max.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2912/shard-apl1/igt@kms_color@pipe-c-ctm-max.html

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

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

### IGT changes ###

#### Issues hit ####

  * igt@i915_suspend@debugfs-reader:
    - shard-apl:          [PASS][5] -> [DMESG-WARN][6] ([fdo#108566]) +5 similar issues
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5990/shard-apl8/igt@i915_suspend@debugfs-reader.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2912/shard-apl6/igt@i915_suspend@debugfs-reader.html

  * igt@kms_color@pipe-c-ctm-max:
    - shard-glk:          [PASS][7] -> [FAIL][8] ([fdo#108147])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5990/shard-glk7/igt@kms_color@pipe-c-ctm-max.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2912/shard-glk4/igt@kms_color@pipe-c-ctm-max.html

  * igt@kms_cursor_crc@cursor-128x128-random:
    - shard-apl:          [PASS][9] -> [FAIL][10] ([fdo#103232]) +1 similar issue
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5990/shard-apl1/igt@kms_cursor_crc@cursor-128x128-random.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2912/shard-apl3/igt@kms_cursor_crc@cursor-128x128-random.html
    - shard-kbl:          [PASS][11] -> [FAIL][12] ([fdo#103232]) +1 similar issue
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5990/shard-kbl7/igt@kms_cursor_crc@cursor-128x128-random.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2912/shard-kbl7/igt@kms_cursor_crc@cursor-128x128-random.html

  * igt@kms_cursor_legacy@2x-long-cursor-vs-flip-atomic:
    - shard-hsw:          [PASS][13] -> [FAIL][14] ([fdo#105767])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5990/shard-hsw5/igt@kms_cursor_legacy@2x-long-cursor-vs-flip-atomic.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2912/shard-hsw6/igt@kms_cursor_legacy@2x-long-cursor-vs-flip-atomic.html

  * igt@kms_flip@basic-flip-vs-dpms:
    - shard-hsw:          [PASS][15] -> [DMESG-WARN][16] ([fdo#102614])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5990/shard-hsw1/igt@kms_flip@basic-flip-vs-dpms.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2912/shard-hsw5/igt@kms_flip@basic-flip-vs-dpms.html

  * igt@kms_frontbuffer_tracking@fbc-1p-pri-indfb-multidraw:
    - shard-iclb:         [PASS][17] -> [FAIL][18] ([fdo#103167]) +1 similar issue
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5990/shard-iclb6/igt@kms_frontbuffer_tracking@fbc-1p-pri-indfb-multidraw.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2912/shard-iclb7/igt@kms_frontbuffer_tracking@fbc-1p-pri-indfb-multidraw.html

  * igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-draw-mmap-gtt:
    - shard-glk:          [PASS][19] -> [FAIL][20] ([fdo#103167]) +2 similar issues
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5990/shard-glk3/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-draw-mmap-gtt.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2912/shard-glk8/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-draw-mmap-gtt.html

  * igt@kms_plane_lowres@pipe-a-tiling-x:
    - shard-iclb:         [PASS][21] -> [FAIL][22] ([fdo#103166])
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5990/shard-iclb2/igt@kms_plane_lowres@pipe-a-tiling-x.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2912/shard-iclb8/igt@kms_plane_lowres@pipe-a-tiling-x.html

  * igt@kms_psr@psr2_sprite_plane_move:
    - shard-iclb:         [PASS][23] -> [SKIP][24] ([fdo#109441]) +4 similar issues
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5990/shard-iclb2/igt@kms_psr@psr2_sprite_plane_move.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2912/shard-iclb5/igt@kms_psr@psr2_sprite_plane_move.html

  * igt@kms_setmode@basic:
    - shard-apl:          [PASS][25] -> [FAIL][26] ([fdo#99912])
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5990/shard-apl6/igt@kms_setmode@basic.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2912/shard-apl2/igt@kms_setmode@basic.html
    - shard-iclb:         [PASS][27] -> [FAIL][28] ([fdo#99912])
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5990/shard-iclb5/igt@kms_setmode@basic.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2912/shard-iclb3/igt@kms_setmode@basic.html

  
#### Possible fixes ####

  * igt@gem_workarounds@suspend-resume:
    - shard-apl:          [DMESG-WARN][29] ([fdo#108566]) -> [PASS][30] +5 similar issues
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5990/shard-apl1/igt@gem_workarounds@suspend-resume.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2912/shard-apl5/igt@gem_workarounds@suspend-resume.html

  * igt@i915_pm_rpm@i2c:
    - shard-iclb:         [DMESG-WARN][31] ([fdo#109982]) -> [PASS][32]
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5990/shard-iclb2/igt@i915_pm_rpm@i2c.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2912/shard-iclb7/igt@i915_pm_rpm@i2c.html

  * igt@kms_atomic_transition@plane-all-transition-nonblocking-fencing:
    - shard-iclb:         [INCOMPLETE][33] ([fdo#107713]) -> [PASS][34]
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5990/shard-iclb1/igt@kms_atomic_transition@plane-all-transition-nonblocking-fencing.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2912/shard-iclb2/igt@kms_atomic_transition@plane-all-transition-nonblocking-fencing.html

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-blt:
    - shard-iclb:         [FAIL][35] ([fdo#103167]) -> [PASS][36] +7 similar issues
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5990/shard-iclb2/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-blt.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2912/shard-iclb5/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-blt.html

  * igt@kms_frontbuffer_tracking@fbc-suspend:
    - shard-kbl:          [INCOMPLETE][37] ([fdo#103665]) -> [PASS][38]
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5990/shard-kbl2/igt@kms_frontbuffer_tracking@fbc-suspend.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2912/shard-kbl6/igt@kms_frontbuffer_tracking@fbc-suspend.html

  * igt@kms_plane_lowres@pipe-a-tiling-y:
    - shard-iclb:         [FAIL][39] ([fdo#103166]) -> [PASS][40]
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5990/shard-iclb6/igt@kms_plane_lowres@pipe-a-tiling-y.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2912/shard-iclb8/igt@kms_plane_lowres@pipe-a-tiling-y.html

  * igt@kms_psr@psr2_primary_page_flip:
    - shard-iclb:         [SKIP][41] ([fdo#109441]) -> [PASS][42] +1 similar issue
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5990/shard-iclb8/igt@kms_psr@psr2_primary_page_flip.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2912/shard-iclb2/igt@kms_psr@psr2_primary_page_flip.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#102614]: https://bugs.freedesktop.org/show_bug.cgi?id=102614
  [fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
  [fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
  [fdo#105767]: https://bugs.freedesktop.org/show_bug.cgi?id=105767
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#108147]: https://bugs.freedesktop.org/show_bug.cgi?id=108147
  [fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#109982]: https://bugs.freedesktop.org/show_bug.cgi?id=109982
  [fdo#110499]: https://bugs.freedesktop.org/show_bug.cgi?id=110499
  [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_4963 -> IGTPW_2912
  * Piglit: piglit_4509 -> None

  CI_DRM_5990: 59b3d13393721597be4c56e587e079c3acb57d5a @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2912: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2912/
  IGT_4963: 11e10bc575516c56978640fcc697c27f277c660a @ 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_2912/
_______________________________________________
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 v2 1/1] lib: consolidate duplicated define of vfs_file_max(void)
  2019-04-24 15:31 [igt-dev] [PATCH i-g-t v2 1/1] lib: consolidate duplicated define of vfs_file_max(void) Caz Yokoyama
  2019-04-24 18:37 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v2,1/1] " Patchwork
  2019-04-25  4:16 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
@ 2019-04-25  9:32 ` Petri Latvala
  2019-04-25 17:23   ` Caz Yokoyama
  2 siblings, 1 reply; 5+ messages in thread
From: Petri Latvala @ 2019-04-25  9:32 UTC (permalink / raw)
  To: Caz Yokoyama; +Cc: igt-dev

On Wed, Apr 24, 2019 at 08:31:29AM -0700, Caz Yokoyama wrote:
> Signed-off-by: Caz Yokoyama <caz.yokoyama@intel.com>
> Cc: Petri Latvala <petri.latvala@intel.com>
> ---
>  lib/igt_aux.c               | 21 +++++++++++++++++++++
>  lib/igt_aux.h               |  2 ++
>  lib/intel_os.c              | 14 --------------
>  tests/i915/gem_exec_reuse.c | 14 +-------------
>  4 files changed, 24 insertions(+), 27 deletions(-)
> 
> diff --git a/lib/igt_aux.c b/lib/igt_aux.c
> index 05528352..6516a6d6 100644
> --- a/lib/igt_aux.c
> +++ b/lib/igt_aux.c
> @@ -1615,3 +1615,24 @@ 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
> + *
> + * By reading /proc/sys/fs/file-max, it returns maximum number of files kernel
> + * allows to have at the same time. It may returns 80000 or assert failure
> + * on error.
> + */

The documentation comment block needs to begin with  /**  (two asterisks).

Use the Returns: keyword to describe the return value semantics.

A wording change suggestion:

/**
 * vfs_file_max: get system-wide limit of open 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.
 */


to better emphasise that it's the system-wide max, not nr_open. A
distinction that has already bitten us.

What do you think?


(When is there ever a case when the file can be opened but reading
fails?)



-- 
Petri Latvala
_______________________________________________
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 v2 1/1] lib: consolidate duplicated define of vfs_file_max(void)
  2019-04-25  9:32 ` [igt-dev] [PATCH i-g-t v2 1/1] " Petri Latvala
@ 2019-04-25 17:23   ` Caz Yokoyama
  0 siblings, 0 replies; 5+ messages in thread
From: Caz Yokoyama @ 2019-04-25 17:23 UTC (permalink / raw)
  To: Petri Latvala; +Cc: igt-dev

Your wordings are fine. I'll submit v3 with your wordings.
-caz

On Thu, 2019-04-25 at 12:32 +0300, Petri Latvala wrote:
>  * 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.

_______________________________________________
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-25 17:23 UTC | newest]

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

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