Skip to content

Commit

Permalink
odd github behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
stooke committed Oct 12, 2024
1 parent 9fe1466 commit 673269c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/hotspot/gtest/runtime/test_os.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -429,10 +429,16 @@ TEST_VM(os, realpath) {

/* test a non-existant path, but provide an adequate buffer */
errno = 0;
buffer[0] = 0;
returnedBuffer = os::realpath(nosuchpath, buffer, sizeof(nosuchpath) + 3);
/* Returns ENOENT on Linux, 0 on SOME versions of Windows */
#if defined(_WINDOWS)
if (returnedBuffer != nullptr) {
//if (returnedBuffer != buffer) {
prinf("XXXX returnedBuffer = 0x%llx\n", (uint64_t)returnedBuffer);
prinf("XXXX buffer = 0x%llx\n", (uint64_t)returnedBuffer);
prinf("XXXX returnedBuffer = 0x%llx string=%s\n", (uint64_t)returnedBuffer, returnedBuffer);
// }
EXPECT_TRUE(returnedBuffer == buffer);
} else {
EXPECT_TRUE(errno != 0);
Expand Down

0 comments on commit 673269c

Please sign in to comment.