Skip to content

tests: Namespace Granularity Controller Attribute support breaks all tests #2993

@NateThornton

Description

@NateThornton

When running any of the nvme tests, a controller that supports Namespace Granularity Attribute will fail in setUp(), with the call chain create_and_validate_ns() -> create-ns(). The create-ns command is run with --verbose option, which will elevate the log level to INFO, and thus the "enforce [nsze|ncap] alignment to %PRIx64 because of namespace granularity requirement" message will print every time. This causes the json parsing to fail.

Here, I print the command and the stdout:

nvme create-ns /dev/nvme0 --nsze=3750748848 --ncap=3750748848 --flbas=0 --dps=0 --verbose --output-format=json
enforce nsze alignment to 200 because of namespace granularity requirements
enforce ncap alignment to 200 because of namespace granularity requirements
{
  "create-ns":"success",
  "nsid":"1"
}

I'd be happy to fix this, but am looking for direction. Couple of solutions:

  1. Drop the --verbose option in nvme_test.py
  2. Only print the "enforce..." strings for normal output in nvme.c

Any preferences?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions