/**
* @brief manage memory blocks using driver api (negative cases)
*/
-TEST (ne_core_npu_test, manage_mem_tirv_n)
+TEST (ne_core_npu_test, manage_mem_triv_n)
{
int num_devices = DriverAPI::getNumDevices (NPUCOND_TRIV_CONN_SOCIP);
ASSERT_GT (num_devices, 0);
/**
* @brief manage memory blocks using driver api (negative cases)
*/
-TEST (ne_core_npu_test, manage_mem_tirv2_n)
+TEST (ne_core_npu_test, manage_mem_triv2_n)
{
int num_devices = DriverAPI::getNumDevices (NPUCOND_TRIV2_CONN_SOCIP);
ASSERT_GT (num_devices, 0);
input.dbuf_fd = buffer_dmabuf;
input.model_id = model.id;
- EXPECT_EQ (api->runInput (&input), 0);
+ EXPECT_GE (api->runInput (&input), 0);
EXPECT_EQ (api->dealloc (model_dmabuf), 0);
EXPECT_EQ (api->dealloc (buffer_dmabuf), 0);
input.dbuf_fd = buffer_dmabuf;
input.model_id = model.id;
input.num_segments = 1;
+ input.input_mode = INPUT_CPU;
+ input.output_mode = OUTPUT_CPU_INTR;
- EXPECT_EQ (api->runInput (&input), 0);
+ EXPECT_GE (api->runInput (&input), 0);
EXPECT_EQ (api->munmap (buf, size), 0);
EXPECT_EQ (api->dealloc (model_dmabuf), 0);
EXPECT_EQ (api->dealloc (buffer_dmabuf), 0);
input.dbuf_fd = buffer_dmabuf;
input.model_id = model.id;
input.num_segments = 1;
+ input.input_mode = INPUT_CPU;
+ input.output_mode = OUTPUT_CPU_INTR;
return api->runInput (&input);
});
- EXPECT_EQ (f_ret.get(), 0);
+ EXPECT_GE (f_ret.get(), 0);
EXPECT_EQ (api->munmap (buf, size), 0);
EXPECT_EQ (api->dealloc (model_dmabuf), 0);
EXPECT_EQ (api->dealloc (buffer_dmabuf), 0);
ASSERT_GE (model.dbuf_fd, 0);
input.model_id = model.id;
input.num_segments = 1;
+ input.input_mode = INPUT_CPU;
+ input.output_mode = OUTPUT_CPU_INTR;
- EXPECT_EQ (api->runInput (&input), 0);
+ EXPECT_GE (api->runInput (&input), 0);
EXPECT_EQ (api->munmap (buf, size), 0);
EXPECT_EQ (api->dealloc (model.dbuf_fd), 0);
EXPECT_EQ (api->dealloc (buffer_dmabuf), 0);
input.model_id = model.id;
/** failure case: segments information is not properly set */
input.num_segments = 0;
+ input.input_mode = INPUT_CPU;
+ input.output_mode = OUTPUT_CPU_INTR;
EXPECT_EQ (api->runInput (&input), -EINVAL);
EXPECT_EQ (api->dealloc (model_dmabuf), 0);