* [igt-dev] [PATCH i-g-t 1/2] lib/igt_audio: add more assertions
@ 2019-05-23 10:56 Simon Ser
2019-05-23 10:56 ` [igt-dev] [PATCH i-g-t 2/2] lib/igt_audio: use calloc instead of malloc + memset Simon Ser
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Simon Ser @ 2019-05-23 10:56 UTC (permalink / raw)
To: igt-dev
- Make sure an audio signal isn't created with zero channels
- Make sure each channel has at least one frequency when synthesizing
Signed-off-by: Simon Ser <simon.ser@intel.com>
---
lib/igt_audio.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/igt_audio.c b/lib/igt_audio.c
index 376e04ba6ed6..1677dd09c029 100644
--- a/lib/igt_audio.c
+++ b/lib/igt_audio.c
@@ -80,6 +80,7 @@ struct audio_signal *audio_signal_init(int channels, int sampling_rate)
{
struct audio_signal *signal;
+ igt_assert(channels > 0);
igt_assert(channels <= CHANNELS_MAX);
signal = malloc(sizeof(struct audio_signal));
@@ -267,8 +268,10 @@ void audio_signal_fill(struct audio_signal *signal, double *buffer,
memset(buffer, 0, sizeof(double) * signal->channels * samples);
- for (i = 0; i < signal->channels; i++)
+ for (i = 0; i < signal->channels; i++) {
freqs_per_channel[i] = audio_signal_count_freqs(signal, i);
+ igt_assert(freqs_per_channel[i]);
+ }
for (i = 0; i < signal->freqs_count; i++) {
freq = &signal->freqs[i];
--
2.21.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [igt-dev] [PATCH i-g-t 2/2] lib/igt_audio: use calloc instead of malloc + memset
2019-05-23 10:56 [igt-dev] [PATCH i-g-t 1/2] lib/igt_audio: add more assertions Simon Ser
@ 2019-05-23 10:56 ` Simon Ser
2019-05-23 12:34 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib/igt_audio: add more assertions Patchwork
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Simon Ser @ 2019-05-23 10:56 UTC (permalink / raw)
To: igt-dev
This is less error-prone.
Signed-off-by: Simon Ser <simon.ser@intel.com>
---
lib/igt_audio.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/lib/igt_audio.c b/lib/igt_audio.c
index 1677dd09c029..a25288c81819 100644
--- a/lib/igt_audio.c
+++ b/lib/igt_audio.c
@@ -83,12 +83,9 @@ struct audio_signal *audio_signal_init(int channels, int sampling_rate)
igt_assert(channels > 0);
igt_assert(channels <= CHANNELS_MAX);
- signal = malloc(sizeof(struct audio_signal));
- memset(signal, 0, sizeof(struct audio_signal));
-
+ signal = calloc(1, sizeof(struct audio_signal));
signal->sampling_rate = sampling_rate;
signal->channels = channels;
-
return signal;
}
--
2.21.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib/igt_audio: add more assertions
2019-05-23 10:56 [igt-dev] [PATCH i-g-t 1/2] lib/igt_audio: add more assertions Simon Ser
2019-05-23 10:56 ` [igt-dev] [PATCH i-g-t 2/2] lib/igt_audio: use calloc instead of malloc + memset Simon Ser
@ 2019-05-23 12:34 ` Patchwork
2019-05-24 14:19 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-05-27 10:07 ` [igt-dev] [PATCH i-g-t 1/2] " Martin Peres
3 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2019-05-23 12:34 UTC (permalink / raw)
To: Simon Ser; +Cc: igt-dev
== Series Details ==
Series: series starting with [i-g-t,1/2] lib/igt_audio: add more assertions
URL : https://patchwork.freedesktop.org/series/61024/
State : success
== Summary ==
CI Bug Log - changes from IGT_5008 -> IGTPW_3045
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/61024/revisions/1/mbox/
Known issues
------------
Here are the changes found in IGTPW_3045 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_suspend@basic-s3:
- fi-blb-e6850: [PASS][1] -> [INCOMPLETE][2] ([fdo#107718])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5008/fi-blb-e6850/igt@gem_exec_suspend@basic-s3.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3045/fi-blb-e6850/igt@gem_exec_suspend@basic-s3.html
* igt@i915_selftest@live_contexts:
- fi-skl-gvtdvm: [PASS][3] -> [DMESG-FAIL][4] ([fdo#110235])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5008/fi-skl-gvtdvm/igt@i915_selftest@live_contexts.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3045/fi-skl-gvtdvm/igt@i915_selftest@live_contexts.html
* igt@i915_selftest@live_hangcheck:
- fi-skl-iommu: [PASS][5] -> [INCOMPLETE][6] ([fdo#108602] / [fdo#108744])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5008/fi-skl-iommu/igt@i915_selftest@live_hangcheck.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3045/fi-skl-iommu/igt@i915_selftest@live_hangcheck.html
* igt@kms_frontbuffer_tracking@basic:
- fi-hsw-peppy: [PASS][7] -> [DMESG-WARN][8] ([fdo#102614])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5008/fi-hsw-peppy/igt@kms_frontbuffer_tracking@basic.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3045/fi-hsw-peppy/igt@kms_frontbuffer_tracking@basic.html
#### Possible fixes ####
* igt@i915_pm_rpm@module-reload:
- fi-skl-6770hq: [FAIL][9] ([fdo#108511]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5008/fi-skl-6770hq/igt@i915_pm_rpm@module-reload.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3045/fi-skl-6770hq/igt@i915_pm_rpm@module-reload.html
* igt@kms_addfb_basic@unused-pitches:
- {fi-icl-u3}: [DMESG-WARN][11] ([fdo#107724]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5008/fi-icl-u3/igt@kms_addfb_basic@unused-pitches.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3045/fi-icl-u3/igt@kms_addfb_basic@unused-pitches.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#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#108511]: https://bugs.freedesktop.org/show_bug.cgi?id=108511
[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
[fdo#108602]: https://bugs.freedesktop.org/show_bug.cgi?id=108602
[fdo#108744]: https://bugs.freedesktop.org/show_bug.cgi?id=108744
[fdo#110235]: https://bugs.freedesktop.org/show_bug.cgi?id=110235
Participating hosts (53 -> 46)
------------------------------
Missing (7): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-byt-clapper fi-bdw-samus
Build changes
-------------
* IGT: IGT_5008 -> IGTPW_3045
CI_DRM_6129: e5d5516eb302ea0f83ea3d9014385f88ed850d53 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_3045: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3045/
IGT_5008: 29cb27e662948b1d0710e9fdaceb5bb221746ff8 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3045/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 6+ messages in thread
* [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/2] lib/igt_audio: add more assertions
2019-05-23 10:56 [igt-dev] [PATCH i-g-t 1/2] lib/igt_audio: add more assertions Simon Ser
2019-05-23 10:56 ` [igt-dev] [PATCH i-g-t 2/2] lib/igt_audio: use calloc instead of malloc + memset Simon Ser
2019-05-23 12:34 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib/igt_audio: add more assertions Patchwork
@ 2019-05-24 14:19 ` Patchwork
2019-05-27 10:07 ` [igt-dev] [PATCH i-g-t 1/2] " Martin Peres
3 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2019-05-24 14:19 UTC (permalink / raw)
To: Ser, Simon; +Cc: igt-dev
== Series Details ==
Series: series starting with [i-g-t,1/2] lib/igt_audio: add more assertions
URL : https://patchwork.freedesktop.org/series/61024/
State : success
== Summary ==
CI Bug Log - changes from IGT_5008_full -> IGTPW_3045_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/61024/revisions/1/mbox/
Known issues
------------
Here are the changes found in IGTPW_3045_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_workarounds@suspend-resume-context:
- shard-glk: [PASS][1] -> [FAIL][2] ([fdo#103375])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5008/shard-glk3/igt@gem_workarounds@suspend-resume-context.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3045/shard-glk4/igt@gem_workarounds@suspend-resume-context.html
* igt@i915_suspend@fence-restore-untiled:
- shard-apl: [PASS][3] -> [DMESG-WARN][4] ([fdo#108566]) +7 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5008/shard-apl6/igt@i915_suspend@fence-restore-untiled.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3045/shard-apl6/igt@i915_suspend@fence-restore-untiled.html
* igt@kms_cursor_crc@pipe-c-cursor-256x256-sliding:
- shard-apl: [PASS][5] -> [FAIL][6] ([fdo#103232]) +1 similar issue
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5008/shard-apl2/igt@kms_cursor_crc@pipe-c-cursor-256x256-sliding.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3045/shard-apl5/igt@kms_cursor_crc@pipe-c-cursor-256x256-sliding.html
- shard-kbl: [PASS][7] -> [FAIL][8] ([fdo#103232])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5008/shard-kbl7/igt@kms_cursor_crc@pipe-c-cursor-256x256-sliding.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3045/shard-kbl6/igt@kms_cursor_crc@pipe-c-cursor-256x256-sliding.html
* igt@kms_flip@2x-plain-flip-interruptible:
- shard-hsw: [PASS][9] -> [SKIP][10] ([fdo#109271]) +16 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5008/shard-hsw7/igt@kms_flip@2x-plain-flip-interruptible.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3045/shard-hsw5/igt@kms_flip@2x-plain-flip-interruptible.html
* igt@kms_flip@flip-vs-expired-vblank-interruptible:
- shard-glk: [PASS][11] -> [FAIL][12] ([fdo#105363])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5008/shard-glk7/igt@kms_flip@flip-vs-expired-vblank-interruptible.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3045/shard-glk8/igt@kms_flip@flip-vs-expired-vblank-interruptible.html
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-mmap-gtt:
- shard-iclb: [PASS][13] -> [FAIL][14] ([fdo#103167]) +5 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5008/shard-iclb8/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-mmap-gtt.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3045/shard-iclb2/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-mmap-gtt.html
* igt@kms_psr@psr2_primary_mmap_gtt:
- shard-iclb: [PASS][15] -> [SKIP][16] ([fdo#109441]) +1 similar issue
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5008/shard-iclb2/igt@kms_psr@psr2_primary_mmap_gtt.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3045/shard-iclb6/igt@kms_psr@psr2_primary_mmap_gtt.html
#### Possible fixes ####
* igt@gem_eio@reset-stress:
- shard-snb: [FAIL][17] ([fdo#109661]) -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5008/shard-snb5/igt@gem_eio@reset-stress.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3045/shard-snb1/igt@gem_eio@reset-stress.html
* igt@gem_mmap_gtt@forked-medium-copy-xy:
- shard-iclb: [INCOMPLETE][19] ([fdo#107713] / [fdo#109100]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5008/shard-iclb3/igt@gem_mmap_gtt@forked-medium-copy-xy.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3045/shard-iclb1/igt@gem_mmap_gtt@forked-medium-copy-xy.html
* igt@i915_suspend@debugfs-reader:
- shard-apl: [DMESG-WARN][21] ([fdo#108566]) -> [PASS][22] +5 similar issues
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5008/shard-apl3/igt@i915_suspend@debugfs-reader.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3045/shard-apl4/igt@i915_suspend@debugfs-reader.html
* igt@kms_flip@2x-flip-vs-dpms-off-vs-modeset-interruptible:
- shard-hsw: [SKIP][23] ([fdo#109271]) -> [PASS][24] +7 similar issues
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5008/shard-hsw5/igt@kms_flip@2x-flip-vs-dpms-off-vs-modeset-interruptible.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3045/shard-hsw8/igt@kms_flip@2x-flip-vs-dpms-off-vs-modeset-interruptible.html
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-gtt:
- shard-glk: [FAIL][25] ([fdo#103167]) -> [PASS][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5008/shard-glk5/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-gtt.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3045/shard-glk8/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-gtt.html
- shard-apl: [FAIL][27] ([fdo#103167]) -> [PASS][28] +1 similar issue
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5008/shard-apl6/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-gtt.html
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3045/shard-apl4/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-gtt.html
* igt@kms_frontbuffer_tracking@fbc-indfb-scaledprimary:
- shard-kbl: [FAIL][29] ([fdo#103167]) -> [PASS][30] +1 similar issue
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5008/shard-kbl6/igt@kms_frontbuffer_tracking@fbc-indfb-scaledprimary.html
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3045/shard-kbl7/igt@kms_frontbuffer_tracking@fbc-indfb-scaledprimary.html
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-pwrite:
- shard-iclb: [FAIL][31] ([fdo#103167]) -> [PASS][32] +3 similar issues
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5008/shard-iclb2/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-pwrite.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3045/shard-iclb1/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-pwrite.html
* igt@kms_psr@no_drrs:
- shard-iclb: [FAIL][33] ([fdo#108341]) -> [PASS][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5008/shard-iclb1/igt@kms_psr@no_drrs.html
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3045/shard-iclb8/igt@kms_psr@no_drrs.html
* igt@kms_psr@psr2_cursor_render:
- shard-iclb: [SKIP][35] ([fdo#109441]) -> [PASS][36] +1 similar issue
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5008/shard-iclb7/igt@kms_psr@psr2_cursor_render.html
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3045/shard-iclb2/igt@kms_psr@psr2_cursor_render.html
* igt@kms_sysfs_edid_timing:
- shard-iclb: [FAIL][37] ([fdo#100047]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5008/shard-iclb2/igt@kms_sysfs_edid_timing.html
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3045/shard-iclb6/igt@kms_sysfs_edid_timing.html
#### Warnings ####
* igt@gem_mmap_gtt@forked-big-copy-odd:
- shard-iclb: [TIMEOUT][39] ([fdo#109673]) -> [INCOMPLETE][40] ([fdo#107713] / [fdo#109100])
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5008/shard-iclb3/igt@gem_mmap_gtt@forked-big-copy-odd.html
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3045/shard-iclb2/igt@gem_mmap_gtt@forked-big-copy-odd.html
* igt@gem_mmap_gtt@forked-big-copy-xy:
- shard-iclb: [INCOMPLETE][41] ([fdo#107713] / [fdo#109100]) -> [TIMEOUT][42] ([fdo#109673]) +1 similar issue
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5008/shard-iclb1/igt@gem_mmap_gtt@forked-big-copy-xy.html
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3045/shard-iclb3/igt@gem_mmap_gtt@forked-big-copy-xy.html
[fdo#100047]: https://bugs.freedesktop.org/show_bug.cgi?id=100047
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#108341]: https://bugs.freedesktop.org/show_bug.cgi?id=108341
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#109100]: https://bugs.freedesktop.org/show_bug.cgi?id=109100
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109661]: https://bugs.freedesktop.org/show_bug.cgi?id=109661
[fdo#109673]: https://bugs.freedesktop.org/show_bug.cgi?id=109673
Participating hosts (7 -> 6)
------------------------------
Missing (1): shard-skl
Build changes
-------------
* IGT: IGT_5008 -> IGTPW_3045
CI_DRM_6129: e5d5516eb302ea0f83ea3d9014385f88ed850d53 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_3045: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3045/
IGT_5008: 29cb27e662948b1d0710e9fdaceb5bb221746ff8 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3045/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 1/2] lib/igt_audio: add more assertions
2019-05-23 10:56 [igt-dev] [PATCH i-g-t 1/2] lib/igt_audio: add more assertions Simon Ser
` (2 preceding siblings ...)
2019-05-24 14:19 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2019-05-27 10:07 ` Martin Peres
2019-05-27 10:22 ` Ser, Simon
3 siblings, 1 reply; 6+ messages in thread
From: Martin Peres @ 2019-05-27 10:07 UTC (permalink / raw)
To: Simon Ser, igt-dev
On 23/05/2019 13:56, Simon Ser wrote:
> - Make sure an audio signal isn't created with zero channels
> - Make sure each channel has at least one frequency when synthesizing
>
> Signed-off-by: Simon Ser <simon.ser@intel.com>
> ---
> lib/igt_audio.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/lib/igt_audio.c b/lib/igt_audio.c
> index 376e04ba6ed6..1677dd09c029 100644
> --- a/lib/igt_audio.c
> +++ b/lib/igt_audio.c
> @@ -80,6 +80,7 @@ struct audio_signal *audio_signal_init(int channels, int sampling_rate)
> {
> struct audio_signal *signal;
>
> + igt_assert(channels > 0);
> igt_assert(channels <= CHANNELS_MAX);
>
> signal = malloc(sizeof(struct audio_signal));
> @@ -267,8 +268,10 @@ void audio_signal_fill(struct audio_signal *signal, double *buffer,
>
> memset(buffer, 0, sizeof(double) * signal->channels * samples);
>
> - for (i = 0; i < signal->channels; i++)
> + for (i = 0; i < signal->channels; i++) {
> freqs_per_channel[i] = audio_signal_count_freqs(signal, i);
> + igt_assert(freqs_per_channel[i]);
IMO, adding > 0 would be clearer.
With this done, the series is:
Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
> + }
>
> for (i = 0; i < signal->freqs_count; i++) {
> freq = &signal->freqs[i];
>
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 1/2] lib/igt_audio: add more assertions
2019-05-27 10:07 ` [igt-dev] [PATCH i-g-t 1/2] " Martin Peres
@ 2019-05-27 10:22 ` Ser, Simon
0 siblings, 0 replies; 6+ messages in thread
From: Ser, Simon @ 2019-05-27 10:22 UTC (permalink / raw)
To: igt-dev, martin.peres
On Mon, 2019-05-27 at 13:07 +0300, Martin Peres wrote:
>
> On 23/05/2019 13:56, Simon Ser wrote:
> > - Make sure an audio signal isn't created with zero channels
> > - Make sure each channel has at least one frequency when synthesizing
> >
> > Signed-off-by: Simon Ser <simon.ser@intel.com>
> > ---
> > lib/igt_audio.c | 5 ++++-
> > 1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/lib/igt_audio.c b/lib/igt_audio.c
> > index 376e04ba6ed6..1677dd09c029 100644
> > --- a/lib/igt_audio.c
> > +++ b/lib/igt_audio.c
> > @@ -80,6 +80,7 @@ struct audio_signal *audio_signal_init(int channels, int sampling_rate)
> > {
> > struct audio_signal *signal;
> >
> > + igt_assert(channels > 0);
> > igt_assert(channels <= CHANNELS_MAX);
> >
> > signal = malloc(sizeof(struct audio_signal));
> > @@ -267,8 +268,10 @@ void audio_signal_fill(struct audio_signal *signal, double *buffer,
> >
> > memset(buffer, 0, sizeof(double) * signal->channels * samples);
> >
> > - for (i = 0; i < signal->channels; i++)
> > + for (i = 0; i < signal->channels; i++) {
> > freqs_per_channel[i] = audio_signal_count_freqs(signal, i);
> > + igt_assert(freqs_per_channel[i]);
>
> IMO, adding > 0 would be clearer.
Ah. I prefer adding explicit conditions like this too, but I had a
feeling the hardcore computer touchers out there wouldn't like it. :)
Will change it.
> With this done, the series is:
>
> Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
>
> > + }
> >
> > for (i = 0; i < signal->freqs_count; i++) {
> > freq = &signal->freqs[i];
> >
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-05-27 10:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-23 10:56 [igt-dev] [PATCH i-g-t 1/2] lib/igt_audio: add more assertions Simon Ser
2019-05-23 10:56 ` [igt-dev] [PATCH i-g-t 2/2] lib/igt_audio: use calloc instead of malloc + memset Simon Ser
2019-05-23 12:34 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib/igt_audio: add more assertions Patchwork
2019-05-24 14:19 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-05-27 10:07 ` [igt-dev] [PATCH i-g-t 1/2] " Martin Peres
2019-05-27 10:22 ` Ser, Simon
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.