X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=tests%2Ftest-util.c;h=71a7f21835a915684a497b61de891cb5c1ab4c93;hb=77a922c7e53c3e9a2618d1f1a622bb2442f535b0;hp=56c5b28f0fa70d5a79bb33145c01e15e9bf0f0f1;hpb=8c2296a6d97ffc29c0b253eab084e92a82c198b4;p=openvswitch diff --git a/tests/test-util.c b/tests/test-util.c index 56c5b28f..71a7f218 100644 --- a/tests/test-util.c +++ b/tests/test-util.c @@ -267,6 +267,18 @@ test_bitwise_is_all_zeros(int argc OVS_UNUSED, char *argv[] OVS_UNUSED) } } } + +static void +test_follow_symlinks(int argc, char *argv[]) +{ + int i; + + for (i = 1; i < argc; i++) { + char *target = follow_symlinks(argv[i]); + puts(target); + free(target); + } +} static const struct command commands[] = { {"ctz", 0, 0, test_ctz}, @@ -275,6 +287,7 @@ static const struct command commands[] = { {"bitwise_zero", 0, 0, test_bitwise_zero}, {"bitwise_one", 0, 0, test_bitwise_one}, {"bitwise_is_all_zeros", 0, 0, test_bitwise_is_all_zeros}, + {"follow-symlinks", 1, INT_MAX, test_follow_symlinks}, {NULL, 0, 0, NULL}, };