apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: apr/test testpoll.c
Date Mon, 24 Nov 2003 11:09:08 GMT
trawick     2003/11/24 03:09:03

  Modified:    test     testpoll.c
  Log:
  stop stuffing the same descriptor in the pollset twice...  this is not
  implemented for select()-based apr_pollset* and it isn't clear that there
  is a good reason to do so (testpoll is happy on OS X now)
  
  Revision  Changes    Path
  1.28      +5 -10     apr/test/testpoll.c
  
  Index: testpoll.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testpoll.c,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- testpoll.c	20 Nov 2003 13:51:32 -0000	1.27
  +++ testpoll.c	24 Nov 2003 11:09:03 -0000	1.28
  @@ -492,21 +492,16 @@
       rv = apr_pollset_add(pollset, &pfd);
       CuAssertIntEquals(tc, APR_SUCCESS, rv);
   
  -    pfd.desc.s = s[1];
  -    pfd.client_data = (void *)4;
  -    rv = apr_pollset_add(pollset, &pfd);
  -    CuAssertIntEquals(tc, APR_SUCCESS, rv);
  -
       pfd.desc.s = s[3];
  -    pfd.client_data = (void *)5;
  +    pfd.client_data = (void *)4;
       rv = apr_pollset_add(pollset, &pfd);
       CuAssertIntEquals(tc, APR_SUCCESS, rv);
   
       rv = apr_pollset_poll(pollset, 1000, &num, &hot_files);
       CuAssertIntEquals(tc, APR_SUCCESS, rv);
  -    CuAssertIntEquals(tc, 5, num);
  +    CuAssertIntEquals(tc, 4, num);
   
  -    /* now remove the pollset elements referring to desc s[1] */
  +    /* now remove the pollset element referring to desc s[1] */
       pfd.desc.s = s[1];
       pfd.client_data = (void *)999; /* not used on this call */
       rv = apr_pollset_remove(pollset, &pfd);
  @@ -520,7 +515,7 @@
       CuAssertPtrEquals(tc, s[0], hot_files[0].desc.s);
       CuAssertPtrEquals(tc, (void *)3, hot_files[1].client_data);
       CuAssertPtrEquals(tc, s[2], hot_files[1].desc.s);
  -    CuAssertPtrEquals(tc, (void *)5, hot_files[2].client_data);
  +    CuAssertPtrEquals(tc, (void *)4, hot_files[2].client_data);
       CuAssertPtrEquals(tc, s[3], hot_files[2].desc.s);
       
       /* now remove the pollset elements referring to desc s[2] */
  @@ -535,7 +530,7 @@
       CuAssertIntEquals(tc, 2, num);
       CuAssertPtrEquals(tc, (void *)1, hot_files[0].client_data);
       CuAssertPtrEquals(tc, s[0], hot_files[0].desc.s);
  -    CuAssertPtrEquals(tc, (void *)5, hot_files[1].client_data);
  +    CuAssertPtrEquals(tc, (void *)4, hot_files[1].client_data);
       CuAssertPtrEquals(tc, s[3], hot_files[1].desc.s);
   }
   
  
  
  

Mime
View raw message