Skip to content
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

Detect binaries without xattr support during tests #338

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion encfs/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ static bool processArgs(int argc, char *argv[],
// 'o' : arguments meant for fuse
// 't' : syslog tag
int res =
getopt_long(argc, argv, "HsSfvdmi:o:t:", long_options, &option_index);
getopt_long(argc, argv, "HsSfvdmi:o:t:V", long_options, &option_index);

if (res == -1) break;

Expand Down Expand Up @@ -355,6 +355,9 @@ static bool processArgs(int argc, char *argv[],
case 'V':
// xgroup(usage)
cerr << autosprintf(_("encfs version %s"), VERSION) << endl;
#if defined(HAVE_XATTR)
cerr << "Compiled with : HAVE_XATTR" << endl;
#endif
exit(EXIT_SUCCESS);
break;
case 'H':
Expand Down
5 changes: 5 additions & 0 deletions tests/reverse.t.pl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
# FreeBSD
@binattr = ("lsextattr", "user");
}
if(system("./build/encfs -V 2>&1 | grep -q HAVE_XATTR") != 0)
{
# Workaround for binaries without xattr support so that tests will not fail
@binattr = ("ls", "-l");
}

# Helper function
# Create a new empty working directory
Expand Down