marcpage / libernet Goto Github PK
View Code? Open in Web Editor NEWTool to share unused disk space
Tool to share unused disk space
There are several TODO or @todo tags in the source. These should be moved to github issues.
Currently SymmetricEncrypt and Hash use macOS specific API and can use the openssl API and both can be tested on macOS. AsymmetricEncrypt should also have macOS APIs available and should be the default and would allow for code to work without openssl and cross-test between openssl and macOS APIs
In tests/HTTP_test.cpp add code that exercises a URL query that has a name, but no value:
http://my.url.com/test.html?name
http://my.url.com/test.html?name=
http://my.url.com/test.html?name=value&nombre
http://my.url.com/test.html?name=value&nombre=
Path should have methods to read and change the read/write/execute for user/group/everyone for a file (chmod).
FAILED: Exception: OpenSSL Error (EVP_CipherFinal_ex(context, outBuffer, &bytesWritten)): error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt File: ../os/SymmetricEncrypt.h Line: 216
Steps to reproduce
Versions
Get a stack backtrace apparently doesn't work in the linux environment. We need to figure out how to do this for linux.
Steps to reproduce
In BackTrace.h, remove the APPLE conditional around the following code:
#if defined(__APPLE__)
#include <execinfo.h> // not available on Linux?
#define BACKTRACE_AVAILABLE 1
#endif
Versions
We can parse the json format with much more certainty instead of interpreting the text output.
https://gcc.gnu.org/onlinedocs/gcc/Invoking-Gcov.html#Invoking-Gcov
In tests/HTTP_test.cpp add code that tests ResponseLine parsing of:
FTP 200 OK
FTP/ 200 OK
FTP/alpha 200 OK
Currently Socket is pretty well tested via tests/SocketServer_test.cpp. However it does not test:
size_t Socket::sendTo(const Address &,const std::string &,size_t, size_t, RoutingOptions,OutOfBandDataOptions)
I believe this method is only used in UDP transactions. So UDP tests would be the contents of this test file.
Implement the following method:
void copyAttributesTo(const Path&) const;
This will copy permissions, xattr, ACL, etc. whatever is appropriate for the platform.
This class in Address.h is not documented
The DateTime object does not handle mach_absolute_time/mach_timebase_info, add APPLE specific code that handles these types.
Need to add code for the case use_bundles, to test:
Library::Library(const char*)
and pass a bundle basename (ie CoreFoundation.framework, but pass CoreFoundation). Call a function in the framework or bundle.
Also test loading a name that doesn't have a framework or bundle.
Many of these methods will probably be tested with any UDP tests.
int SocketGeneric::descriptor();
void SocketGeneric::setOption(int,bool,int); // UDP will probably test
void SocketGeneric::broadcast(bool); // UDP will probably test
void SocketGeneric::bind(Address&); // UDP will probably test
Port makefile, tests/test.cpp, and code changes to get this up and building and running on Windows.
Create enums to handle oflags and mode or some other mechanism to abstract the system specific mode and oflags.
This method is not tested.
These methods are not tested in the test code
Add code to tests/Library_test.cpp to test the template function name lookup where the name does not exist in the library.
The os module issues that affect us are:
_empty.wait_for can return a value other than timeout. If the while loop iterates again, the timeout should be less. We should measure the time wait_for executes and decrement timeoutInSeconds by that amount. If timeoutInSeconds is less than or equal to zero, then it is a timeout.
Currently we handle SO_BROADCAST, but we should handle more.
There is very little documentation in this file. Document every class, method, and member.
There is very little documentation in this file. Document every class, method, and member.
Current test coverage us through SocketServer_test.cpp. Write a file to specifically test addresses.
Add code to tests/JSON_test.cpp that will insert a value into a json ArrayType.
json::Value myArray(json::ArrayType);
myArray.insert(json::Value() = "2", 0); // 2
myArray.insert(json::Value() = "0", 0); // 0,2
myArray.insert(json::Value() = "1", 1); // 0,1,2
myArray.insert(json::Value() = "3", 3); // 0,1,2,3
dotest(myArray[0] == (json::Value() = "0"));
dotest(myArray[1] == (json::Value() = "1"));
dotest(myArray[2] == (json::Value() = "2"));
dotest(myArray[3] == (json::Value() = "3"));
Add a test to tests/HTTP_test.cpp that tests the const method that returns the info.
const Headers &Message<HeaderLine>::fields() const
Have a plug-in model to allow openssl and platform-specific implementation to coexist and be tested in parallel, like we did with Hash
There are very few doxygen comments. Document every class method and member.
msg::Exception now supports reporting the function. This should be supported by subclasses.
Once there is a test that tests UDP, these methods (bind, listen, accept) todos can be removed.
SocketGeneric would benefit from turning socket signals into exceptions so we can handle error situations.
There is very little documentation in this file. Document every class, method, and member.
The method ignores the outBufferSize parameter and has a cryptic @todo that says "and probably fix". We should make sure we don't overwrite the bounds of the out buffer.
size_t _crypt(int,const void*,const void*,size_t,void *,size_t,const void*)
Similar to io::File read/write integer, using various endians.
template <class Int>
Int MemoryMappedFile::read(off_t &offset, Endian endian) const;
template <class Int>
void write(Int number, off_t &offset, Endian endian);
writes or returns Int of given size at that offset in the file and advances offset to just past the int.
FAIL: Exception not caught: locale::facet::_S_create_c_locale name not valid
I'm hoping this is just a container configuration issue.
I've looked into building and installing musl-locales, but didn't seem to work.
Steps to reproduce
Versions
Code needs to be added to tests/DateTime_test.cpp that tests the following constructor:
DateTime::DateTime(int year, Month month, int day, int hour,CivilianHour ampm, int minutes, double secs,Location location)
When hour == 12 and ampm == AM.
When we are calculating the padding for AddressHistory so that it matches the hash of the address, we are unnecessarily converting from JSON to string every time. We could set the padding to a unique value that is not found elsewhere in the formatted string. We can then just search and replace the unique number with random numbers so we don't have to execute all that code to convert json to string for each iteration.
Maybe remove the typecast? Need to check both macOS and Linux and try different combinations to get rid of the warning.
../libernet/Bundle.h:262:65: warning: type qualifiers ignored on cast result type [-Wignored-qualifiers]
The following constructor currently is not tested in tests/HTTP_test.cpp:
Message<HeaderLine>::Message(const String &headers, String::size_type &after)
Add a test to tests/HTTP_test.cpp that tests the const method that returns the info.
const HeaderLine &Message<HeaderLine>::info() const
Add test code to tests/HTTP_test.cpp that tests the ReponseLine class parsing when there is no end of line character in the string
This may be a docker container configuration issue, or the path may be incorrect. The test may need to change to point to the correct install location for libz.
FAILED: EXCEPTION(libz.dylib:zlibVersion): (found) failed:Unable to open library: /usr/lib/libz.so File: ../os/Library.h Line: 227
Steps to reproduce
Versions
This function is not covered in the test. Verify it works correctly.
The following cast operators are not tested. Add tests the verify they work correctly.
DateTime::operator time_t() const
DateTime::operator timeval() const
DateTime::operator const timespec() const
DateTime::operator double() const
Also add test code for:
timespec &DateTime::value(timespec &ts) const
Call and verify that copyContentsTo works correctly.
const Path &Path::copyContentsTo(const Path&) const
FAILED: Exception: [EINVAL (22): Invalid argument]: ep = ::readdir(dp) File: ../os/Path.h Line: 553
Steps to reproduce
Versions
These two functions are not called in the test code. Make sure they work as expected
There is very little documentation in this file. Document every class, method, and member.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.