Changeset a97b9ed for tests


Ignore:
Timestamp:
Oct 16, 2023, 8:09:51 AM (2 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
2bf46a5, 54e59dd, 61e5d99
Parents:
946a6e4 (diff), 8cbe732 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
tests
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • tests/.expect/linkonce.txt

    r946a6e4 ra97b9ed  
    1 signed=-7 unsigned=12
     1signed=7 unsigned=12
  • tests/concurrency/cofor.cfa

    r946a6e4 ra97b9ed  
    11#include <cofor.hfa>
    22
    3 long total = 0;
    4 void add_num( void * arg ) { __atomic_fetch_add( &total, (long)arg, __ATOMIC_SEQ_CST ); }
     3
     4void add_num( long * total, long val ) { __atomic_fetch_add( total, (long)val, __ATOMIC_SEQ_CST ); }
    55
    66int main() {
    77    printf("start\n");
    88    processor p[4];
     9    long total = 0;
    910    COFOR( i, 0, 10, __atomic_fetch_add( &total, i, __ATOMIC_SEQ_CST ); );
    10     parallel_stmt_t stmts[5] = { add_num, add_num, add_num, add_num, add_num };
    11     void * nums[5] = { (void *)11, (void *)12, (void *)13, (void *)14, (void *)15 };
    12     parallel( stmts, nums, 5 );
     11    {
     12        corun;      // does nothing
     13        corun{};    // does nothing
     14        corun add_num( &total, 11 );
     15        corun { add_num( &total, 12 ); }
     16        corun __atomic_fetch_add( &total, 13, __ATOMIC_SEQ_CST );
     17        corun { __atomic_fetch_add( &total, 14, __ATOMIC_SEQ_CST ); }
     18        __atomic_fetch_add( &total, 15, __ATOMIC_SEQ_CST ); // run by main thd
     19    }
    1320    printf("total: %ld\n", total);
    1421    printf("done\n");
  • tests/link-once/main.cfa

    r946a6e4 ra97b9ed  
    11// Test our new cfa_linkonce attribute:
    22
    3 __attribute__(( cfa_linkonce )) signed int example = -7;
     3__attribute__(( cfa_linkonce )) signed int example = 7;
    44__attribute__(( cfa_linkonce )) unsigned int example = 12;
    55
  • tests/link-once/partner.cfa

    r946a6e4 ra97b9ed  
    11// Side file for the link-once test.
    22
    3 __attribute__(( cfa_linkonce )) signed int example = -7;
     3__attribute__(( cfa_linkonce )) signed int example = 7;
    44__attribute__(( cfa_linkonce )) unsigned int example = 12;
    55
  • tests/test.py

    r946a6e4 ra97b9ed  
    125125        parser.add_argument('--archive-errors', help='If called with a valid path, on test crashes the test script will copy the core dump and the executable to the specified path.', type=str, default='')
    126126        parser.add_argument('-j', '--jobs', help='Number of tests to run simultaneously, 0 (default) for unlimited', nargs='?', const=0, type=int)
    127         parser.add_argument('--list-comp', help='List all valide arguments', action='store_true')
     127        parser.add_argument('--list-comp', help='List all valid arguments', action='store_true')
    128128        parser.add_argument('--list-dist', help='List all tests for distribution', action='store_true')
    129129        parser.add_argument('-I','--include', help='Directory of test to include, can be used multiple time, All  if omitted', action='append')
Note: See TracChangeset for help on using the changeset viewer.