[[!meta copyright="Copyright © 2015 Free Software Foundation, Inc."]]

[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
id="license" text="Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no Invariant
Sections, no Front-Cover Texts, and no Back-Cover Texts.  A copy of the license
is included in the section entitled
[[GNU Free Documentation License|/fdl]]."]]"""]]

# Netfs Ada experimentations

## Rev 05c2ac288ad2

  * Nothing is implemented in the Netfs\_Implementation package
  * node is the translator inode in directory .

### ls -la .

  * Leads to a call of Validate\_Stat : line 115 of Netfs\_Implementation package
  * Returns an error :
    * bash: cd: node: Not a directory

### ls -la node

  * Returns an error :
    * ls: cannot access node: Not a directory
  * Leads also to a call of Validate\_Stat : line 115 of Netfs\_Implementation package

### cd node

  * Returns an error :
    * bash: cd: node: Not a directory
  * Validate\_Stat get called three times

## Rev 6052185bf877

  * Only a very simple Validate\_State is implemented

### ls -la .

  * Leads to a call of Validate\_Stat : line 120 of Netfs\_Implementation package then a call to Check\_Open\_Permissions : line 13
  * Returns this error :
    * "ls: cannot access node: Not a directory"

### ls -la node

  * Returns an error :
    * ls: cannot access node: Not a directory
  * Leads to a call of Validate\_Stat : line 120 of Netfs\_Implementation package then a call to Check\_Open\_Permissions : line 13

### cd node

  * Returns an error :
    * bash: cd: node: Not a directory
  * Validate\_Stat then Check\_Open\_Permissions sequence is called three times

## Rev dd3e6b7ea5c7

  * Check\_Open\_Permissions implemented

### ls -la .
  * No more error : node is displayed as a directory
  * Sequence call : validate\_state / check\_open\_permissions / validate\_state

### ls -la node

  * Returns an error :
    * ls: reading directory node: Operation not supported
  * Call sequence :
    * validate\_state
    * check\_open\_permissions
    * validate\_state
    * validate\_state
    * check\_open\_permissions
    * validate\_state
    * get\_dirents line 90 of netfs\_implementation package

### cd node

  * Hangs
  * Call sequence :
    * Validate\_Stat
    * Check\_Open\_Permissions
    * Validate\_Stat
    * Validate\_Stat
    * Check\_Open\_Permissions
    * netfs\_implementation.adb:57 Netfs\_Implementation.Attempt\_Lookup

## Rev 68f905dc9b7c

  * Attemp\_Lookup implemented

### ls -la .
  * No more error : node is displayed as a directory
  * Sequence call : validate\_state / check\_open\_permissions / validate\_state

### ls -la node

  * Returns an error :
    * ls: reading directory node: Operation not supported
    * get\_dirents still not implemented
  * Call sequence :
    * validate\_state
    * check\_open\_permissions
    * validate\_state
    * validate\_state
    * check\_open\_permissions
    * validate\_state
    * get\_dirents line 90 of netfs\_implementation package

### cd node

  * No more hang
  * Call sequence :
    * Validate\_Stat
    * check\_open\_permissions
    * Validate\_Stat
    * Validate\_Stat
    * check\_open\_permissions
    * attemp\_lookup
    * Validate\_Stat
    * check\_open\_permissions
    * attemp\_lookup
    * Validate\_Stat
    * Validate\_Stat
    * check\_open\_permissions
    * Validate\_Stat
    * Not Implemented Netfs\_Implementation.Get\_Dirents
    * attemp\_lookup
    * Validate\_Stat
    * Validate\_Stat
    * check\_open\_permissions
    * Validate\_Stat
    * Not Implemented Netfs\_Implementation.Get\_Dirents
    * attemp\_lookup
    * Validate\_Stat
    * Validate\_Stat
    * check\_open\_permissions
    * Validate\_Stat
    * Not Implemented Netfs\_Implementation.Get\_Dirents
    * attemp\_lookup
    * Validate\_Stat
    * Validate\_Stat
    * check\_open\_permissions
    * Validate\_Stat
    * Not Implemented Netfs\_Implementation.Get\_Dirents

## Rev 98c74b2027c9

  * Get_Dirents implemented
    * Tested with depth option set to two (only regular files in node)

### ls -la .

  * OK

### ls -la node

  * OK, display leafs regular files
  * Call Sequence
    * Validate\_Stat
    * Check\_Open\_Permissions
    * Validate\_Stat
    * Validate\_Stat
    * Check\_Open\_Permissions
    * Validate\_Stat
    * enter get dirents netfs_implementation.adb:141 Netfs_Implementation.Get_Dirents
      * then attemp\_lookup for each leaf

### cd node
  * OK
    * ls in node directory display leafs

## Rev 2270e1726850

  * depth parameter goes from 2 to 3

### ls node then ls node/path\ 2
  * OK
    * display leafs in directory path 2

### ls node/path\ 2
  * OK
    * needed to fix a missing update in the child node (because update was done only on get_dirents call)

### cat node/path\ 2/leaf\ 1
  * NOK
    * Call sequence
      * Validate\_Stat
      * Check\_Open\_Permissions
      * Attempt\_Lookup
      * Validate\_Stat
      * Attempt\_Lookup
      * Validate\_Stat
      * Check\_Open\_Permissions
      * Validate_Stat
      * netfs\_implementation.adb:113 Netfs\_Implementation.Attempt\_Read
    * need for attemp\_read implementation

## Rev 3126bd9ce609

  * Read is implemented
  * next step : write

### echo "elle souffle" > node/path\ 2/leaf\ 1
  * NOK
    * command result - bash: node/path 2/leaf 1: Permission denied
    * Call sequence
      * Validate\_Stat
      * Check\_Open\_Permissions
      * Attempt_Lookup path 2                                                                                                                                                                                                                     * Validate\_Stat
      * Attempt\_Lookup leaf 1                                                                                                                                                                                                                    * Validate\_Stat
      * Validate_Stat
      * Check\_Open\_Permissions - Check failed WRITE 1073741837

## Rev 242f59899045

  * node are created with 0755 permission

### echo "elle souffle" > node/path\ 2/leaf\ 1
  * NOK
    * command result - bash: node/path 2/leaf 1: Operation not supported
    * Call sequence
      * Validate\_Stat
      * Check\_Open\_Permissions
      * Attempt_Lookup path 2                                                                                                                                                                                                                     * Validate\_Stat
      * Attempt\_Lookup leaf 1                                                                                                                                                                                                                    * Validate\_Stat
      * Validate_Stat
      * Check\_Open\_Permissions
      * netfs\_implementation.adb:366 Netfs\_Implementation.Attempt\_Set\_Size : not yet implemented

## Rev dceb291aaf1c

  * Set_Size minimal implementation

### echo "elle souffle" > node/path\ 2/leaf\ 1
  * NOK
    * command result - bash: node/path 2/leaf 1: Operation not supported
    * Call sequence
      * Validate\_Stat
      * Check\_Open\_Permissions
      * Attempt_Lookup path 2                                                                                                                                                                                                                     * Validate\_Stat
      * Attempt\_Lookup leaf 1                                                                                                                                                                                                                    * Validate\_Stat
      * Validate_Stat
      * Check\_Open\_Permissions
      * Attempt\_Set\_Size
      * netfs_implementation.adb:481 Netfs\_Implementation.Attemp\_Write

## Rev 93311515a6c2

  * Attempt_Write is implemented

### echo "elle souffle" > node/path\ 2/leaf\ 1
  * OK

## Rev 8395215263d3

  * Test of mkdir

### mkdir node/toto

  * NOK
    * command result - mkdir: cannot create directory ‘node/toto’: Operation not supported
  * Call sequence
    * Validate\_Stat
    * Check\_Open\_Permissions
    * netfs_implementation.adb:421 Netfs_Implementation.Attempt_Mkdir

## Rev 3425f5c837fb

  * mkdir implementation

### mkdir node/toto

  * OK
  * need to create leaf now : write to an inexistent file

### echo "elle souffle" > node/test

  * NOK
    * command result - bash: node/test: Not a directory
  * CAll sequence
    * Validate\_Stat
    * Check\_Open\_Permissions
    * Attempt\_Lookup
    * Attempt\_Create\_File

## Rev a1f5464f0e53

  * Attempt_Create_File is implemented

### echo "elle souffle" > node/test

  * OK