Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tmt-report-result: may need to escape special symbols like colon #3226

Closed
juk opened this issue Sep 19, 2024 · 3 comments · Fixed by #3231
Closed

tmt-report-result: may need to escape special symbols like colon #3226

juk opened this issue Sep 19, 2024 · 3 comments · Fixed by #3231
Assignees
Labels
area | restraint Backward compatibility support for restraint bug Something isn't working priority | must high priority, must be included in the next release step | execute Stuff related to the execute step
Milestone

Comments

@juk
Copy link
Collaborator

juk commented Sep 19, 2024

It seems like tmt-report-result script adds testcase name to log file name.

fileprefix=$(echo "$TESTNAME" | tr / _ | tr ' ' _)

One of my tests has colons in it's testcase names which appear is not expected by some parser.

01:32:49         Command returned '0' (success).
01:32:49         Extract results of '/livepatch/selftests'.
01:32:49         fail:
            mapping values are not allowed in this context
              in "<unicode string>", line 1, column 26
01:32:49     
01:32:49         summary: 0 tests executed

tmt-report-results.yaml

  - name: /1..7 selftests: livepatch: test-callbacks.sh Pass
    result: pass
    log:
      - 1..7_selftests:_livepatch:_test-callbacks.sh_Pass_test-callbacks_result.log
    end-time: "2024-09-14T01:32:26.859726+00:00"
    data-path: /data/guest/default-0/livepatch/selftests-1/data
  - name: /2..7 selftests: livepatch: test-ftrace.sh Pass
    result: pass
    log:
      - 2..7_selftests:_livepatch:_test-ftrace.sh_Pass_test-ftrace_result.log
    end-time: "2024-09-14T01:32:28.841241+00:00"
    data-path: /data/guest/default-0/livepatch/selftests-1/data
  - name: /3..7 selftests: livepatch: test-livepatch.sh Pass
    result: pass
    log:
      - 3..7_selftests:_livepatch:_test-livepatch.sh_Pass_test-livepatch_result.log
    end-time: "2024-09-14T01:32:36.808714+00:00"
    data-path: /data/guest/default-0/livepatch/selftests-1/data
  - name: /4..7 selftests: livepatch: test-shadow-vars.sh Pass
    result: pass
    log:
      - 4..7_selftests:_livepatch:_test-shadow-vars.sh_Pass_test-shadow-vars_result.log
    end-time: "2024-09-14T01:32:36.868439+00:00"
    data-path: /data/guest/default-0/livepatch/selftests-1/data
  - name: /5..7 selftests: livepatch: test-state.sh Pass
    result: pass
    log:
      - 5..7_selftests:_livepatch:_test-state.sh_Pass_test-state_result.log
    end-time: "2024-09-14T01:32:43.781280+00:00"
    data-path: /data/guest/default-0/livepatch/selftests-1/data
  - name: /6..7 selftests: livepatch: test-syscall.sh Pass
    result: pass
    log:
      - 6..7_selftests:_livepatch:_test-syscall.sh_Pass_test-syscall_result.log
    end-time: "2024-09-14T01:32:43.982790+00:00"
    data-path: /data/guest/default-0/livepatch/selftests-1/data
  - name: /7..7 selftests: livepatch: test-sysfs.sh Pass
    result: pass
    log:
      - 7..7_selftests:_livepatch:_test-sysfs.sh_Pass_test-sysfs_result.log
    end-time: "2024-09-14T01:32:47.802114+00:00"
    data-path: /data/guest/default-0/livepatch/selftests-1/data
@happz
Copy link
Collaborator

happz commented Sep 19, 2024

Or use quotes to wrap these free-form fields' values:

  - name: "/1..7 selftests: livepatch: test-callbacks.sh Pass"
    result: pass
    log:
      - "1..7_selftests:_livepatch:_test-callbacks.sh_Pass_test-callbacks_result.log"

@seberm seberm added bug Something isn't working step | execute Stuff related to the execute step area | restraint Backward compatibility support for restraint labels Sep 22, 2024
@seberm seberm added this to the 1.37 milestone Sep 22, 2024
@seberm seberm self-assigned this Sep 23, 2024
@seberm
Copy link
Collaborator

seberm commented Sep 23, 2024

I believe this could be easily fixed by applying #3231 and it could potentially land in the v1.37 release.

CC: @psss

@psss
Copy link
Collaborator

psss commented Sep 23, 2024

I believe this could be easily fixed by applying #3231 and it could potentially land in the v1.37 release.

Yeah, sounds like an easy fix for the regression we introduced recently. Let's get it in!

@psss psss added the priority | must high priority, must be included in the next release label Sep 23, 2024
@psss psss linked a pull request Sep 23, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area | restraint Backward compatibility support for restraint bug Something isn't working priority | must high priority, must be included in the next release step | execute Stuff related to the execute step
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants