clang-format
This commit is contained in:
@@ -36,53 +36,42 @@
|
||||
|
||||
#include "test.h"
|
||||
|
||||
static
|
||||
void
|
||||
link_dir(void)
|
||||
{
|
||||
int rv;
|
||||
static void link_dir(void) {
|
||||
int rv;
|
||||
|
||||
report_begin("hard link of .");
|
||||
rv = link(".", TESTDIR);
|
||||
report_check(rv, errno, EINVAL);
|
||||
if (rv==0) {
|
||||
/* this might help recover... maybe */
|
||||
remove(TESTDIR);
|
||||
}
|
||||
report_begin("hard link of .");
|
||||
rv = link(".", TESTDIR);
|
||||
report_check(rv, errno, EINVAL);
|
||||
if (rv == 0) {
|
||||
/* this might help recover... maybe */
|
||||
remove(TESTDIR);
|
||||
}
|
||||
}
|
||||
|
||||
static
|
||||
void
|
||||
link_empty1(void)
|
||||
{
|
||||
int rv;
|
||||
static void link_empty1(void) {
|
||||
int rv;
|
||||
|
||||
report_begin("hard link of empty string");
|
||||
rv = link("", TESTDIR);
|
||||
report_check(rv, errno, EINVAL);
|
||||
report_begin("hard link of empty string");
|
||||
rv = link("", TESTDIR);
|
||||
report_check(rv, errno, EINVAL);
|
||||
}
|
||||
|
||||
static
|
||||
void
|
||||
link_empty2(void)
|
||||
{
|
||||
int rv;
|
||||
static void link_empty2(void) {
|
||||
int rv;
|
||||
|
||||
report_begin("hard link to empty string");
|
||||
if (create_testdir()<0) {
|
||||
/*report_aborted();*/ /* XXX in create_testdir */
|
||||
return;
|
||||
}
|
||||
rv = link(TESTDIR, "");
|
||||
report_check(rv, errno, EINVAL);
|
||||
rmdir(TESTDIR);
|
||||
report_begin("hard link to empty string");
|
||||
if (create_testdir() < 0) {
|
||||
/*report_aborted();*/ /* XXX in create_testdir */
|
||||
return;
|
||||
}
|
||||
rv = link(TESTDIR, "");
|
||||
report_check(rv, errno, EINVAL);
|
||||
rmdir(TESTDIR);
|
||||
}
|
||||
|
||||
void
|
||||
test_link(void)
|
||||
{
|
||||
test_link_paths();
|
||||
link_dir();
|
||||
link_empty1();
|
||||
link_empty2();
|
||||
void test_link(void) {
|
||||
test_link_paths();
|
||||
link_dir();
|
||||
link_empty1();
|
||||
link_empty2();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user