* [igt-dev] [PATCH i-g-t] tests/gem_fd_exhaustion: Remove broken exit handler
@ 2019-04-09 6:46 Arkadiusz Hiler
2019-04-09 7:34 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Arkadiusz Hiler @ 2019-04-09 6:46 UTC (permalink / raw)
To: igt-dev; +Cc: Lucas De Marchi
With the introduction of igt_allow_unlimited_files() the way the
original implementation that set RLIMIT_NOFILE and then restored it got
half-removed.
The new way of setting was used, but the old exit handler was still in place,
resetting the value to uninitialized variable.
Since we seem to not care about restoring the original limit in multiple
other places let's not do that here and instead ponder on doing that
elsewhere.
Fixes: 8bc80862603b ("lib: add igt_allow_unlimited_files()")
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@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] 4+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for tests/gem_fd_exhaustion: Remove broken exit handler
2019-04-09 6:46 [igt-dev] [PATCH i-g-t] tests/gem_fd_exhaustion: Remove broken exit handler Arkadiusz Hiler
@ 2019-04-09 7:34 ` Patchwork
2019-04-09 11:38 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-04-30 17:22 ` [igt-dev] [PATCH i-g-t] " Lucas De Marchi
2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2019-04-09 7:34 UTC (permalink / raw)
To: Arkadiusz Hiler; +Cc: igt-dev
== Series Details ==
Series: tests/gem_fd_exhaustion: Remove broken exit handler
URL : https://patchwork.freedesktop.org/series/59205/
State : success
== Summary ==
CI Bug Log - changes from IGT_4933 -> IGTPW_2823
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/59205/revisions/1/mbox/
Known issues
------------
Here are the changes found in IGTPW_2823 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live_contexts:
- fi-skl-gvtdvm: PASS -> DMESG-FAIL [fdo#110235 ]
* igt@i915_selftest@live_execlists:
- fi-apl-guc: PASS -> INCOMPLETE [fdo#103927] / [fdo#109720]
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
- fi-blb-e6850: PASS -> INCOMPLETE [fdo#107718]
* igt@runner@aborted:
- fi-apl-guc: NOTRUN -> FAIL [fdo#108622] / [fdo#109720]
#### Possible fixes ####
* igt@i915_selftest@live_contexts:
- fi-bdw-gvtdvm: DMESG-FAIL [fdo#110235 ] -> PASS
* igt@i915_selftest@live_evict:
- fi-bsw-kefka: DMESG-WARN [fdo#107709] -> PASS
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#107709]: https://bugs.freedesktop.org/show_bug.cgi?id=107709
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#108622]: https://bugs.freedesktop.org/show_bug.cgi?id=108622
[fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720
[fdo#110235 ]: https://bugs.freedesktop.org/show_bug.cgi?id=110235
Participating hosts (48 -> 44)
------------------------------
Missing (4): fi-kbl-soraka fi-ilk-m540 fi-bsw-cyan fi-hsw-4200u
Build changes
-------------
* IGT: IGT_4933 -> IGTPW_2823
CI_DRM_5892: 48cdcacb0060baa3474a80d68e1ea6829457add9 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2823: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2823/
IGT_4933: fef5706e11dcfc72cc759242842d36e7c8dc5e31 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2823/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 4+ messages in thread
* [igt-dev] ✓ Fi.CI.IGT: success for tests/gem_fd_exhaustion: Remove broken exit handler
2019-04-09 6:46 [igt-dev] [PATCH i-g-t] tests/gem_fd_exhaustion: Remove broken exit handler Arkadiusz Hiler
2019-04-09 7:34 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
@ 2019-04-09 11:38 ` Patchwork
2019-04-30 17:22 ` [igt-dev] [PATCH i-g-t] " Lucas De Marchi
2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2019-04-09 11:38 UTC (permalink / raw)
To: Arkadiusz Hiler; +Cc: igt-dev
== Series Details ==
Series: tests/gem_fd_exhaustion: Remove broken exit handler
URL : https://patchwork.freedesktop.org/series/59205/
State : success
== Summary ==
CI Bug Log - changes from IGT_4933_full -> IGTPW_2823_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/59205/revisions/1/mbox/
Known issues
------------
Here are the changes found in IGTPW_2823_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_mocs_settings@mocs-rc6-blt:
- shard-glk: NOTRUN -> SKIP [fdo#109271] +38
* igt@gem_pwrite@big-cpu-fbr:
- shard-iclb: PASS -> TIMEOUT [fdo#109673] +1
* igt@gem_tiled_swapping@non-threaded:
- shard-snb: PASS -> FAIL [fdo#108686]
* igt@i915_pm_rc6_residency@rc6-accuracy:
- shard-kbl: PASS -> SKIP [fdo#109271]
* igt@i915_suspend@forcewake:
- shard-kbl: PASS -> INCOMPLETE [fdo#103665]
* igt@kms_busy@basic-modeset-f:
- shard-glk: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +3
* igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-d:
- shard-apl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +10
* igt@kms_busy@extended-pageflip-hang-newfb-render-f:
- shard-kbl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +1
* igt@kms_ccs@pipe-c-crc-primary-basic:
- shard-hsw: NOTRUN -> SKIP [fdo#109271] +30
* igt@kms_chamelium@dp-crc-multiple:
- shard-iclb: NOTRUN -> SKIP [fdo#109284]
* igt@kms_content_protection@atomic-dpms:
- shard-kbl: NOTRUN -> FAIL [fdo#110321] / [fdo#110336]
* igt@kms_content_protection@legacy:
- shard-apl: NOTRUN -> FAIL [fdo#110321] / [fdo#110336]
* igt@kms_cursor_legacy@2x-long-nonblocking-modeset-vs-cursor-atomic:
- shard-glk: PASS -> FAIL [fdo#106509] / [fdo#107409]
* igt@kms_cursor_legacy@cursor-vs-flip-atomic-transitions:
- shard-iclb: PASS -> FAIL [fdo#103355] +3
* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-indfb-draw-pwrite:
- shard-glk: PASS -> FAIL [fdo#103167]
* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-blt:
- shard-kbl: NOTRUN -> SKIP [fdo#109271] +40
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render:
- shard-iclb: PASS -> FAIL [fdo#103167] +7
* igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-spr-indfb-draw-pwrite:
- shard-iclb: NOTRUN -> SKIP [fdo#109280] +2
* igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-cur-indfb-move:
- shard-apl: NOTRUN -> SKIP [fdo#109271] +183
* igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-blt:
- shard-iclb: PASS -> FAIL [fdo#105682] / [fdo#109247]
* igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-indfb-draw-pwrite:
- shard-iclb: PASS -> FAIL [fdo#109247] +3
* igt@kms_pipe_b_c_ivb@disable-pipe-b-enable-pipe-c:
- shard-iclb: NOTRUN -> SKIP [fdo#109289]
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-f:
- shard-iclb: NOTRUN -> SKIP [fdo#109278] +1
* igt@kms_plane_alpha_blend@pipe-a-alpha-7efc:
- shard-apl: NOTRUN -> FAIL [fdo#108145] +2
* igt@kms_plane_alpha_blend@pipe-a-alpha-transparant-fb:
- shard-kbl: NOTRUN -> FAIL [fdo#108145]
* igt@kms_plane_alpha_blend@pipe-c-alpha-basic:
- shard-kbl: NOTRUN -> FAIL [fdo#108145] / [fdo#108590]
* igt@kms_plane_scaling@pipe-c-plane-scaling:
- shard-hsw: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +4
* igt@kms_plane_scaling@pipe-c-scaler-with-clipping-clamping:
- shard-iclb: PASS -> INCOMPLETE [fdo#110041]
* igt@kms_psr@no_drrs:
- shard-iclb: PASS -> FAIL [fdo#108341]
* igt@kms_psr@primary_page_flip:
- shard-iclb: PASS -> FAIL [fdo#107383] / [fdo#110215] +1
* igt@kms_psr@psr2_cursor_render:
- shard-iclb: PASS -> SKIP [fdo#109441] +1
* igt@kms_rotation_crc@multiplane-rotation:
- shard-iclb: PASS -> DMESG-WARN [fdo#106885]
* igt@kms_tv_load_detect@load-detect:
- shard-iclb: NOTRUN -> SKIP [fdo#109309]
* igt@kms_vblank@pipe-c-ts-continuation-modeset-hang:
- shard-kbl: PASS -> FAIL [fdo#104894]
* igt@perf_pmu@busy-hang-vcs1:
- shard-iclb: NOTRUN -> SKIP [fdo#109276]
* igt@perf_pmu@rc6-runtime-pm:
- shard-kbl: NOTRUN -> FAIL [fdo#105010]
* igt@prime_nv_api@i915_nv_reimport_twice_check_flink_name:
- shard-iclb: NOTRUN -> SKIP [fdo#109291]
* igt@v3d_get_param@base-params:
- shard-iclb: NOTRUN -> SKIP [fdo#109315]
#### Possible fixes ####
* igt@gem_mmap_gtt@forked-big-copy:
- shard-hsw: INCOMPLETE [fdo#103540] -> PASS
* igt@gem_mmap_gtt@hang:
- shard-iclb: FAIL [fdo#109677] -> PASS
* igt@gem_ppgtt@blt-vs-render-ctx0:
- shard-iclb: INCOMPLETE [fdo#109801] -> PASS +1
* igt@gem_tiled_fence_blits@normal:
- shard-iclb: TIMEOUT [fdo#109673] -> PASS
* igt@kms_cursor_legacy@2x-nonblocking-modeset-vs-cursor-atomic:
- shard-glk: FAIL [fdo#106509] / [fdo#107409] -> PASS
* igt@kms_flip@2x-flip-vs-expired-vblank:
- shard-glk: FAIL [fdo#105363] -> PASS
* igt@kms_frontbuffer_tracking@fbcpsr-1p-offscren-pri-shrfb-draw-mmap-wc:
- shard-iclb: FAIL [fdo#109247] -> PASS +17
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-render:
- shard-iclb: FAIL [fdo#103167] -> PASS +2
* igt@kms_plane_scaling@pipe-c-scaler-with-pixel-format:
- shard-glk: SKIP [fdo#109271] / [fdo#109278] -> PASS
* igt@kms_psr@basic:
- shard-iclb: FAIL [fdo#107383] / [fdo#110215] -> PASS
* igt@kms_psr@psr2_basic:
- shard-iclb: SKIP [fdo#109441] -> PASS +3
* igt@perf@blocking:
- shard-iclb: FAIL [fdo#108587] -> PASS
* igt@tools_test@tools_test:
- shard-snb: SKIP [fdo#109271] -> PASS +1
#### Warnings ####
* igt@gem_tiled_swapping@non-threaded:
- shard-hsw: FAIL [fdo#108686] -> INCOMPLETE [fdo#103540]
* igt@kms_psr@psr2_suspend:
- shard-hsw: INCOMPLETE [fdo#103540] -> SKIP [fdo#109271]
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103355]: https://bugs.freedesktop.org/show_bug.cgi?id=103355
[fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#104894]: https://bugs.freedesktop.org/show_bug.cgi?id=104894
[fdo#105010]: https://bugs.freedesktop.org/show_bug.cgi?id=105010
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#105682]: https://bugs.freedesktop.org/show_bug.cgi?id=105682
[fdo#106509]: https://bugs.freedesktop.org/show_bug.cgi?id=106509
[fdo#106885]: https://bugs.freedesktop.org/show_bug.cgi?id=106885
[fdo#107383]: https://bugs.freedesktop.org/show_bug.cgi?id=107383
[fdo#107409]: https://bugs.freedesktop.org/show_bug.cgi?id=107409
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108341]: https://bugs.freedesktop.org/show_bug.cgi?id=108341
[fdo#108587]: https://bugs.freedesktop.org/show_bug.cgi?id=108587
[fdo#108590]: https://bugs.freedesktop.org/show_bug.cgi?id=108590
[fdo#108686]: https://bugs.freedesktop.org/show_bug.cgi?id=108686
[fdo#109247]: https://bugs.freedesktop.org/show_bug.cgi?id=109247
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
[fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109291]: https://bugs.freedesktop.org/show_bug.cgi?id=109291
[fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109673]: https://bugs.freedesktop.org/show_bug.cgi?id=109673
[fdo#109677]: https://bugs.freedesktop.org/show_bug.cgi?id=109677
[fdo#109801]: https://bugs.freedesktop.org/show_bug.cgi?id=109801
[fdo#110041]: https://bugs.freedesktop.org/show_bug.cgi?id=110041
[fdo#110215]: https://bugs.freedesktop.org/show_bug.cgi?id=110215
[fdo#110321]: https://bugs.freedesktop.org/show_bug.cgi?id=110321
[fdo#110336]: https://bugs.freedesktop.org/show_bug.cgi?id=110336
Participating hosts (7 -> 6)
------------------------------
Missing (1): shard-skl
Build changes
-------------
* IGT: IGT_4933 -> IGTPW_2823
CI_DRM_5892: 48cdcacb0060baa3474a80d68e1ea6829457add9 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2823: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2823/
IGT_4933: fef5706e11dcfc72cc759242842d36e7c8dc5e31 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2823/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [igt-dev] [PATCH i-g-t] tests/gem_fd_exhaustion: Remove broken exit handler
2019-04-09 6:46 [igt-dev] [PATCH i-g-t] tests/gem_fd_exhaustion: Remove broken exit handler Arkadiusz Hiler
2019-04-09 7:34 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-04-09 11:38 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2019-04-30 17:22 ` Lucas De Marchi
2 siblings, 0 replies; 4+ messages in thread
From: Lucas De Marchi @ 2019-04-30 17:22 UTC (permalink / raw)
To: Arkadiusz Hiler; +Cc: igt-dev
On Tue, Apr 09, 2019 at 09:46:58AM +0300, Arkadiusz Hiler wrote:
>With the introduction of igt_allow_unlimited_files() the way the
>original implementation that set RLIMIT_NOFILE and then restored it got
>half-removed.
>
>The new way of setting was used, but the old exit handler was still in place,
>resetting the value to uninitialized variable.
>
>Since we seem to not care about restoring the original limit in multiple
>other places let's not do that here and instead ponder on doing that
>elsewhere.
>
>Fixes: 8bc80862603b ("lib: add igt_allow_unlimited_files()")
>Cc: Lucas De Marchi <lucas.demarchi@intel.com>
>Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
thanks
Lucas De Marchi
>---
> 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 [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-04-30 17:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-09 6:46 [igt-dev] [PATCH i-g-t] tests/gem_fd_exhaustion: Remove broken exit handler Arkadiusz Hiler
2019-04-09 7:34 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-04-09 11:38 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-04-30 17:22 ` [igt-dev] [PATCH i-g-t] " Lucas De Marchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox