Description
test_libhdfs_ops.c provides test coverage for basic operations against libhdfs, but currently has to be run manually (e.g. mvn install does not run these tests). The goal of this patch is to add test_libhdfs_ops.c to the list of tests that are automatically run for libhdfs.
It looks like test_libhdfs_ops.c was used in conjunction with hadoop-hdfs-project/hadoop-hdfs/src/main/native/tests/test-libhdfs.sh to run some tests against a mini DFS cluster. Now that the NativeMiniDfsCluster exists, it makes more sense to use that rather than rely on an external bash script to start a mini DFS cluster.
The libhdfs-tests directory (which contains test_libhdfs_ops.c) contains two other files: test_libhdfs_read.c and test_libhdfs_write.c. At some point, these files might have been used in conjunction with test-libhdfs.sh to run some tests manually. However, they (1) largely overlap with the test coverage provided by test_libhdfs_ops.c and (2) are not designed to be run as unit tests. Thus I suggest we move these two files into a new folder called libhdfs-examples and use them to further document how users of libhdfs can use the API. We can move test-libhdfs.sh into the examples folder as well given that example files probably require the script to actually work.