Skip to content

Session extras in session listings are shown as numbers instead of strings #3404

@vkarak

Description

@vkarak

When you pass a session extra that looks like a number, e.g. --session-extras x=12.30, ReFrame will show it as a number when listing the information of that session, although it has correctly stored it as a string.

Steps to reproduce

  1. Enable results storage
export RFM_ENABLE_RESULTS_STORAGE=y
  1. Run with --session-extras
reframe -c unittests/resources/checks/frontend_checks.py -n ^PerformanceFailureCheck -r --session-extras x=12.30,y=12.31
  1. View session listing
./bin/reframe --list-stored-sessions=<uuid>
┍━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━┯━━━━━━━┑
│ UUID                                 │ Start time           │ End time             │   Num runs │   Num cases │    x │     y │
┝━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┿━━━━━━━━━━━━━━━━━━━━━━┿━━━━━━━━━━━━━━━━━━━━━━┿━━━━━━━━━━━━┿━━━━━━━━━━━━━┿━━━━━━┿━━━━━━━┥
│ 8d470a9a-505d-490f-a749-ae30aff0cd1f │ 20250226T152854+0100 │ 20250226T152856+0100 │          1 │           1 │ 12.3 │ 12.31 │
┕━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━┙

Note that x's value is listed as 12.3 instead of 12.30.

  1. Queries with string comparison though work as expected:
reframe --list-stored-sessions='?x=="12.30"'
┍━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━┯━━━━━━━┑
│ UUID                                 │ Start time           │ End time             │   Num runs │   Num cases │    x │     y │
┝━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┿━━━━━━━━━━━━━━━━━━━━━━┿━━━━━━━━━━━━━━━━━━━━━━┿━━━━━━━━━━━━┿━━━━━━━━━━━━━┿━━━━━━┿━━━━━━━┥
│ 8d470a9a-505d-490f-a749-ae30aff0cd1f │ 20250226T152854+0100 │ 20250226T152856+0100 │          1 │           1 │ 12.3 │ 12.31 │
┕━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━┙

I think this is due to the default behaviour of tabulate that interprets table cells as numbers if they seem so.

Metadata

Metadata

Assignees

Labels

bugreportingIssues related to reporting and processing the test results

Type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions