[
https://issues.apache.org/jira/browse/HDFS-14267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16773343#comment-16773343
]
Sahil Takiar commented on HDFS-14267:
-------------------------------------
Thanks for pushing this [~jojochuang]! I'm not sure if it was a recent change,
but it looks like the native tests are run for Hadoop precommit - the first
patch I posted actually caused some ctest failures - ref this comment by Hadoop
QA. Oddly, the second comment by Hadoop QA does not show any evidence of the
ctest tests being run, perhaps the ctest log output is only displayed if the
tests fail.
> Add test_libhdfs_ops to libhdfs tests, mark libhdfs_read/write.c as examples
> ----------------------------------------------------------------------------
>
> Key: HDFS-14267
> URL: https://issues.apache.org/jira/browse/HDFS-14267
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: libhdfs, native, test
> Reporter: Sahil Takiar
> Assignee: Sahil Takiar
> Priority: Major
> Fix For: 3.3.0
>
> Attachments: HDFS-14267.001.patch, HDFS-14267.002.patch
>
>
> {{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.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]