All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] igt_command_line.sh: Abort if run as root
@ 2019-02-12 13:53 Arkadiusz Hiler via igt-dev
  2019-02-12 14:14 ` Daniel Vetter
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Arkadiusz Hiler via igt-dev @ 2019-02-12 13:53 UTC (permalink / raw)
  To: igt-dev; +Cc: Petri Latvala

`ninja test` invokes igt_command_line.sh for each test binary to check
the behavior of some of the switches. One of the verified things is that
the test exists with non-zero status when requesting invalid subtest.

`--run-subtest` results in igt_fixtures being executed - this fiddles
with the device and sysfs knobs.

Let's exit early, if we are root, to save people form unintentional
side-effects and strange failures.

Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Andi Shyti <andi.shyti@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
 tests/igt_command_line.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/igt_command_line.sh b/tests/igt_command_line.sh
index e05ec34c..408d965f 100755
--- a/tests/igt_command_line.sh
+++ b/tests/igt_command_line.sh
@@ -100,6 +100,10 @@ check_test ()
 	./$test --run-subtest invalid-subtest > /dev/null 2>&1 && fail $test
 }
 
+if [ "$EUID" -eq 0 ]; then
+    fail "Don't run $0 as root. It executes igt_fixture blocks."
+fi
+
 TESTLISTFILE="$tests_dir/test-list.txt"
 if [ ! -r "$TESTLISTFILE" ]; then
 	tests_dir="tests"
-- 
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] 5+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] igt_command_line.sh: Abort if run as root
  2019-02-12 13:53 [igt-dev] [PATCH i-g-t] igt_command_line.sh: Abort if run as root Arkadiusz Hiler via igt-dev
@ 2019-02-12 14:14 ` Daniel Vetter
  2019-02-12 14:37 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Daniel Vetter @ 2019-02-12 14:14 UTC (permalink / raw)
  To: Arkadiusz Hiler; +Cc: igt-dev, Petri Latvala

On Tue, Feb 12, 2019 at 03:53:17PM +0200, Arkadiusz Hiler via igt-dev wrote:
> `ninja test` invokes igt_command_line.sh for each test binary to check
> the behavior of some of the switches. One of the verified things is that
> the test exists with non-zero status when requesting invalid subtest.
> 
> `--run-subtest` results in igt_fixtures being executed - this fiddles
> with the device and sysfs knobs.
> 
> Let's exit early, if we are root, to save people form unintentional
> side-effects and strange failures.
> 
> Cc: Petri Latvala <petri.latvala@intel.com>
> Cc: Andi Shyti <andi.shyti@intel.com>
> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
> ---
>  tests/igt_command_line.sh | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/tests/igt_command_line.sh b/tests/igt_command_line.sh
> index e05ec34c..408d965f 100755
> --- a/tests/igt_command_line.sh
> +++ b/tests/igt_command_line.sh
> @@ -100,6 +100,10 @@ check_test ()
>  	./$test --run-subtest invalid-subtest > /dev/null 2>&1 && fail $test
>  }
>  
> +if [ "$EUID" -eq 0 ]; then
> +    fail "Don't run $0 as root. It executes igt_fixture blocks."

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> +fi
> +
>  TESTLISTFILE="$tests_dir/test-list.txt"
>  if [ ! -r "$TESTLISTFILE" ]; then
>  	tests_dir="tests"
> -- 
> 2.20.1
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
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.BAT: success for igt_command_line.sh: Abort if run as root
  2019-02-12 13:53 [igt-dev] [PATCH i-g-t] igt_command_line.sh: Abort if run as root Arkadiusz Hiler via igt-dev
  2019-02-12 14:14 ` Daniel Vetter
@ 2019-02-12 14:37 ` Patchwork
  2019-02-12 16:58 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  2019-02-12 23:58 ` [igt-dev] [PATCH i-g-t] " Andi Shyti via igt-dev
  3 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2019-02-12 14:37 UTC (permalink / raw)
  To: Arkadiusz Hiler via igt-dev; +Cc: igt-dev

== Series Details ==

Series: igt_command_line.sh: Abort if run as root
URL   : https://patchwork.freedesktop.org/series/56539/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5592 -> IGTPW_2381
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

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

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

### IGT changes ###

#### Possible fixes ####

  * igt@kms_busy@basic-flip-a:
    - fi-gdg-551:         FAIL [fdo#103182] -> PASS

  * igt@kms_pipe_crc_basic@read-crc-pipe-b:
    - fi-byt-clapper:     FAIL [fdo#107362] -> PASS

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

  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103182]: https://bugs.freedesktop.org/show_bug.cgi?id=103182
  [fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
  [fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
  [fdo#109226]: https://bugs.freedesktop.org/show_bug.cgi?id=109226
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278


Participating hosts (46 -> 37)
------------------------------

  Additional (1): fi-pnv-d510 
  Missing    (10): fi-kbl-soraka fi-hsw-4770r fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-apl-guc fi-ctg-p8600 fi-glk-j4005 fi-bdw-samus 


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

    * IGT: IGT_4818 -> IGTPW_2381

  CI_DRM_5592: 21b5bf210fc5659e3d5eda86727e689ebda26e29 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2381: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2381/
  IGT_4818: ed32029e6a630d9322bd544b626eea38b4785e68 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2381/
_______________________________________________
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 igt_command_line.sh: Abort if run as root
  2019-02-12 13:53 [igt-dev] [PATCH i-g-t] igt_command_line.sh: Abort if run as root Arkadiusz Hiler via igt-dev
  2019-02-12 14:14 ` Daniel Vetter
  2019-02-12 14:37 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
@ 2019-02-12 16:58 ` Patchwork
  2019-02-12 23:58 ` [igt-dev] [PATCH i-g-t] " Andi Shyti via igt-dev
  3 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2019-02-12 16:58 UTC (permalink / raw)
  To: Arkadiusz Hiler via igt-dev; +Cc: igt-dev

== Series Details ==

Series: igt_command_line.sh: Abort if run as root
URL   : https://patchwork.freedesktop.org/series/56539/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5592_full -> IGTPW_2381_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

  * igt@kms_busy@extended-modeset-hang-newfb-render-a:
    - shard-kbl:          NOTRUN -> DMESG-WARN [fdo#107956]

  * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b:
    - shard-snb:          NOTRUN -> DMESG-WARN [fdo#107956] +1

  * igt@kms_content_protection@legacy:
    - shard-kbl:          NOTRUN -> FAIL [fdo#108597]

  * igt@kms_cursor_crc@cursor-128x42-random:
    - shard-apl:          PASS -> FAIL [fdo#103232] +4

  * igt@kms_cursor_crc@cursor-256x256-onscreen:
    - shard-kbl:          PASS -> FAIL [fdo#103232] +1

  * igt@kms_flip@flip-vs-expired-vblank:
    - shard-glk:          PASS -> FAIL [fdo#102887] / [fdo#105363]

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-render:
    - shard-apl:          PASS -> FAIL [fdo#103167] +1

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-move:
    - shard-kbl:          PASS -> FAIL [fdo#103167]

  * igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-mmap-cpu:
    - shard-glk:          PASS -> FAIL [fdo#103167] +5

  * igt@kms_plane_alpha_blend@pipe-a-alpha-opaque-fb:
    - shard-apl:          NOTRUN -> FAIL [fdo#108145]
    - shard-kbl:          NOTRUN -> FAIL [fdo#108145]

  * igt@kms_plane_alpha_blend@pipe-b-alpha-basic:
    - shard-kbl:          NOTRUN -> FAIL [fdo#108145] / [fdo#108590]

  * igt@kms_plane_multiple@atomic-pipe-a-tiling-y:
    - shard-apl:          PASS -> FAIL [fdo#103166] +1
    - shard-kbl:          PASS -> FAIL [fdo#103166]

  * igt@kms_plane_multiple@atomic-pipe-c-tiling-none:
    - shard-glk:          PASS -> FAIL [fdo#103166] +3

  
#### Possible fixes ####

  * igt@gem_eio@in-flight-suspend:
    - shard-snb:          FAIL [fdo#103375] -> PASS

  * igt@gem_mmap_gtt@hang:
    - shard-snb:          INCOMPLETE [fdo#105411] / [fdo#109605 ] -> PASS
    - shard-apl:          INCOMPLETE [fdo#103927] / [fdo#109605 ] -> PASS

  * igt@gem_workarounds@suspend-resume-context:
    - shard-kbl:          INCOMPLETE [fdo#103665] -> PASS

  * igt@kms_cursor_crc@cursor-128x128-suspend:
    - shard-apl:          FAIL [fdo#103191] / [fdo#103232] -> PASS

  * igt@kms_cursor_crc@cursor-256x85-random:
    - shard-apl:          FAIL [fdo#103232] -> PASS +4

  * igt@kms_cursor_crc@cursor-64x64-onscreen:
    - shard-kbl:          FAIL [fdo#103232] -> PASS +2

  * igt@kms_cursor_crc@cursor-alpha-opaque:
    - shard-kbl:          FAIL [fdo#109350] -> PASS
    - shard-apl:          FAIL [fdo#109350] -> PASS
    - shard-glk:          FAIL [fdo#109350] -> PASS

  * igt@kms_flip@dpms-vs-vblank-race:
    - shard-apl:          FAIL [fdo#103060] -> PASS

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-cpu:
    - shard-apl:          FAIL [fdo#103167] -> PASS

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite:
    - shard-kbl:          FAIL [fdo#103167] -> PASS

  * igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-onoff:
    - shard-glk:          FAIL [fdo#103167] -> PASS +4

  * igt@kms_plane@plane-position-covered-pipe-c-planes:
    - shard-apl:          FAIL [fdo#103166] -> PASS +2

  * igt@kms_plane_multiple@atomic-pipe-b-tiling-y:
    - shard-glk:          FAIL [fdo#103166] -> PASS +2
    - shard-kbl:          FAIL [fdo#103166] -> PASS +1

  * igt@kms_setmode@basic:
    - shard-apl:          FAIL [fdo#99912] -> PASS

  
#### Warnings ####

  * igt@kms_chamelium@dp-hpd-storm-disable:
    - shard-apl:          {SKIP} [fdo#109271] -> INCOMPLETE [fdo#103927]

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

  [fdo#102887]: https://bugs.freedesktop.org/show_bug.cgi?id=102887
  [fdo#103060]: https://bugs.freedesktop.org/show_bug.cgi?id=103060
  [fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
  [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
  [fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
  [fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
  [fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
  [fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#108590]: https://bugs.freedesktop.org/show_bug.cgi?id=108590
  [fdo#108597]: https://bugs.freedesktop.org/show_bug.cgi?id=108597
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109350]: https://bugs.freedesktop.org/show_bug.cgi?id=109350
  [fdo#109605 ]: https://bugs.freedesktop.org/show_bug.cgi?id=109605 
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912


Participating hosts (7 -> 5)
------------------------------

  Missing    (2): shard-skl shard-iclb 


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

    * IGT: IGT_4818 -> IGTPW_2381
    * Piglit: piglit_4509 -> None

  CI_DRM_5592: 21b5bf210fc5659e3d5eda86727e689ebda26e29 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2381: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2381/
  IGT_4818: ed32029e6a630d9322bd544b626eea38b4785e68 @ 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_2381/
_______________________________________________
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] igt_command_line.sh: Abort if run as root
  2019-02-12 13:53 [igt-dev] [PATCH i-g-t] igt_command_line.sh: Abort if run as root Arkadiusz Hiler via igt-dev
                   ` (2 preceding siblings ...)
  2019-02-12 16:58 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2019-02-12 23:58 ` Andi Shyti via igt-dev
  3 siblings, 0 replies; 5+ messages in thread
From: Andi Shyti via igt-dev @ 2019-02-12 23:58 UTC (permalink / raw)
  To: Arkadiusz Hiler; +Cc: igt-dev, Petri Latvala

Hi Arek,

On Tue, Feb 12, 2019 at 03:53:17PM +0200, Arkadiusz Hiler wrote:
> `ninja test` invokes igt_command_line.sh for each test binary to check
> the behavior of some of the switches. One of the verified things is that
> the test exists with non-zero status when requesting invalid subtest.
> 
> `--run-subtest` results in igt_fixtures being executed - this fiddles
> with the device and sysfs knobs.
> 
> Let's exit early, if we are root, to save people form unintentional
> side-effects and strange failures.
> 
> Cc: Petri Latvala <petri.latvala@intel.com>
> Cc: Andi Shyti <andi.shyti@intel.com>
> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>

Reviewed-by: Andi Shyti <andi.shyti@intel.com>

Thanks,
Andi
_______________________________________________
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-02-12 23:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-12 13:53 [igt-dev] [PATCH i-g-t] igt_command_line.sh: Abort if run as root Arkadiusz Hiler via igt-dev
2019-02-12 14:14 ` Daniel Vetter
2019-02-12 14:37 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-02-12 16:58 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-02-12 23:58 ` [igt-dev] [PATCH i-g-t] " Andi Shyti via igt-dev

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.