SWDEV-517040 - Prevent segfault in Unit_hiprtc_includepath if can't open saxpy.h
Change-Id: Ie26857fe5dc16c8053b67b145d88588ce209281c
[ROCm/hip-tests commit: bae567a560]
This commit is contained in:
@@ -22,7 +22,7 @@ TEST_CASE("Unit_hiprtc_includepath") {
|
||||
|
||||
string saxpy = "";
|
||||
{
|
||||
fstream f("saxpy.h");
|
||||
fstream f("saxpy.h" , std::ios::in);
|
||||
if (f.is_open()) {
|
||||
size_t sizeFile;
|
||||
f.seekg(0, fstream::end);
|
||||
@@ -32,6 +32,9 @@ TEST_CASE("Unit_hiprtc_includepath") {
|
||||
f.read(&saxpy[0], size);
|
||||
f.close();
|
||||
}
|
||||
else {
|
||||
FAIL("Failed to open saxpy.h. Please ensure the file exists and is accessible.");
|
||||
}
|
||||
}
|
||||
|
||||
hiprtcProgram prog;
|
||||
|
||||
Reference in New Issue
Block a user