selftests: net: af_unix: Fix incorrect args in test result msg
authorShuah Khan <skhan@linuxfoundation.org>
Fri, 17 Sep 2021 19:26:14 +0000 (13:26 -0600)
committerDavid S. Miller <davem@davemloft.net>
Sun, 19 Sep 2021 12:15:19 +0000 (13:15 +0100)
commit48514a22333099b93c33ea1c7c97dad3f7a611ce
tree04d08d1a2539359875c7bf7530bc4d18f18a97e3
parent029497e66bdc762e001880e4c85a91f35a54b1e2
selftests: net: af_unix: Fix incorrect args in test result msg

Fix the args to fprintf(). Splitting the message ends up passing
incorrect arg for "sigurg %d" and an extra arg overall. The test
result message ends up incorrect.

test_unix_oob.c: In function ‘main’:
test_unix_oob.c:274:43: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘char *’ [-Wformat=]
  274 |   fprintf(stderr, "Test 3 failed, sigurg %d len %d OOB %c ",
      |                                          ~^
      |                                           |
      |                                           int
      |                                          %s
  275 |   "atmark %d\n", signal_recvd, len, oob, atmark);
      |   ~~~~~~~~~~~~~
      |   |
      |   char *
test_unix_oob.c:274:19: warning: too many arguments for format [-Wformat-extra-args]
  274 |   fprintf(stderr, "Test 3 failed, sigurg %d len %d OOB %c ",

Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/af_unix/test_unix_oob.c