0024-harness-skip-22.p-if-async_poll-isn-t-supported.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. From 79826d55b06a50ef1be2b723fe35a1e534cfbbaa Mon Sep 17 00:00:00 2001
  2. From: Jeff Moyer <jmoyer@redhat.com>
  3. Date: Mon, 29 Jul 2019 14:25:01 -0400
  4. Subject: [PATCH libaio 24/28] harness: skip 22.p if async_poll isn't supported
  5. Use the new skip error code instead of failing the test. Also
  6. add in a Local variables: section for emacs.
  7. Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
  8. ---
  9. harness/cases/22.t | 14 +++++++++++++-
  10. 1 file changed, 13 insertions(+), 1 deletion(-)
  11. diff --git a/harness/cases/22.t b/harness/cases/22.t
  12. index c7428a8..b13024e 100644
  13. --- a/harness/cases/22.t
  14. +++ b/harness/cases/22.t
  15. @@ -83,6 +83,9 @@ int test_main(void)
  16. io_prep_poll(&iocb, pipe1[0], POLLIN);
  17. ret = io_submit(ctx, 1, iocbs);
  18. if (ret != 1) {
  19. + /* if poll isn't supported, skip the test */
  20. + if (ret == -EINVAL)
  21. + return 3;
  22. printf("child: io_submit failed\n");
  23. return 1;
  24. }
  25. @@ -120,7 +123,10 @@ int test_main(void)
  26. ret = io_submit(ctx, 1, iocbs);
  27. if (ret != 1) {
  28. - printf("parent: io_submit failed\n");
  29. + /* if poll isn't supported, skip the test */
  30. + if (ret == -EINVAL)
  31. + return 3;
  32. + printf("parent: io_submit failed with %d\n", ret);
  33. return 1;
  34. }
  35. @@ -147,3 +153,9 @@ int test_main(void)
  36. return 0;
  37. }
  38. }
  39. +/*
  40. + * Local variables:
  41. + * mode: c
  42. + * c-basic-offset: 8
  43. + * End:
  44. + */
  45. --
  46. 2.26.0.292.g33ef6b2f38