HomeFreeBSD

testing: improve python vnet wrapper.

Description

testing: improve python vnet wrapper.

  • Derive jail name from class name and method name, instead of just

method name. This change reduces the chances of different tests
clashing.
Old: 'jail_test_one'. New: 'pytest:TestExampleSimplest:test_one'

  • Simplify vnetX_handler() method signature by skipping obj_map (unused) and pipe. The latter can be accessed as the vnet property.
  • Add send_object() method as a pair to the wait_object inside the VnetTestTemplate class.
  • Add test_id property to the BaseTest method. Previously it was provided only for the VnetTestTemplate class. This change makes the identifier easily accessible for all users.

MFC after: 2 weeks

(cherry picked from commit f63825ff21a3bee2630ea8b0ed27a4583cc4242b)

Details

Provenance
melifaroAuthored on Dec 29 2022, 7:07 PM
Parents
rGf8175ea00f84: netlink: fix test-includes broken by f2c8381fce9b
Branches
Unknown
Tags
Unknown