-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CP-47001 Introduce file descriptor testing framework #83
CP-47001 Introduce file descriptor testing framework #83
Commits on Dec 20, 2023
-
[maintenance]: disable implicit transitive deps
Helps catch missing dependencies in dune files. Signed-off-by: Edwin Török <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 956f52d - Browse repository at this point
Copy the full SHA 956f52dView commit details -
CP-47001: [xapi-fdcaps]: dune plumbing for new library
This will be a new library that will provide a more type-safe interface to file descriptor operations. Useful on its own, but also for testing stdext. Minimal dependencies, only Unix (and Alcotest for testing). Signed-off-by: Edwin Török <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b0f9bae - Browse repository at this point
Copy the full SHA b0f9baeView commit details -
CP-47001: [xapi-fd-test]: dune plumbing for a new test framework
This will be a test framework providing QCheck generators and properties for testing file descriptor operations. It will try to generate: * different kinds of file descriptors * actual data written/read on the other end of pipes and socket pairs * different speeds and delays on the other end to find buffering bugs * file descriptors that are >1024 to find bugs with select Signed-off-by: Edwin Török <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 96ab3f4 - Browse repository at this point
Copy the full SHA 96ab3f4View commit details -
CP-47001: [xapi-fdcaps]: add -principal flag
We are going to use type-level constraints a lot. Try to future proof it by using the recommended compiler flag. `ocamlc` says this about `-principal`: > When using labelled arguments and/or polymorphic methods, this flag is required to > ensure future versions of the compiler will be able to infer types correctly, even if internal algorithms change Signed-off-by: Edwin Török <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2ca1c34 - Browse repository at this point
Copy the full SHA 2ca1c34View commit details -
CP-47001: [xapi-fdcaps]: optional coverage support
This is not enabled by default (but bisect-ppx is nevertheless a build-time dependency) Usage: `make coverage` Signed-off-by: Edwin Török <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6a6a2ff - Browse repository at this point
Copy the full SHA 6a6a2ffView commit details -
CP-47001: [xapi-fdcaps]: add properties module and tests
Lightweight wrapper using polymorphic variants to track read, write, and file kind properties on file descriptors. We only track the property at the time the file descriptor was opened. This prevents bugs like accidentally swapping the read and write ends of a pipe, or attempting to run an operation on a file descriptor that would alway s fail (e.g. setting a socket timeout on a pipe) Write tests using cram-style expect tests that the operations we expect to be forbidden by this type system are actually forbidden. The error messages may be compiler version dependent, so only run them on OCaml 4.14.1 for now. Signed-off-by: Edwin Török <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 872f5ed - Browse repository at this point
Copy the full SHA 872f5edView commit details -
CP-47001: [xapi-fdcaps]: add operations module and tests
Use the capabilities module to wrap most Unix operations needed in testing Unixext Add a testsuite that checks that whenever the type says "never" the underlying file descriptor operation would indeed raise an exception. This ensures that the type constraints we declare are actually correct. The checks use unsafe operations that bypass the type layer. Similarly check that operations that are accepted by the type system and marked as "always" in the type succeed. Signed-off-by: Edwin Török <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8cfb5b4 - Browse repository at this point
Copy the full SHA 8cfb5b4View commit details
Commits on Dec 21, 2023
-
CP-47001: [xapi-fdcaps] add sections to Operations documentation
Signed-off-by: Edwin Török <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 270aea6 - Browse repository at this point
Copy the full SHA 270aea6View commit details -
Configuration menu - View commit details
-
Copy full SHA for e54cde2 - Browse repository at this point
Copy the full SHA e54cde2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 831010f - Browse repository at this point
Copy the full SHA 831010fView commit details -
Configuration menu - View commit details
-
Copy full SHA for d2fac79 - Browse repository at this point
Copy the full SHA d2fac79View commit details -
Configuration menu - View commit details
-
Copy full SHA for ab54dc4 - Browse repository at this point
Copy the full SHA ab54dc4View commit details
Commits on Dec 22, 2023
-
CP-47001: [xapi-fdcaps] runtime tests for read-write properties
Signed-off-by: Edwin Török <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7c3ce31 - Browse repository at this point
Copy the full SHA 7c3ce31View commit details -
CP-47001: [xapi-fdcaps-test]: add observations module
It can be used to wrap read or write operations andobserve the data that is transferred, and elapsed time. It also provides 2 functions that create a file of a given kind. We only test UNIX sockets, because socketpair doesn't support TCP sockets on Linux. Signed-off-by: Edwin Török <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a7bb4e9 - Browse repository at this point
Copy the full SHA a7bb4e9View commit details -
CP-47001: [xapi-fdcaps-test]: add generate module
Signed-off-by: Edwin Török <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 20c69ea - Browse repository at this point
Copy the full SHA 20c69eaView commit details