X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Ftest%2Fold%2Ftestxattr.cc;fp=src%2Fceph%2Fsrc%2Ftest%2Fold%2Ftestxattr.cc;h=b1ef126dc7d6170fc113771ead916358784ba994;hb=812ff6ca9fcd3e629e49d4328905f33eee8ca3f5;hp=0000000000000000000000000000000000000000;hpb=15280273faafb77777eab341909a3f495cf248d9;p=stor4nfv.git diff --git a/src/ceph/src/test/old/testxattr.cc b/src/ceph/src/test/old/testxattr.cc new file mode 100644 index 0000000..b1ef126 --- /dev/null +++ b/src/ceph/src/test/old/testxattr.cc @@ -0,0 +1,29 @@ + +#include +using namespace std; + + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int main(int argc, char**argv) +{ + int a = 1; + int b = 2; + + mknod("test", 0600, 0); + + cout << "setxattr " << setxattr("test", "asdf", &a, sizeof(a), 0) << endl; + cout << "errno " << errno << " " << strerror(errno) << endl; + cout << "getxattr " << getxattr("test", "asdf", &b, sizeof(b)) << endl; + cout << "errno " << errno << " " << strerror(errno) << endl; + cout << "a is " << a << " and b is " << b << endl; + return 0; +}