Project

General

Profile

Actions

action #178180

closed

Test t/14-grutasks.t fails for me in master branch but apparently not in circleCI

Added by okurz about 2 months ago. Updated 11 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Regressions/Crashes
Target version:
Start date:
2025-03-03
Due date:
% Done:

0%

Estimated time:

Description

Observation

From prove -l t/14-grutasks.t I get

12:23:12] ./t/14-grutasks.t ......................... 24/?
    #   Failed test 'needle temp dir determined as expected'
    #   at ./t/14-grutasks.t line 416.
    #          got: './t/data/openqa/webui/cache/needle-refs'
    #     expected: 't/data/openqa/webui/cache/needle-refs'
    # Looks like you failed 1 test of 3.

#   Failed test 'limit_temp_needle_refs task cleans up temp needle refs exceeding retention'
#   at ./t/14-grutasks.t line 444.
[12:23:12] ./t/14-grutasks.t ......................... 33/?
        #   Failed test '/tmp/14-grutasks.t-fLx1/t/data/openqa/share/factory/iso/test2.iso symlink created'
        #   at ./t/14-grutasks.t line 749.

        #   Failed test '/tmp/14-grutasks.t-fLx1/t/data/openqa/share/factory/iso/test2.iso points to expected destination'
        #   at ./t/14-grutasks.t line 750.
        #          got: '/home/okurz/local/os-autoinst/openQA/t/data/openqa/share/factory/iso/test1.iso'
        #     expected: '/tmp/14-grutasks.t-fLx1/t/data/openqa/share/factory/iso/test1.iso'

        #   Failed test '/tmp/14-grutasks.t-fLx1/t/data/openqa/share/factory/iso/test3.iso symlink created'
        #   at ./t/14-grutasks.t line 749.

        #   Failed test '/tmp/14-grutasks.t-fLx1/t/data/openqa/share/factory/iso/test3.iso points to expected destination'
        #   at ./t/14-grutasks.t line 750.
        #          got: '/home/okurz/local/os-autoinst/openQA/t/data/openqa/share/factory/iso/test1.iso'
        #     expected: '/tmp/14-grutasks.t-fLx1/t/data/openqa/share/factory/iso/test1.iso'
        # Looks like you failed 4 tests of 6.

    #   Failed test 'successful download with multiple destinations and no existing files'
    #   at ./t/14-grutasks.t line 752.

        #   Failed test 'symlink restored'
        #   at ./t/14-grutasks.t line 757.
        #          got: '/home/okurz/local/os-autoinst/openQA/t/data/openqa/share/factory/iso/test1.iso'
        #     expected: '/tmp/14-grutasks.t-fLx1/t/data/openqa/share/factory/iso/test1.iso'
        # Looks like you failed 1 test of 2.

    #   Failed test 'download skipped if only one destination missing'
    #   at ./t/14-grutasks.t line 758.
    # Looks like you failed 2 tests of 29.

#   Failed test 'download assets with correct permissions'
#   at ./t/14-grutasks.t line 766.
[2025-03-03 12:23:19.73987] [2845] [debug] [pid:2845] _carry_over_candidate(99983): _failure_reason=b:failed
# Looks like you failed 2 tests of 40.

which is on commit 41634a22e

Acceptance Criteria

AC1: t/14-grutasks.t uses a /tmp directory for t/data/openqa/webui/cache/needle-refs


Related issues 2 (0 open2 closed)

Copied from openQA Project (public) - action #178177: Test ./t/21-needles.t fails for me in master branch but apparently not in circleCIResolvedtinita2025-03-03

Actions
Copied to openQA Project (public) - action #178207: t: Many leftover t/poolXXXX directories in openQA size:SResolvedgpuliti2025-03-03

Actions
Actions #1

Updated by okurz about 2 months ago

  • Copied from action #178177: Test ./t/21-needles.t fails for me in master branch but apparently not in circleCI added
Actions #2

Updated by tinita about 2 months ago

  • Description updated (diff)

Regarding

12:23:12] ./t/14-grutasks.t ......................... 24/?
    #   Failed test 'needle temp dir determined as expected'
    #   at ./t/14-grutasks.t line 416.
    #          got: './t/data/openqa/webui/cache/needle-refs'
    #     expected: 't/data/openqa/webui/cache/needle-refs'
    # Looks like you failed 1 test of 3.

I can't really explain the error.
You wrote you cleaned up your git repo from some ignored files and then the test passed again, but I'm not sure which removal made this test pass again.
That said, I would vote for moving that to a temp directory under /tmp instead of in our git tree, like I always suggest, and I don't know why in this case it was done this way.
It's just calling for trouble.
(Or at least have just one common temp dir for all tests that can be cleaned up before/after each test.)
So I created AC1.

Actions #3

Updated by tinita about 2 months ago

For the other failure I was able to at least produce an error

touch t/data/openqa/share/factory/iso/test3.iso

before running the test.

t/14-grutasks.t .. 35/? 
        #   Failed test 'download task successed'
        #   at t/14-grutasks.t line 749.
        # STDOUT & STDERR:
        # [2025-03-03 17:17:09.14571] [21147] [info] [#43] Skipping download of "http://127.0.0.1:39305/tests/99926/file/autoinst-log.txt" because file "/tmp/14-grutasks.t-DiLc/t/data/openqa/share/factory/iso/test2.iso" already exists
        # [2025-03-03 17:17:09.14577] [21147] [debug] [#43] Creating symlink "/tmp/14-grutasks.t-DiLc/t/data/openqa/share/factory/iso/test1.iso" to "/tmp/14-grutasks.t-DiLc/t/data/openqa/share/factory/iso/test2.iso"
        # 
        # don't match:
        # (?^u:Download of "/tmp/14-grutasks.t-DiLc/t/data/openqa/share/factory/iso/test1.iso" successful)
        # as expected

I'm not sure how those files under $repo/t/data/openqa/share/factory/iso/ can still be created, because it should now all be in a temp directory (I did this in 98c69a90dcd65a8bfee6cfe38dc50702f31cac7b). Could it be a different test which still writes those files?
It's hard to tell because it could be that those files are only written and not cleaned up if a test fails.
But I will at least run all tests and see if something is still creating those files.

Actions #4

Updated by tinita about 2 months ago

I can reproduce the first error by explicitly setting OPENQA_BASEDIR:

make test EXTRA_PROVE_ARGS="" TESTS=t/14-grutasks.t HEAVY=1 OPENQA_BASEDIR=./t/data
...
t/14-grutasks.t .. 1/? 
    #   Failed test 'needle temp dir determined as expected'
    #   at t/14-grutasks.t line 419.
    #          got: './t/data/openqa/webui/cache/needle-refs'
    #     expected: 't/data/openqa/webui/cache/needle-refs'
    # Looks like you failed 1 test of 3.
Actions #5

Updated by tinita about 2 months ago

  • Copied to action #178207: t: Many leftover t/poolXXXX directories in openQA size:S added
Actions #6

Updated by tinita about 2 months ago

Oh, wait, the first failure is much easier to reproduce:

make test EXTRA_PROVE_ARGS="" TESTS=./t/14-grutasks.t HEAVY=1

Just calling the test with ./ in front. That should at least be something easy to fix, but also it's easy to workaround :D

Actions #7

Updated by okurz about 2 months ago

tinita wrote in #note-6:

Oh, wait, the first failure is much easier to reproduce:

make test EXTRA_PROVE_ARGS="" TESTS=./t/14-grutasks.t HEAVY=1

Just calling the test with ./ in front. That should at least be something easy to fix, but also it's easy to workaround :D

The prefix ./ originally came from me calling prove -l --timer --state=hot,fast,save which does that

Actions #8

Updated by tinita about 2 months ago

https://github.com/os-autoinst/openQA/pull/6254 Improve path handling for needles and OPENQA_BASEDIR

Actions #9

Updated by okurz 11 days ago

  • Status changed from New to Resolved
  • Assignee set to tinita
  • Target version changed from Tools - Next to Ready

that seems to have fixed it. Thx

Actions

Also available in: Atom PDF