Changeset 4025 for branches/GRACE/src


Ignore:
Timestamp:
Aug 17, 2000, 10:23:35 AM (25 years ago)
Author:
bird
Message:

Corrected some bugs.
Current known problem is that myldrOpen seems to destroy stack causing
the call to mytkExecPgm not return correctly and hence sysinit not to
release the ldrSem.

Location:
branches/GRACE/src/win32k
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/GRACE/src/win32k/dev32/d32init.c

    r4018 r4025  
    1 /* $Id: d32init.c,v 1.19.4.4 2000-08-15 07:03:25 bird Exp $
     1/* $Id: d32init.c,v 1.19.4.5 2000-08-17 08:23:32 bird Exp $
    22 *
    33 * d32init.c - 32-bits init routines.
     
    14351435        {(unsigned)&fakepPTDACur,           4},
    14361436        {(unsigned)&fakeptda_start,         4},
    1437         {(unsigned)&fakeptda_environ,       4}
     1437        {(unsigned)&fakeptda_environ,       4},
     1438        {(unsigned)&fakeptda_module,        4}
    14381439    };
    14391440    int i;
  • branches/GRACE/src/win32k/include/test.h

    r4010 r4025  
    1 /* $Id: test.h,v 1.1.4.1 2000-08-14 08:57:07 bird Exp $
     1/* $Id: test.h,v 1.1.4.2 2000-08-17 08:23:33 bird Exp $
    22 *
    33 * Definitions and declarations for test moduls.
     
    109109extern char     fakeptda_start;
    110110extern USHORT   fakeptda_environ;
     111extern HMTE     fakeptda_module;
    111112
    112113#endif /* INCL_NO_FAKE */
  • branches/GRACE/src/win32k/ldr/myldrOpen.cpp

    r3985 r4025  
    1 /* $Id: myldrOpen.cpp,v 1.10.4.2 2000-08-11 02:23:19 bird Exp $
     1/* $Id: myldrOpen.cpp,v 1.10.4.3 2000-08-17 08:23:33 bird Exp $
    22 *
    33 * myldrOpen - ldrOpen.
     
    265265                 *      - When the file is an EXE file and PE.EXE is enabled.
    266266                 */
    267                 if ((u1.pNtHdrs->FileHeader.Characteristics & IMAGE_FILE_DLL == 0UL)
     267                if ((u1.pNtHdrs->FileHeader.Characteristics & IMAGE_FILE_DLL) == 0UL
    268268                    && (options.fPE == FLAGS_PE_PE || options.fPE == FLAGS_PE_MIXED)
    269269                    && (isLdrStateExecPgm() || isLdrStateQAppType())
     
    293293                        if (isLdrStateExecPgm() && fTkExecPgm)
    294294                        {
    295                             rc = AddArgsToFront(1, achTkExecPgmFilename);
     295                            rc = AddArgsToFront(2, u1.pach, achTkExecPgmFilename);
    296296                            if (rc == NO_ERROR)
    297297                            {
  • branches/GRACE/src/win32k/misc/OS2KPTDA.c

    r4018 r4025  
    1 /* $Id: OS2KPTDA.c,v 1.1.2.1 2000-08-15 07:03:27 bird Exp $
     1/* $Id: OS2KPTDA.c,v 1.1.2.2 2000-08-17 08:23:35 bird Exp $
    22 *
    33 * PTDA access functions.
     
    5454}
    5555
     56
     57
     58
     59
  • branches/GRACE/src/win32k/test/win32ktst.c

    r4017 r4025  
    1 /* $Id: win32ktst.c,v 1.1.4.3 2000-08-15 06:16:09 bird Exp $
     1/* $Id: win32ktst.c,v 1.1.4.4 2000-08-17 08:23:35 bird Exp $
    22 *
    33 * Win32k test module.
     
    582582        case 1:     rc = TestCase1(argc, argv);   break;
    583583        case 2:     rc = TestCase2();   break;
     584        case 3:     rc = TestCase3();   break;
    584585
    585586        default:
     
    681682    int         rc = 1;
    682683    RP32INIT    rpinit;
    683     char *      pszInitArgs = "-C1 -L:N -Verbose -Quiet -Elf:Yes -Pe:Mixed -Script:No -W4 -Heap:512000 -ResHeap:0256000 -HeapMax:4096000 -ResHeapMax:0x100000";
     684    char *      pszInitArgs = "-C1 -L:N -Verbose -Quiet -Elf:Yes -Pe:Mixed -Script:Yes -W4 -Heap:512000 -ResHeap:0256000 -HeapMax:4096000 -ResHeapMax:0x100000";
    684685
    685686    /* $elf */
     
    701702            opt.cbResHeapMax    = 0x100000;
    702703            opt.fElf            = TRUE;
    703             opt.fUNIXScript     = FALSE;
     704            opt.fUNIXScript     = TRUE;
    704705            opt.fPE             = FLAGS_PE_MIXED;
    705706            opt.fQuiet          = TRUE;
     
    709710
    710711            rc = CompareOptions(SSToDS(&opt));
     712            if (rc == NO_ERROR)
     713            {
     714                 rc = TestCaseExeLoad2();
     715            }
    711716        }
    712717        else
     
    718723    return rc;
    719724}
     725
     726/**
     727 * Test case 3.
     728 * Checks that all parameters are read correctly (1).
     729 *
     730 * @sketch  Create init packet with no arguments.
     731 *          Initiate elf$
     732 *          Create init packet with no arguments.
     733 *          Initiate win32k$
     734 * @returns 0 on success.
     735 *          1 on failure.
     736 * @status  completely implemented.
     737 * @author  knut st. osmundsen (knut.stange.osmundsen@pmsc.no)
     738 */
     739int TestCase3(void)
     740{
     741    int         rc = 1;
     742    RP32INIT    rpinit;
     743    char *      pszInitArgs = "-C1 -L:N -Verbose -Quiet -Elf:Yes -Pe:PE -Script:Yes -W4 -Heap:512000 -ResHeap:0256000 -HeapMax:4096000 -ResHeapMax:0x100000";
     744
     745    /* $elf */
     746    initRPInit(SSToDS(&rpinit), pszInitArgs);
     747    rc = InitElf(&rpinit);              /* no SSToDS! */
     748    printf("InitElf returned status=0x%04x\n", rpinit.rph.Status);
     749    if ((rpinit.rph.Status & (STDON | STERR)) == STDON)
     750    {
     751        /* $win32k */
     752        initRPInit(SSToDS(&rpinit), pszInitArgs);
     753        rc = InitWin32k(&rpinit);       /* no SSToDS! */
     754        printf("InitWin32k returned status=0x%04x\n", rpinit.rph.Status);
     755        if ((rpinit.rph.Status & (STDON | STERR)) == STDON)
     756        {
     757            struct options opt = DEFAULT_OPTION_ASSIGMENTS;
     758            opt.cbSwpHeapInit   = 512000;
     759            opt.cbSwpHeapMax    = 4096000;
     760            opt.cbResHeapInit   = 0256000;
     761            opt.cbResHeapMax    = 0x100000;
     762            opt.fElf            = TRUE;
     763            opt.fUNIXScript     = TRUE;
     764            opt.fPE             = FLAGS_PE_PE;
     765            opt.fQuiet          = TRUE;
     766            opt.fLogging        = FALSE;
     767            opt.usCom           = OUTPUT_COM1;
     768            opt.ulInfoLevel     = INFOLEVEL_INFOALL;
     769
     770            rc = CompareOptions(SSToDS(&opt));
     771            if (rc == NO_ERROR)
     772            {
     773                 rc = TestCaseExeLoad2();
     774            }
     775        }
     776        else
     777            printf("!failed!\n");
     778    }
     779    else
     780        printf("!failed!\n");
     781
     782    return rc;
     783}
     784
    720785
    721786/**
     
    739804    if (options.fLogging != pOpt->fLogging)
    740805        printf("fLogging = %d - should be %d\n", options.fLogging, pOpt->fLogging, rc++);
    741     if (options.ulBuild != ~0UL)
     806    if (pOpt->ulBuild != ~0UL)
    742807    {
    743808        if (options.fKernel != pOpt->fKernel)
     
    777842
    778843
    779 
    780 
    781844/**
    782845 * Simulates a executable loading (no errors).
     
    804867     * Do the real execution.
    805868     */
    806     printf("--- TestcaseExeLoad1 - loading win32ktst.exe (LX image) ----\n");
     869    printf("--- TestcaseExeLoad3 - loading win32ktst.exe (LX image) ----\n");
    807870    rc = CalltkExecPgm(EXEC_LOAD, NULL, NULL, "win32ktst.exe");
    808871    if (rc == NO_ERROR)
    809872    {
    810873        psz = "BIN\\DEBUG\\LIBCONV.EXE\0";
    811         printf("--- TestcaseExeLoad1 - loading libconv.exe (LX image) ----\n");
     874        printf("--- TestcaseExeLoad3 - loading libconv.exe (LX image) ----\n");
    812875        rc = CalltkExecPgm(EXEC_LOAD, NULL, NULL, "bin\\debug\\libconv.exe");
    813         #if 0 //not implemented by CalltkExecPgm...???
    814         /* check result */
    815         if (memcmp(achTkExecPgmArguments, psz, strlen(psz) + 1) != 0)
     876        if (rc == NO_ERROR)
    816877        {
    817             rc  = ERROR_BAD_ARGUMENTS;
    818             printf("Bad Arguments! (%s)\n", achTkExecPgmArguments);
     878            #if 0 //not implemented by CalltkExecPgm...???
     879            /* check result */
     880            if (memcmp(achTkExecPgmArguments, psz, strlen(psz) + 1) != 0)
     881            {
     882                rc  = ERROR_BAD_ARGUMENTS;
     883                printf("Bad Arguments! (%s)\n", achTkExecPgmArguments);
     884            }
     885            #else
     886            psz = psz;
     887            #endif
    819888        }
    820         #else
    821         psz = psz;
    822         #endif
    823889    }
    824890
     
    826892    {
    827893        psz = "REXX\\TST.CMD\0OriginalArgument1 OriginalArgument2\0OriginalArgument3\0";
    828         printf("--- TestcaseExeLoad1 - loading rexx\\tst.cmd (REXX script) ----\n");
     894        printf("--- TestcaseExeLoad3 - loading rexx\\tst.cmd (REXX script) ----\n");
    829895        rc = CalltkExecPgm(EXEC_LOAD, psz, NULL, "rexx\\tst.cmd");
    830 
    831         /* check result */
    832         psz[strlen(psz)] = ' ';
    833         for (cch = 0; psz[cch] != '\0';)
    834             cch += strlen(psz + cch) + 1;
    835         cch++;
    836         if (memcmp(achTkExecPgmArguments + strlen(achTkExecPgmArguments) + 1, psz, cch) != 0)
     896        if (rc == NO_ERROR)
    837897        {
    838             rc  = ERROR_BAD_ARGUMENTS;
    839             printf("Bad Arguments! (achTkExecPgmArguments=%s).\n", achTkExecPgmArguments + strlen(achTkExecPgmArguments) + 1);
     898            /* check result */
     899            psz = "REXX\\TST.CMD OriginalArgument1 OriginalArgument2\0OriginalArgument3\0";
     900            cch = strlen(psz);
     901            if (memcmp(achTkExecPgmArguments + strlen(achTkExecPgmArguments) + 1, psz, cch) != 0)
     902            {
     903                rc  = ERROR_BAD_ARGUMENTS;
     904                printf("Bad Arguments! (achTkExecPgmArguments=%s).\n", achTkExecPgmArguments + strlen(achTkExecPgmArguments) + 1);
     905            }
    840906        }
    841907    }
     
    844910    {
    845911        psz = "TEST\\TST.SH\0OrgArg1 OrgArg2\0OrgArg3\0";
    846         printf("--- TestcaseExeLoad1 - loading test\\testscript.sh (UNIX shell script) ----\n");
     912        printf("--- TestcaseExeLoad3 - loading test\\tst.sh (UNIX shell script) ----\n");
    847913        rc = CalltkExecPgm(EXEC_LOAD, psz, NULL, "test\\tst.sh");
    848 
    849         /* check result */
    850         psz[strlen(psz)] = ' ';
    851         for (cch = 0; psz[cch] != '\0';)
    852             cch += strlen(psz + cch) + 1;
    853         cch++;
    854         if (memcmp(achTkExecPgmArguments + strlen(achTkExecPgmArguments) + 1, psz, cch) != 0)
     914        if (rc == NO_ERROR)
    855915        {
    856             rc  = ERROR_BAD_ARGUMENTS;
    857             printf("Bad Arguments! (achTkExecPgmArguments=%s).\n", achTkExecPgmArguments + strlen(achTkExecPgmArguments) + 1);
     916            /* check result */
     917            psz = "TEST\\TST.SH OrgArg1 OrgArg2\0OrgArg3\0";
     918            cch = strlen(psz);
     919            if (memcmp(achTkExecPgmArguments + strlen(achTkExecPgmArguments) + 1, psz, cch) != 0)
     920            {
     921                rc  = ERROR_BAD_ARGUMENTS;
     922                printf("Bad Arguments! (achTkExecPgmArguments=%s).\n", achTkExecPgmArguments + strlen(achTkExecPgmArguments) + 1);
     923            }
    858924        }
    859925    }
    860926
    861 
    862927    if (rc == NO_ERROR)
    863928    {
    864         printf("--- TestcaseExeLoad1 - loading SOL.EXE (PE image) ----\n");
     929        psz = "TEST\\TST2.SH\0OrgArg1 OrgArg2\0OrgArg3\0";
     930        printf("--- TestcaseExeLoad3 - loading test\\tst2.sh (UNIX shell script) ----\n");
     931        rc = CalltkExecPgm(EXEC_LOAD, psz, NULL, "test\\tst2.sh");
     932        if (rc == NO_ERROR)
     933        {
     934            /* check result */
     935            psz = "-arg1 -arg2 -arg3 TEST\\TST2.SH OrgArg1 OrgArg2\0OrgArg3\0";
     936            cch = strlen(psz) + 1;
     937            if (memcmp(achTkExecPgmArguments + strlen(achTkExecPgmArguments) + 1, psz, cch) != 0)
     938            {
     939                rc  = ERROR_BAD_ARGUMENTS;
     940                printf("Bad Arguments! (achTkExecPgmArguments=%s).\n", achTkExecPgmArguments + strlen(achTkExecPgmArguments) + 1);
     941            }
     942        }
     943    }
     944
     945    if (rc == NO_ERROR)
     946    {
     947        printf("--- TestcaseExeLoad3 - loading SOL.EXE (PE image) ----\n");
    865948        rc = CalltkExecPgm(EXEC_LOAD, NULL, NULL, "e:\\Win32Prog\\Sol\\Sol.exe");
     949        if (rc == NO_ERROR)
     950        {
     951            /* check result */
     952            psz = "E:\\WIN32PROG\\SOL\\SOL.EXE\0";
     953            cch = strlen(psz) + 1 + 1;
     954            if (memcmp(achTkExecPgmArguments + strlen(achTkExecPgmArguments) + 1, psz, cch) != 0)
     955            {
     956                rc  = ERROR_BAD_ARGUMENTS;
     957                printf("Bad Arguments! (achTkExecPgmArguments=%s).\n", achTkExecPgmArguments + strlen(achTkExecPgmArguments) + 1);
     958            }
     959        }
    866960    }
    867961
     
    871965    return rc;
    872966}
     967
  • branches/GRACE/src/win32k/win32k.vpj

    r4005 r4025  
    11[COMPILER]
    22MACRO=odin32_maketagfile();\n
    3 FILTEREXPANSION=1 1 1 1 0 0 0 0 1 0 0 0 0 1
     3FILTEREXPANSION=1 1 1 0 0 0 1 0 1 0 0 0 0 1
    44compile=concur|capture|clear|:Compile:&Compile,nmake %n.obj
    55make=concur|capture|clear|:Build:&Build,nmake
     
    145145[ASSOCIATION]
    146146[STATE]
    147 SCREEN: 1792 1344 272 272 1394 896 0 0 M 0 0 0 0 1514 1042
     147SCREEN: 1600 1200 176 176 1244 800 0 0 M 0 0 0 0 1275 898
    148148CWD: H:\CODING\WORK\ODIN32\src\win32k
    149149BUFFER: BN="F:\VSLICK40\OS2\vrestore.slk"
    150150BI: MA=1 254 1  TABS=1 9  WWS=3 IWT=0 ST=0 IN=0 BW=0 US=0 RO=0 SE=0 SN=0 BIN=0 MN=Fundamental   HM=0 MF=1
    151 VIEW: LN=.0 CL=1 LE=0 CX=0 CY=1 WI=5 BI=20 HT=0 HN=0 HF=0 HC=4
     151VIEW: LN=.0 CL=1 LE=0 CX=0 CY=1 WI=5 BI=22 HT=0 HN=0 HF=0 HC=4
    152152BUFFER: BN="H:\coding\work\odin32\src\win32k\libconv.c"
    153 BI: MA=1 74 1  TABS=1 5  WWS=1 IWT=0 ST=0 IN=2 BW=0 US=32000 RO=0 SE=1 SN=0 BIN=0 MN=C  HM=0 MF=616
    154 VIEW: LN=.4040 CL=17 LE=0 CX=16 CY=25 WI=5 BI=17 HT=0 HN=0 HF=0 HC=4
    155 BUFFER: BN="H:\coding\work\odin32\src\win32k\include\devSegDf.inc"
    156 BI: MA=1 74 1  TABS=1 5  WWS=1 IWT=0 ST=0 IN=1 BW=0 US=32000 RO=0 SE=1 SN=0 BIN=0 MN=Assembly   HM=0 MF=40
    157 VIEW: LN=.532 CL=8 LE=0 CX=7 CY=24 WI=5 BI=19 HT=0 HN=0 HF=0 HC=4
    158 WINDOW: 156 162 1021 703 -1 -1 M  WF=0 WT=1 "System Monospaced,10,0,1"
    159 BUFFER: BN="H:\coding\work\odin32\src\win32k\include\devSegDf.inc"
    160 VIEW: LN=.553 CL=14 LE=0 CX=13 CY=26 WI=84 BI=19 HT=0 HN=0 HF=0 HC=4
    161 WINDOW: 130 131 1021 704 -1 -1 M  WF=0 WT=2 "System Monospaced,10,0,1"
    162 BUFFER: BN="H:\coding\work\odin32\src\win32k\libconv.c"
    163 VIEW: LN=.4235 CL=32 LE=0 CX=31 CY=32 WI=83 BI=17 HT=0 HN=0 HF=0 HC=4
    164 FILEHIST: 9
    165 H:\CODING\WORK\ODIN32\src\win32k\dev16\probkrnl.c
    166 H:\CODING\WORK\ODIN32\src\win32k\include\vprntf16.h
    167 H:\CODING\WORK\ODIN32\src\win32k\dev16\vprntf16.c
    168 H:\coding\work\odin32\src\win32k\list\debug\vprntf16.s
    169 H:\coding\work\odin32\src\win32k\include\omf.h
    170 H:\coding\work\odin32\src\win32k\object\debug\ext.lib
    171 H:\coding\work\odin32\src\win32k\object\debug\noext.lib
     153BI: MA=1 74 1  TABS=1 5  WWS=1 IWT=0 ST=0 IN=2 BW=0 US=32000 RO=0 SE=1 SN=0 BIN=0 MN=C  HM=0 MF=0
     154VIEW: LN=.11148 CL=33 LE=0 CX=32 CY=37 WI=5 BI=17 HT=0 HN=0 HF=0 HC=4
     155BUFFER: BN="H:\CODING\WORK\ODIN32\src\win32k\dev16\probkrnl.c"
     156BI: MA=1 74 1  TABS=1 5  WWS=1 IWT=0 ST=0 IN=2 BW=0 US=32000 RO=0 SE=1 SN=0 BIN=0 MN=C  HM=0 MF=0
     157VIEW: LN=.5619 CL=30 LE=0 C CY=1 WI=5 BI=9 HT=0 HN=0 HF=0 HC=4
     158BUFFER: BN="H:\CODING\WORK\ODIN32\src\win32k\test\win32ktst.c"
     159BI: MA=1 74 1  TABS=1 5  WWS=1 IWT=0 ST=0 IN=2 BW=0 US=32000 RO=0 SE=1 SN=0 BIN=0 MN=C  HM=0 MF=872
     160VIEW: LN=.6408 CL=13 LE=0 CX=12 CY=38 WI=5 BI=10 HT=0 HN=0 HF=0 HC=4
     161WINDOW: 26 25 967 704 -1 -1 M  WF=0 WT=2 "System Monospaced,10,0,1"
     162BUFFER: BN="H:\CODING\WORK\ODIN32\src\win32k\test\win32ktst.c"
     163VIEW: LN=.6119 CL=76 LE=0 CX=75 CY=29 WI=194 BI=10 HT=0 HN=0 HF=0 HC=4
     164FILEHIST: 5
     165F:\VSLICK40\OS2\vrestore.slk
    172166H:\coding\work\odin32\src\win32k\libconv.c
    173 H:\coding\work\odin32\src\win32k\include\devSegDf.inc
     167H:\coding\work\odin32\src\win32k\makefile
     168H:\CODING\WORK\ODIN32\src\win32k\include\test.h
     169H:\CODING\WORK\ODIN32\src\win32k\test\win32ktst.c
    174170PRINTER: 2
    175 PRINTER: 2
    176 PRINTER: 2
     171
     172
     173
Note: See TracChangeset for help on using the changeset viewer.