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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

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.