Age | Commit message (Collapse) | Author |
|
Quite often on catastrophic failure the test leaves a long queue of
unterminated batches pending execution. Each runs until hangcheck fires
and skips onto the next, leaving us waiting for a very long time at test
exit.
On older kernels, this gracefully degrades into the existing mechanism.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
|
|
We're missing some set_domain calls around the ggtt mmap paths. This
means we never tell the kernel that we've dirtied the object. And
then at some point down the line the kernel throws the pages into
/dev/null instead of hanging on to them/swapping them out because
they were never marked as dirty.
Throw in the missing set_domains(GTT,GTT) calls and rip out the old
bogus set_domain(CPU,CPU).
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The tests calls igt_debugfs_dir() to open the debugfs dir and further
along calls igt_debugfs_read() each time i915_edp_psr_status needs to be
read. As igt_debugfs_read() opens the directory unnecessarily, switch to
using the newly added igt_debugfs_simple_read()
v2: Commit message typo (Jose)
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
|
|
tests/kms_frontbuffer_tracking and tests/kms_psr read debugfs nodes
several times after opening the directory once. There is already an
implementation of this in the kms_frontbuffer_tracking, moving that
functionality to the library will allow us to share the code with kms_psr
and kms_fbcon_fbt
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
|
|
We report the failure from igt_setup_runtime_pm() so that the caller can
decide how they may proceed, so replace the hard assert with the error
propagation.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
5s is often not enough for the sound module to finish loading, so bump
the timeout to 10s. For fun, poll quicker over the first 1s!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Imre Deak <imre.deak@intel.linux.com>
Reviewed-by: Imre Deak <imre.deak@intel.linux.com>
|
|
Sometimes we may probe the sound module as it is still being registered
and its debugfs not yet fully populated. If we do not find a file we
expect to exist, sleep a little and check again.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107801
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Imre Deak <imre.deak@intel.linux.com>
Reviewed-by: Imre Deak <imre.deak@intel.linux.com>
|
|
It doesn't seem to be preventing rpm (see the pm_rpm tests) if we fail
to enable runtime-powermanagement for audio, so reduce the warning to a
debug. It will still be visible if it fails, but only if it fails.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Imre Deak <imre.deak@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
|
|
We only want to allow driver_open to match an unknown driver if asked for
DRIVER_ANY, so we need to double check.
Fixes: 9e5fa9112546 ("lib/drmtest: Move open device to separate function")
Reported-by: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
I fluked out as vgem was the initial mid value, hiding the worst of the
errors as i915 matched with DRIVER_ANY.
Fixes: 20087bf22698 ("lib: Use a bsearch to find the module name")
Reported-by: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
Even with a small number of known drivers (6), a bsearch will take at
most 3 steps, whereas the linear search will take 3 steps on average. In
the future with more known drivers, the logN bsearch will be even more
advantageous.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Katarzyna Dec <katarzyna.dec@intel.com>
Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
|
|
While working on IGT code and during reviewes I've noticed that
it could be nice to have function that is opening particular device.
Let's move out conditions for opening device and rename __open_device
to __search_and_open() function.
v2: Refactored open_device even more by getting device name once and
returning fd for it. (Chris)
v3: Added name_size to __get_drm_device_name, removed unused is_X_device.
v4: Fixed cases with failing virtio_gpu
v5: Rebase, indent fixes
Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
In a multi-device system there is no guarantee that the fd being probed
in intel_get_drm_devid() is the same as was opened earlier. Any cache
may outlive the fd, so is frought with lifetime issues. The primary
reason for caching the devid was to avoid extra ioctls in the
dmesg/strace, but hopefully all users now grab the id in their fixture
and not inside every function.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Katarzyna Dec <katarzyna.dec@intel.com>
Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
|
|
Currently we wrap our fd inside a FILE* stream to make use of vfprintf,
but the man page leaves the question of errno and signal handling in
doubt. It is documented as returning a negative value and setting
ferror(), but we have been interpreting errno to handle signal
restarting. As that is in doubt, reduce it to a sprintf and reuse our
common interrupt handling write() that already returns -errno.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Katarzyna Dec <katarzyna.dec@intel.com>
Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
|
|
libdw is a new dependency built from the elfutils package. It provides
us a way to generate line numbers and file names from the instruction
pointer.
elfutils is LGPLv3 or GPLv2, so it's ok to link against it.
Before:
IGT-Version: 1.23-g8ae86abd419d (x86_64) (Linux: 4.16.0-1-amd64 x86_64)
Starting subtest: fail-result
(meta_test:29661) CRITICAL: Test assertion failure function test_result, file ../tests/meta_test.c:94:
(meta_test:29661) CRITICAL: Failed assertion: result == 1
(meta_test:29661) CRITICAL: error: 0 != 1
Stack trace:
#0 [__igt_fail_assert+0x20a]
#1 [test_result+0x7a]
#2 [__real_main120+0x240]
#3 [main+0x4a]
#4 (../csu/libc-start.c) __libc_start_main:344
#5 [_start+0x2a]
After:
IGT-Version: 1.23-g8ae86abd419d (x86_64) (Linux: 4.16.0-1-amd64 x86_64)
Starting subtest: fail-result
(meta_test:1357) CRITICAL: Test assertion failure function test_result, file ../tests/meta_test.c:94:
(meta_test:1357) CRITICAL: Failed assertion: result == 1
(meta_test:1357) CRITICAL: error: 0 != 1
Stack trace:
#0 ../lib/igt_core.c:1467 __igt_fail_assert()
#1 ../tests/meta_test.c:95 test_result()
#2 ../tests/meta_test.c:137 __real_main120()
#3 ../tests/meta_test.c:120 main()
#4 ../csu/libc-start.c:344 __libc_start_main()
#5 [_start+0x2a]
Changes since v1:
- Add libdw dependency to readme.
- Change backtrace format slightly.
Cc: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
[mlankhorst: Add description about libdw in commit msg, name -> dwfl_name]
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
It's harmful to write to enable_psr at runtime, and the patch that allows
us to change i915_edp_psr_debug with the panel running will require us
to abandon the module parameter. Hence the userspace change needs to be
put in IGT first before we can change it at kernel time.
Toggling it to debugfs will mean we can skip a modeset when changing our
feature set.
Changes since v1:
- Rebase with the previous patches dropped.
Changes since v2:
- Rebase on top of new api in i915_edp_psr_debug.
Changes since v3:
- Enable IRQ debugging for extra logging.
- Force PSR1 mode. (dhnkrn)
- Move PSR enable/disable functions to lib/igt_psr. (dhnkrn)
Changes since v4:
- Redisable irqs right away when debugfs api doesn't work. (dhnkrn)
- Use hex everywhere. (dhnkrn)
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
[mlankhorst: Fix -ENODEV explanation in has_psr_debugfs (dhnkrn)]
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
|
|
igt_plane_set_prop_enum, v2.
We now have infrastructure for generic enum handling. This will make it easier
to write new tests without defining all enum constants beforehand.
Changes since v1:
- Fix compile error, sent old version by accident.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
This adds the possibility to test arbitrary enumerations in IGT without
having to define mappings for each and every one.
Changes since v1:
- Add commit description.
- Add try_prop_enum, to allow handling unknown enumerations.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
Loading the sounds modules is asynchronous with the sysfs device
hierarchy being instantiated sometime after modprobe returns. As such
while we are probing for the sound device, poll a few times to
accommodate the async discovery.
v2: closedir() after use
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Imre Deak <imre.deak@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
|
|
This reverts commit 2c7224e488457afb7bb76664c4b7c857baef1e08 as it was
accidentally pushed when fixing up the pm_rpm compilation. Oops.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Petri Latvala <petri.latvala@intel.com>
|
|
Halve our estimated available RAM for use by the tests to avoid nasty
situations where the test runner may force us into swap.
Rumour has it that the new runner isn't quite so bloated as piglit...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tomi Sarvela <tomi.p.sarvela@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
|
|
One more CFL ID added to spec.
Align with kernel commit d0e062ebb3a4 ("drm/i915/cfl:
Add a new CFL PCI ID.")
v2: Fixed commit subject per Petri request.
Cc: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
|
|
A pair of igt_pipe_crc_drain() and igt_pipe_crc_get_single() has a bug in which
you're not sure whether the new CRC is captured because the vblank irq may race
against the CRC irq and delivered to userspace too soon.
When receiving a vblank event, igt_pipe_crc_drain() will then drain all crc's,
but not the new (stale) crc, which is then delivered and immediately returned
by igt_pipe_crc_get_single().
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Now crc framework does not wait for first CRC during open, User need
to wait for crc if he wants so.
This patch make changes in igt_pipe_crc_start to make sure we wait
until first crc available after open to keep the tests behaviour same.
Without this if driver is skipping few initial crcs there will be
mismatch in expected and actual number of crcs returned by crc
framework.
Changes Since V1:
- poll instead of read_one_crc (Maarten)
Changes Since V2:
- poll without timeout, we already have igt_timeout (Maarten)
Signed-off-by: Mahesh Kumar <mahesh1.kumar@intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
Since we only use plain ascii in subtest names, using non-locale-aware
tolower() to compare case-insensitively works.
Doing this within uwildmat instead of tolowering the subtest name and
then calling uwildmat() is required, because of selection strings
like:
foo,bar,!Foo
The above line will select subtest Bar, and not select Foo.
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
when instructed via the environment. This is needed for the new test
runner to properly assign stderr output to the correct subtest.
v2:
Print the subtest result from skip_subtests_henceforth handling also
to stderr.
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
In cases when runtime PM is enabled only from individual subtests and not
whole tests it is usable to be able to restore the old runtime PM config
and so avoid running subsequent subtests in an unexpected environment.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
HDA audio device can be present at various PCI paths on different systems
which the existing code did not account for.
Furthermore the failure to enable runtime PM was silent leaving callers
in the dark.
Improve it by auto-locating the PCI path and logging a warning when
something is not as expected.
v2:
* If there is no audio hw/driver there is no failure.
v3:
* Comment.
* Skip non-symlinks.
* Free path on failure and restore.
* Simplify with asprintf. (Chris Wilson)
v4:
* Find snd_hda_intel instance tied with an Intel device.
v5:
* Fix memory leak and silence Valgrind warning.
v6:
* Fix error out logic.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
IGT logging helpers are not signal safe so avoid calling them from exit
handlers.
At the same time refactor the code a bit to enable following patches.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
"overridden" was misspelled as "overriden". Fix it.
Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
|
|
When libc misses memfd_create(), provide a stub implementation to go
through the syscall() route. Syscall numbers are provided for platforms
currently supported by i-g-t only.
v2: add support to autotools
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Antonio Argenziano <antonio.argenziano@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
|
|
Add directory with README file to allow missing syscalls to be defined.
The syscalls themselves will be provided in follow up patches.
v2: add support to autotools
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Antonio Argenziano <antonio.argenziano@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
|
|
edid_override is a i915.ko debugfs feature; just skip any kms test that
depends on being able to override the edid.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107337
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
|
|
The gen4 code was pushed without being fixed up for the constification
of igt_render_copyfunc_t
../lib/intel_batchbuffer.c: In function ‘igt_get_render_copyfunc’:
../lib/intel_batchbuffer.c:837:8: warning: assignment to ‘igt_render_copyfunc_t’ {aka ‘void (*)(struct intel_batchbuffer *, struct _drm_intel_context *, const struct igt_buf *, unsigned int, unsigned int, unsigned int, unsigned int, const struct igt_buf *, unsigned int, unsigned int)’} from incompatible pointer type ‘void (*)(struct intel_batchbuffer *, drm_intel_context *, struct igt_buf *, unsigned int, unsigned int, unsigned int, unsigned int, struct igt_buf *, unsigned int, unsigned int)’ {aka ‘void (*)(struct intel_batchbuffer *, struct _drm_intel_context *, struct igt_buf *, unsigned int, unsigned int, unsigned int, unsigned int, struct igt_buf *, unsigned int, unsigned int)’} [-Wincompatible-pointer-types]
copy = gen4_render_copyfunc;
Fixes: 61370b2d43db ("lib/rendercopy: Add gen4/5 rendercopy")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Only pm_rpm still uses the igt_trash_aperture() and so we can remove it
from the lib and in the process convert it over from the legacy
libdrm_intel.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
|
|
Dropping duplicated definitions of registers,fields
and shiftsm, which were implemented in gen4 and
does not changed in gen6.
v3: Rebase
Signed-off-by: Lukasz Kalamarz <lukasz.kalamarz@intel.com>
Cc: Katarzyna Dec <katarzyna.dec@intel.com>
Cc: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
|
|
Instead of using definitions duplicated in gen7_render header,
we should use the oldest definition that is working with chosen
gen. This patch reuse gen6 definitons if registers/fields/shifts
that were introduced in other genX_render headers.
v3: Rebase and checkpatch
Signed-off-by: Lukasz Kalamarz <lukasz.kalamarz@intel.com>
Cc: Katarzyna Dec <katarzyna.dec@intel.com>
Cc: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
|
|
Add rendercopy implementation for gen4/5. Basic structure
copied from the gen6 implementation, and the gen4/5 specific
bits were mostly lifted from sna.
v2: Renamed registers definitions, which are GEN4 specific
to include that prefix (Lukasz)
v3: Rebase and checkpatch
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Lukasz Kalamarz <lukasz.kalamarz@intel.com>
Cc: Katarzyna Dec <katarzyna.dec@intel.com>
Cc: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
|
|
kms_frontbuffer_tracking and kms_psr test PSR in different ways, let'
fix that by creating common library functions.
v2: Include the new file in meson.build
v3: Leave --no-psr intact (Rodrigo)
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
|
|
An hanging batch is nothing more than a spinning batch that never gets
stopped, so re-use the routines implemented in dummyload.c.
v2: Let caller decide spin loop size
v3: Only use loose loops for hangs (Chris)
v4: No requires
v5: Free the spinner
v6: Chamelium exists.
Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> #v3
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
|
|
Setup a userptr object that only has a read-only mapping back to a file
store (memfd). Then attempt to write into that mapping using the GPU and
assert that those writes do not land (while also writing via a writable
userptr mapping into the same memfd to verify that the GPU is working!)
v2: Pull the random batch construction into a routine to avoid
duplication.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
We use options!=NULL to determine if we should require the module to be
reloaded and fail if we find it already loaded. In pm_rpm, we are only
ensuring the MSR module is loaded, and only want default options.
Fixes: 4dc2ce0e ("lib/kmod: Fail if the module is already loaded")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
|
|
Now that we can use _Static_assert() due to C11, make it future proof so
we remember to update this if IGT_MAX_PIPES changes. Also reduce
verbosity a little bit by calculating indexes instead of if/else chain.
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
Properly check for errors and rename the function since we are checking if we are
running under gdb, not making it run under gdb. Previously we were
passing uninitialized data to basename() due to not properly adding the
nul termination.
==22293== Conditional jump or move depends on uninitialised value(s)
==22293== at 0x4C306D0: rindex (vg_replace_strmem.c:199)
==22293== by 0x4EC55DD: basename (in /usr/lib64/libc-2.27.so)
==22293== by 0x400744: running_under_gdb (in /tmp/a)
There's another problem with this function that it doesn't detect when
we are running gdb from a toolchain using a toolchain triplet, but
that's left for another patch.
v2: remove the fix for repeating the argument on readlink() since that
landed in another patch
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
Note that 'proc_path' parameter in __igt_lsof_fds receives a string
which was initialized with the size of PATH_MAX and the local variable
'path' has the same size, but it also have to append: '/', '\0', and the
directory name. This situation caused the warning described below.
warning: ‘%s’ directive output may be truncated writing up to 255 bytes
into a region of size between 0 and 4095 [-Wformat-truncation=]
snprintf(path, sizeof(path), "%s/%s", proc_path, d->d_name);
note: ‘snprintf’ output between 2 and 4352 bytes into a destination of
size 4096 [..]
This commit fixes this problem by changing the string size passed by
__igt_lsoft to __igt_lsof_fds. The max size for the string is
strlen("/proc/%d/cwd")+1 where "%d" can be estimated with
CEILING(LOG_10(INT_MAX)), in this sense, it is safe to define a path
size of 30 characters.
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
This commit fixes the following GCC warning:
warning: passing argument 2 to restrict-qualified parameter aliases with
argument 1 [-Wrestrict]
return (readlink (buf, buf, sizeof (buf)) != -1 &&
This commit fixes the GCC warning by creating a second buffer only to
keep the path.
v2: make pathname smaller (A. Hiler)
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
Sometimes, we do not want to allow control to escape from the spinner,
e.g. for when we want to hang the GPU inside the batch.
(Split out from the preempt-timeout test case.)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
|
|
If we want to set new module options, we must load the module or die
trying. We may want to always fail if the module if already loaded, but
for now, take the small incremental step and insist that the options are
set if requested.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
As we ordinarily use a spinning batch to trigger a hang, we cannot do so
without execbuf. On the other hand, if we do a manual reset of the
wedged driver, we expect it to remain wedged and for the reset to fail;
failing the test. Even if we remove the igt_assert(!wedged), the test is
suspect as we don't know if the reset took place and so do not know if
the conditions the test is trying to setup apply.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
|