@@ -407,6 +407,54 @@ and shared memory pages after starting triton equals to $current_num_pages \n***
407
407
exit 1
408
408
fi
409
409
410
+
411
+ # Test model with non-existent model file
412
+ # The model.py file is intentionally not created to trigger the failure.
413
+ rm -fr ./models
414
+ mkdir -p models/non_existent_model/1
415
+ cp ../python_models/identity_fp32/config.pbtxt ./models/non_existent_model/config.pbtxt
416
+ (cd models/non_existent_model && \
417
+ sed -i " s/^name:.*/name: \" non_existent_model\" /" config.pbtxt)
418
+
419
+ SERVER_LOG=" ./non_existent_model_server.log"
420
+ CLIENT_LOG=" ./non_existent_model_client.log"
421
+ ERROR_MESSAGE_1=" Failed to preinitialize Python stub: Python model file not found in './models/non_existent_model/1/model.py'"
422
+ ERROR_MESSAGE_2=" failed to load 'non_existent_model'"
423
+
424
+ prev_num_pages=` get_shm_pages`
425
+ run_server
426
+ if [ " $SERVER_PID " != " 0" ]; then
427
+ echo -e " *** FAILED: unexpected success starting $SERVER " >> $CLIENT_LOG
428
+ RET=1
429
+ kill_server
430
+ else
431
+ if grep -q " $ERROR_MESSAGE_1 " $SERVER_LOG ; then
432
+ echo -e " Found \" $ERROR_MESSAGE_1 \" " >> $CLIENT_LOG
433
+ else
434
+ echo -e " Not found \" $ERROR_MESSAGE_1 \" in $SERVER_LOG " >> $CLIENT_LOG
435
+ cat $SERVER_LOG >> $CLIENT_LOG
436
+ RET=1
437
+ fi
438
+
439
+ if grep -q " $ERROR_MESSAGE_2 " $SERVER_LOG ; then
440
+ echo -e " Found \" $ERROR_MESSAGE_2 \" " >> $CLIENT_LOG
441
+ else
442
+ echo -e " Not found \" $ERROR_MESSAGE_2 \" in $SERVER_LOG " >> $CLIENT_LOG
443
+ cat $SERVER_LOG >> $CLIENT_LOG
444
+ RET=1
445
+ fi
446
+ fi
447
+
448
+ current_num_pages=` get_shm_pages`
449
+ if [ $current_num_pages -ne $prev_num_pages ]; then
450
+ cat $SERVER_LOG
451
+ ls /dev/shm
452
+ echo -e " \n***\n*** Test Failed. Shared memory pages where not cleaned properly.
453
+ Shared memory pages before starting triton equals to $prev_num_pages
454
+ and shared memory pages after starting triton equals to $current_num_pages \n***"
455
+ exit 1
456
+ fi
457
+
410
458
# Disable env test for Jetson since cloud storage repos are not supported
411
459
# Disable ensemble, io and bls tests for Jetson since GPU Tensors are not supported
412
460
# Disable variants test for Jetson since already built without GPU Tensor support
0 commit comments