adoptium / adoptium/STF

Optimize STF generated paths to keep test paths as short as possible

Open
#95 2 comments 0 reactions 1 assignee Claimed by @Mesbah-Alam View on GitHub
enhancement
Dominant language
Java
Stars
10
Forks
42
Avg merge
3d 8h
Merged PRs (30d)
1

Description

**Background**

Windows platform's MAX_PATH restrictions have sporadically been causing STF based system tests to fail due to generated path lengths > MAX_PATH.

We have already [been shortening](https://github.com/AdoptOpenJDK/openjdk-tests/issues/2109) some system test names as a fix.

However, to avoid such issues in future, we should investigate ways to optimize STF generated paths to keep them as short as possible.

**Possible options to consider:**

1) Timestamp: When STF based system tests are run coupled with TKG, there are two timestamp values added in the test paths-- one from TKG and one from STF (e.g. `F:/Users/jenkins/workspace/Test_openjdk11_j9_sanity.system_x86-64_windows_mixed_cm_Nightly_testList_1/openjdk-tests/\TKG\test_output_16076325439603\MauveSingleInvocationLoadTest_OpenJ9_0/20201210-145632-MauveSingleInvocationLoadTest/generation/generation.st`). Could we remove the STF generated timestamp?
1.1) Pro: It gives us test paths with only one timestamp in TKG runs.
1.2) Con: It violates the STF use-case of running tests locally using [system test make layer](https://github.com/AdoptOpenJDK/openjdk-systemtest/blob/master/openjdk.build/makefile) - when the STF generated timestamp is essential to distinguish between multiple runs of a particular test.

2) STF [appends](https://github.com/AdoptOpenJDK/stf/blob/master/stf.core/scripts/stf.pl#L172) the current tests's name after timestamp. This is useful when STF tests are run locally using the make layer, as we then get generated paths such as `/tmp/stf/20201215-130158-MixedLoadTest/` - which clearly signify which test they belong to. However, when STF is used coupled with TKG (e.g. in Jenkins builds), we are already in a working directory that contains the test name, so the test folder name under that may not need the test name signifier again (e.g., `../MauveSingleInvocationLoadTest_OpenJ9_0/20201210-145632-MauveSingleInvocationLoadTest` - which is unnecessary). Can we simply not append the test name in [stf.pl](https://github.com/AdoptOpenJDK/stf/blob/72199c78b2bddf72df21cb029e765bbf9c39c446/stf.core/scripts/stf.pl#L172) ?
2.1) Pro: This gives us a shorter path in Jenkins runs.
2.2) Con: This means the local run using system test make layer would end up with paths without test name in them (e.g. `/tmp/stf/20201215-130158`).

@llxia @lumpfish

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.