Page MenuHomeSoftware Heritage

Fix tests of special devices.
ClosedPublic

Authored by vlorentz on Feb 21 2020, 3:57 PM.

Details

Summary

Regular files were created, as the 'mode' argument of os.mknod was missing.
However, creating devices requires root; so we can't reasonably do that in
tests.

Instead, we're using /dev/null instead of creating one.
And while we're at it, let's also use /dev/zero (which, if not handled
properly, will result in an infinite read).

Diff Detail

Repository
rDMOD Data model
Branch
test-special-devices
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 10724
Build 16089: tox-on-jenkinsJenkins
Build 16088: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Feb 21 2020, 4:00 PM
olasd requested changes to this revision.Feb 21 2020, 4:01 PM

All the data=data and check_data=data args should stay... for now.

This revision now requires changes to proceed.Feb 21 2020, 4:01 PM
This revision is now accepted and ready to land.Feb 21 2020, 4:14 PM
This revision was automatically updated to reflect the committed changes.