mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-07-26 03:07:24 +00:00
igt/gem_concurrent_blit: Relax maxfiles restrictions
Only fail the dmabuf tests if we cannot prep the system to support "unlimited" fd. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
4e2a785e24
commit
98dcf2f0dc
@ -46,6 +46,7 @@
|
||||
#elif defined(HAVE_SWAPCTL) /* Solaris */
|
||||
#include <sys/swap.h>
|
||||
#endif
|
||||
#include <sys/resource.h>
|
||||
|
||||
#include "intel_io.h"
|
||||
#include "drmtest.h"
|
||||
@ -192,6 +193,16 @@ static uint64_t vfs_file_max(void)
|
||||
return max;
|
||||
}
|
||||
|
||||
static unsigned max_open_files(void)
|
||||
{
|
||||
struct rlimit rlim;
|
||||
|
||||
if (getrlimit(RLIMIT_NOFILE, &rlim))
|
||||
rlim.rlim_cur = 64 << 10;
|
||||
|
||||
return rlim.rlim_cur;
|
||||
}
|
||||
|
||||
/**
|
||||
* intel_require_files:
|
||||
* @count: number of files that will be created
|
||||
@ -200,9 +211,9 @@ static uint64_t vfs_file_max(void)
|
||||
*/
|
||||
void intel_require_files(uint64_t count)
|
||||
{
|
||||
igt_require_f(count < vfs_file_max(),
|
||||
"Estimated that we need %'llu files, but the VFS maximum is only %'llu\n",
|
||||
(long long)count, (long long)vfs_file_max());
|
||||
igt_require_f(count < max_open_files(),
|
||||
"Estimated that we need %'llu files, but the process maximum is only %'llu\n",
|
||||
(long long)count, (long long)max_open_files());
|
||||
}
|
||||
|
||||
int __intel_check_memory(uint64_t count, uint64_t size, unsigned mode,
|
||||
|
@ -1743,7 +1743,7 @@ igt_main
|
||||
all = true;
|
||||
|
||||
igt_fixture {
|
||||
igt_require(allow_unlimited_files());
|
||||
allow_unlimited_files();
|
||||
|
||||
fd = drm_open_driver(DRIVER_INTEL);
|
||||
intel_detect_and_clear_missed_interrupts(fd);
|
||||
|
Loading…
x
Reference in New Issue
Block a user