From 50b636d1d8f7f4c5537939354cea4a3a13a18219 Mon Sep 17 00:00:00 2001 From: David Yat Sin Date: Tue, 16 Aug 2022 14:55:38 -0400 Subject: [PATCH] Fix for too many open files in rocrtst Fix for regression in commit: 8a0fe6a83271c0c9297404919a828043aa50eaca When running rocrtstNeg.Queue_Validation_InvalidWorkGroupSize, each time rocrtst::LoadKernelFromObjFile is called, a new CodeObject is created and not deleted until end of the whole test. Each CodeObject keeps an open file descriptor of the kernel file and this can exceed maximum allowed open files on some systems. Deleting the CodeObjects after each iteration in the test. Change-Id: I388e56f95f7b671ecc29d5ecb4eb8ac2d0ddc412 --- rocrtst/suites/negative/queue_validation.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/rocrtst/suites/negative/queue_validation.cc b/rocrtst/suites/negative/queue_validation.cc index 76f3372c62..d88488b9fe 100755 --- a/rocrtst/suites/negative/queue_validation.cc +++ b/rocrtst/suites/negative/queue_validation.cc @@ -577,6 +577,7 @@ void QueueValidation::QueueValidationForInvalidWorkGroupSize(hsa_agent_t cpuAgen hsa_signal_store_relaxed(aql().completion_signal, 1); if (queue[ii]) { hsa_queue_destroy(queue[ii]); } + clear_code_object(); } } sleep(1);